Bundle SDL2-based game framework with sprite management, collision detection, tilemaps, camera, and scene graph. Builds on sdl2.obl for structured 2D game development. Compile with -lib sdl2.
TitledImageSprite
Titled image sprite
Implements: Shape
Operations
AddTile #
Adds a tile at the specified location
method : public : AddTile(x:Int, y:Int) ~ ImageSpriteParameters
| Name | Type | Description |
|---|---|---|
| x | Int | x coordinate |
| y | Int | y coordinate |
Return
| Type | Description |
|---|---|
| ImageSprite | image sprite |
AddX #
Increments the current x-position
method : public : AddX(x:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | increment to the current x-position |
AddY #
Increments the current y-position
method : public : AddY(y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| y | Int | increment to the current y-position |
GetHeight #
Gets sprite height
method : public : GetHeight() ~ IntReturn
| Type | Description |
|---|---|
| Int | sprite height |
GetPosition #
Gets relative sprite positions from original creation
method : public : GetPosition() ~ PositionReturn
| Type | Description |
|---|---|
| Position | relative sprite position |
IsOk #
Initialization status flag
method : public : IsOk() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if initialized, false otherwise |
LoadImage #
Loads an image
method : private : LoadImage(file:String, colorkey:Color) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| file | String | image to load |
| colorkey | Color | key color |
Return
| Type | Description |
|---|---|
| Bool | true if success, false otherwise |
RemoveTile #
Removes sprite
method : public : RemoveTile(sprite:ImageSprite) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| sprite | ImageSprite | sprite to remove |
Return
| Type | Description |
|---|---|
| Bool | true if found and removed, false otherwise |