This tutorial extends Tutorial 06 with a Tileset resource. It converts Base/tiles.bmp into a Tile, stores it in the shared Tutorial.cdc, renders a 12x8 map and moves the ship between walkable cells.
The example also layers two tile IDs in the same cell and keeps movement logic independent from rendering.
Tile::save() can create an archive, but this tutorial must extend the resource chain established earlier. Checking first prevents an incomplete tileset-only archive.
The source Image uses magenta as its transparent color. TileMgr creates an empty Tile, assignImage() transfers ownership, and setOffset() divides the image into 48x48 tile regions starting at ID 1.
Tile::save() writes the Tile block and its owned Image block. Closing the temporary object releases both before the runtime copy is loaded.
The runtime Tile is loaded by its stable resource name and validated before the render callback uses it.
Only the stars and moon tile IDs are walkable. The cell helper validates map bounds before accessing the fixed map array.
Each map value selects a tile region. Moon cells first render the stars tile, then render the transparent moon tile over it.
Movement calculates one destination cell, rejects blocked tiles, then centers the ship Image in the accepted cell.
Select the existing Cursor. A quit request exits before the final state update.
Tiles and Cursors can own Images, so they are closed before ImageMgr and the CDC archives.
The tutorial source is authoritative. The following listing is included directly from validation/source/Tutorial_07_Tileset.cpp.
#include "CRM64Pro.h"
#include "RunParameter.h"
#define BASEDIR "Base/"
#ifdef CRM64PRO_PLATFORM_WINDOWS
#define OUTPUTDIR "Win64/"
#elif defined(CRM64PRO_PLATFORM_LINUX)
#define OUTPUTDIR "Linux/"
#elif defined(CRM64PRO_PLATFORM_MACOS)
#define OUTPUTDIR "macOS/"
#endif
#define RESOURCE_TILE_IMAGE BASEDIR"tiles.bmp"
#define RESOURCE_BG_CDC_NAME "Tutorial_bg"
#define RESOURCE_PLAYER_CDC_NAME "Tutorial_ship"
#define RESOURCE_CURSOR_CDC_NAME "Tutorial_cursor"
#define RESOURCE_TILE_CDC_NAME "Tutorial_tiles"
#define OUTPUT_CDC OUTPUTDIR"Tutorial.cdc"
static const Sint32 iLogicRate = 20;
static const Sint32 iRenderRate = 0;
static const Sint32 iScreenW = 960;
static const Sint32 iScreenH = 540;
static const Sint32 iTileSize = 48;
static const Sint32 iMapW = 12;
static const Sint32 iMapH = 8;
static const Sint32 iMapX = (iScreenW - (iMapW * iTileSize)) / 2;
static const Sint32 iMapY = (iScreenH - (iMapH * iTileSize)) / 2;
static const Uint8 iTileStars = 1;
static const Uint8 iTileMoon = 2;
static const Uint8 iTileRedBlock = 3;
static const Uint8 iTileBlueBlock = 4;
static const Uint8 iMap[iMapH][iMapW] = {
{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
{ 3, 1, 1, 1, 2, 1, 1, 4, 1, 1, 2, 3 },
{ 3, 1, 4, 1, 3, 3, 1, 4, 1, 4, 1, 3 },
{ 3, 2, 4, 1, 1, 1, 1, 1, 1, 4, 1, 3 },
{ 3, 1, 4, 4, 4, 2, 4, 4, 1, 1, 1, 3 },
{ 3, 1, 1, 1, 1, 1, 4, 2, 1, 4, 1, 3 },
{ 3, 2, 4, 1, 4, 1, 1, 1, 1, 4, 2, 3 },
{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }
};
struct TutorialState
{
Sint32 idBgImage = -1;
Sint32 idPlayerImage = -1;
Sint32 idCursor = -1;
Sint32 idTileSet = -1;
Sint32 idBuiltInFont = -1;
Sint32 idDebugWindow = -1;
Sint32 iPlayerCellX = 1;
Sint32 iPlayerCellY = 1;
float fPlayerX = 0.0f;
float fPlayerY = 0.0f;
float fMouseX = 0.0f;
float fMouseY = 0.0f;
Sint32 iCurrentRenderRate = 0;
Sint32 iCurrentLogicRate = 0;
Sint32 iLogicFrames = 0;
};
static void logTaskOk(
Log& mLog)
{
}
static void logTaskFailed(
Log& mLog, Sint32 iCode)
{
mLog.msg(
LL_ERROR,
"FAILED (Code %d)\n", iCode);
}
static void logTaskFailed(
Log& mLog)
{
}
static bool isWalkableTile(Uint8 iTile)
{
return iTile == iTileStars || iTile == iTileMoon;
}
static bool isWalkableCell(Sint32 iCellX, Sint32 iCellY)
{
if(iCellX < 0 || iCellX >= iMapW) return false;
if(iCellY < 0 || iCellY >= iMapH) return false;
return isWalkableTile(iMap[iCellY][iCellX]);
}
static void placePlayerOnCell(TutorialState& rState,
const Image* pPlayerImage)
{
if(!pPlayerImage) return;
const float fCellCenterX = static_cast<float>(iMapX + rState.iPlayerCellX * iTileSize + iTileSize / 2);
const float fCellCenterY = static_cast<float>(iMapY + rState.iPlayerCellY * iTileSize + iTileSize / 2);
rState.fPlayerX = fCellCenterX -
static_cast<float>(pPlayerImage->
getWidth()) * 0.5f;
rState.fPlayerY = fCellCenterY -
static_cast<float>(pPlayerImage->
getHeight()) * 0.5f;
}
static void tryMovePlayer(TutorialState& rState,
Image* pPlayerImage, Sint32 iDX, Sint32 iDY,
Log& mLog)
{
const Sint32 iNextX = rState.iPlayerCellX + iDX;
const Sint32 iNextY = rState.iPlayerCellY + iDY;
if(!isWalkableCell(iNextX, iNextY))
{
mLog.msg(
LL_INFO,
" Movement blocked at cell %d, %d\n", iNextX, iNextY);
return;
}
rState.iPlayerCellX = iNextX;
rState.iPlayerCellY = iNextY;
placePlayerOnCell(rState, pPlayerImage);
mLog.msg(
LL_INFO,
" Ship moved to cell %d, %d\n", rState.iPlayerCellX, rState.iPlayerCellY);
}
static void updateLogic(TutorialState& rState)
{
rState.iLogicFrames++;
}
static void renderMap(
Tile* pTileSet)
{
if(!pTileSet) return;
for(Sint32 iY = 0; iY < iMapH; ++iY)
{
for(Sint32 iX = 0; iX < iMapW; ++iX)
{
pTileSet->
setPosition(
static_cast<float>(iMapX + iX * iTileSize),
static_cast<float>(iMapY + iY * iTileSize));
if(iMap[iY][iX] == iTileMoon)
{
}
pTileSet->
render(iMap[iY][iX]);
}
}
}
static void renderRates(
Font* pBuiltInFont,
const TutorialState& rState)
{
if(!pBuiltInFont) return;
char szRates[96];
snprintf(szRates, sizeof(szRates), "Render: %d fps Logic: %d fps", rState.iCurrentRenderRate, rState.iCurrentLogicRate);
pBuiltInFont->
render(szRates);
}
static void renderFrame(
Image* pBgImage,
Tile* pTileSet,
Image* pPlayerImage,
Font* pBuiltInFont,
const TutorialState& rState)
{
if(pBgImage) pBgImage->
render();
renderMap(pTileSet);
if(pPlayerImage)
{
SDL_FRect rDst = {
rState.fPlayerX,
rState.fPlayerY,
static_cast<float>(pPlayerImage->
getWidth()),
static_cast<float>(pPlayerImage->
getHeight())
};
pPlayerImage->
render(0,
nullptr, &rDst);
}
renderRates(pBuiltInFont, rState);
}
static Sint32 renderWrapper(Sint32, void* pObj)
{
TutorialState* pState = static_cast<TutorialState*>(pObj);
if(!pState) return 0;
renderFrame(pBgImage, pTileSet, pPlayerImage, pBuiltInFont, *pState);
return 0;
}
{
if(!pDebug) return;
}
static bool addTilesetToCDC(
Main& mC64,
Log& mLog)
{
mLog.msg(
LL_INFO,
" Find Tutorial 04 CDC: %s ... ", OUTPUT_CDC);
{
logTaskFailed(mLog);
return false;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Load tileset image: %s ... ", RESOURCE_TILE_IMAGE);
if(idTileImage < 0 || pTileImage == nullptr)
{
logTaskFailed(mLog, idTileImage);
return false;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Create tile from image ... ");
Sint32 idTileFile = mC64.
tileMgr().
create(RESOURCE_TILE_CDC_NAME);
if(idTileFile < 0 || pTileFile == nullptr)
{
logTaskFailed(mLog, idTileFile);
return false;
}
{
logTaskFailed(mLog);
return false;
}
if(!pTileFile->
setOffset(1, iTileSize, iTileSize))
{
logTaskFailed(mLog);
return false;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Save tileset to CDC ... ");
if(pTileFile->
save(OUTPUT_CDC, RESOURCE_TILE_CDC_NAME) < 0)
{
logTaskFailed(mLog);
return false;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close temporary tile ... ");
logTaskOk(mLog);
return true;
}
int main(int argc, char* argv[])
{
if(!runParameterReadRender(argc, argv, eRenderer)) return 1;
TutorialState state;
mLog.msg(
LL_INFO,
"\nSETUP: screen and timing\n");
mLog.msg(
LL_INFO,
" Initialize timer ... ");
{
logTaskFailed(mLog);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Set frame rates (render=%d, logic=%d) ... ", iRenderRate, iLogicRate);
{
logTaskFailed(mLog);
return -1;
}
logTaskOk(mLog);
pScreen->
setSize(iScreenW, iScreenH);
pScreen->
setTitle(
"CRM64Pro - Tutorial 07: Tileset");
mLog.msg(
LL_INFO,
" Create screen (%dx%d) ... ", iScreenW, iScreenH);
{
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Set render callback ... ");
if(!pScreen->
setRenderCallback([&state](Sint32 iMode) { return renderWrapper(iMode, &state); }))
{
logTaskFailed(mLog);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
"\nRESOURCES: add tileset and load from CDC\n");
if(!addTilesetToCDC(mC64, mLog))
{
return -1;
}
mLog.msg(
LL_INFO,
" Load background image from CDC ... ");
state.idBgImage = mC64.
imageMgr().
load(OUTPUT_CDC, RESOURCE_BG_CDC_NAME);
if(state.idBgImage < 0)
{
logTaskFailed(mLog, state.idBgImage);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Load ship image from CDC ... ");
state.idPlayerImage = mC64.
imageMgr().
load(OUTPUT_CDC, RESOURCE_PLAYER_CDC_NAME);
if(state.idPlayerImage < 0)
{
logTaskFailed(mLog, state.idPlayerImage);
return -1;
}
logTaskOk(mLog);
if(pPlayerImage == nullptr)
{
logTaskFailed(mLog);
return -1;
}
placePlayerOnCell(state, pPlayerImage);
mLog.msg(
LL_INFO,
" Load tileset from CDC ... ");
state.idTileSet = mC64.
tileMgr().
load(OUTPUT_CDC, RESOURCE_TILE_CDC_NAME);
if(state.idTileSet < 0 || pTileSet == nullptr)
{
logTaskFailed(mLog, state.idTileSet);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Load cursor from CDC ... ");
state.idCursor = mC64.
cursorMgr().
load(OUTPUT_CDC, RESOURCE_CURSOR_CDC_NAME);
if(state.idCursor < 0 || pCursor == nullptr)
{
logTaskFailed(mLog, state.idCursor);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Select cursor ... ");
{
logTaskFailed(mLog);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Load built-in font ... ");
if(state.idBuiltInFont < 0 || pBuiltInFont == nullptr)
{
logTaskFailed(mLog, state.idBuiltInFont);
return -1;
}
logTaskOk(mLog);
mLog.msg(
LL_INFO,
"\nTOOLS: debug window and console\n");
mLog.msg(
LL_INFO,
" Create debug window ... ");
if(!pDebug)
{
logTaskFailed(mLog, state.idDebugWindow);
return -1;
}
pDebug->
addWatch(
"Player cell X", &state.iPlayerCellX);
pDebug->
addWatch(
"Player cell Y", &state.iPlayerCellY);
pDebug->
addWatch(
"Player X",
nullptr, &state.fPlayerX);
pDebug->
addWatch(
"Player Y",
nullptr, &state.fPlayerY);
pDebug->
addWatch(
"Mouse X",
nullptr, &state.fMouseX);
pDebug->
addWatch(
"Mouse Y",
nullptr, &state.fMouseY);
pDebug->
addWatch(
"Render fps", &state.iCurrentRenderRate);
pDebug->
addWatch(
"Logic fps", &state.iCurrentLogicRate);
pDebug->
addWatch(
"Logic frames", &state.iLogicFrames);
logTaskOk(mLog);
if(pConsole) pConsole->
print(
"Tutorial 07: Tileset ready. Press ` to toggle the console.\n");
mLog.msg(
LL_INFO,
" [Q] / [ESC] Quit\n");
mLog.msg(
LL_INFO,
" [Arrow Keys] Move the ship to the next walkable tile\n");
mLog.msg(
LL_INFO,
" [D] Toggle debug window\n");
mLog.msg(
LL_INFO,
" [`] Toggle console\n");
mLog.msg(
LL_INFO,
" Any key or mouse button logs the input event\n");
SDL_Event event;
bool bRunning = true;
while(bRunning)
{
{
if(event.type == SDL_EVENT_QUIT)
{
bRunning = false;
}
else if(event.type == SDL_EVENT_KEY_DOWN)
{
mLog.msg(
LL_INFO,
" Key pressed: %s (%d)\n", SDL_GetKeyName(event.key.key), event.key.key);
if(event.key.key == SDLK_Q || event.key.key == SDLK_ESCAPE)
{
bRunning = false;
}
else if(event.key.key == SDLK_LEFT)
{
tryMovePlayer(state, pPlayerImage, -1, 0, mLog);
}
else if(event.key.key == SDLK_RIGHT)
{
tryMovePlayer(state, pPlayerImage, 1, 0, mLog);
}
else if(event.key.key == SDLK_UP)
{
tryMovePlayer(state, pPlayerImage, 0, -1, mLog);
}
else if(event.key.key == SDLK_DOWN)
{
tryMovePlayer(state, pPlayerImage, 0, 1, mLog);
}
else if(event.key.key == SDLK_D)
{
toggleDebugWindow(pDebug);
}
}
else if(event.type == SDL_EVENT_MOUSE_BUTTON_DOWN)
{
mLog.msg(
LL_INFO,
" Mouse clicked: button %d at %d, %d\n", event.button.button, (Sint32)event.button.x, (Sint32)event.button.y);
}
}
if(!bRunning) break;
state.iCurrentRenderRate =
static_cast<Sint32
>(mC64.
timer().getCurrentRFR());
state.iCurrentLogicRate =
static_cast<Sint32
>(mC64.
timer().getCurrentLFR());
updateLogic(state);
}
mLog.msg(
LL_INFO,
" Close debug window ... ");
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close fonts ... ");
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close tiles ... ");
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close cursors ... ");
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close images ... ");
logTaskOk(mLog);
mLog.msg(
LL_INFO,
" Close CDC archives ... ");
logTaskOk(mLog);
return 0;
}
Sint32 close(Sint32 idCDC) override
Close and destroy a CDC object.
Definition CoreArchive.cpp:2476
Screen * get(Sint32 idScreen=0)
Get a pointer to the screen using its handle.
Definition CoreConfig.cpp:1497
void setMTFriendly(Uint8 iDelayMS)
Set the multithread-friendly scheduler yield.
Definition CoreConfig.cpp:1183
Console Object class.
Definition CRM64Pro.h:9678
Cursor Object class.
Definition CRM64Pro.h:3734
float getY() const
Get the mouse cursor Y position.
Definition GraphicsCursor.cpp:1041
Sint32 select(Sint32 idCursor)
Select a mouse cursor.
Definition GraphicsCursor.cpp:968
bool show()
Make visible the selected mouse cursor.
Definition GraphicsCursor.cpp:1001
Sint32 load(const string &sCDCFile, const string &sName)
Load a cursor stored in a CDC file.
Definition GraphicsCursor.cpp:1115
Sint32 close(Sint32 idCursor) override
Close and destroy a cursor.
Definition GraphicsCursor.cpp:897
Cursor * get(Sint32 idCursor)
Get a pointer to the cursor using its handle.
Definition GraphicsCursor.cpp:962
float getX() const
Get the mouse cursor X position.
Definition GraphicsCursor.cpp:1035
DebugWindow Object class.
Definition CRM64Pro.h:9810
Font Object class.
Definition CRM64Pro.h:4741
Sint32 render(const string &sText, bool bShowCursor=false, Sint32 iCurPos=-1, Sint32 idRes=0)
Render a text using this font.
Definition GraphicsFont.cpp:1095
bool setPosition(const Position &rPosX, const Position &rPosY, bool bInterpolate=false)
Set the font position.
Definition GraphicsFont.cpp:1037
Sint32 getBuiltin(const string &sName)
Get a built-in embedded font id using its name.
Definition GraphicsFont.cpp:1436
Sint32 close(Sint32 idFont) override
Close and destroy a font.
Definition GraphicsFont.cpp:1363
Font * get(const string &sName)
Get a pointer to the font using its name.
Definition GraphicsFont.cpp:1235
Image Object class.
Definition CRM64Pro.h:3356
Sint32 setColorKey(Sint16 iR=-1, Sint16 iG=-1, Sint16 iB=-1)
Set colorkey used for rendering this image.
Definition GraphicsImage.cpp:1754
Sint32 getHeight() const
Get the image height.
Definition GraphicsImage.cpp:1839
Sint32 getWidth() const
Get the image width.
Definition GraphicsImage.cpp:1833
Sint32 render(Sint32 idRes=0, SDL_FRect *pSrc=nullptr, SDL_FRect *pDst=nullptr)
Render the image.
Definition GraphicsImage.cpp:1575
Image * get(Sint32 idImg)
Get a pointer to the image using its handle.
Definition GraphicsImage.cpp:2279
Sint32 loadFromFile(const string &sFile, const string &sName="")
Load an image from an external file (BMP, PNG, JPG, PCX, TGA or WebP formats).
Definition GraphicsImage.cpp:2434
Sint32 load(const string &sCDCFile, const string &sName)
Load an image stored in a CDC file.
Definition GraphicsImage.cpp:2476
Sint32 close(Sint32 idImg) override
Close and destroy an image.
Definition GraphicsImage.cpp:2178
Log Object class.
Definition CRM64Pro.h:771
CRM64Pro GDK Main class.
Definition CRM64Pro.h:502
Screen Object class.
Definition CRM64Pro.h:1055
Sint32 show()
Show the screen.
Definition CoreConfig.cpp:362
Sint32 setDriver(eConfigRendererDriver eCRD)
Set the renderer driver.
Definition CoreConfig.cpp:454
bool setRenderCallback(RenderCallback fnCallback)
Set a callback function for rendering graphics at Render Frame Rate.
Definition CoreConfig.cpp:765
Sint32 setSize(Sint32 iWidth, Sint32 iHeight)
Set the size of the screen.
Definition CoreConfig.cpp:526
bool setTitle(const string &sName)
Set the title.
Definition CoreConfig.cpp:674
Tile Object class.
Definition CRM64Pro.h:3998
void setStatsLevel(eMemStatsLevel eMSL)
Set the memory stats gathering level.
Definition CMemoryManager.cpp:618
void destroy()
Releases the internal heap and displays final stats.
Definition CMemoryManager.cpp:954
@ MSL_NORMAL
Collect allocations per module (CRM64Pro and user). Default for debug builds.
Definition CRM64Pro.h:386
eConfigRendererDriver
Screen renderer drivers.
Definition CRM64Pro.h:1013
@ CRD_SOFTWARE
Screen::setDriver(): software renderer driver. Slow but works on all platforms.
Definition CRM64Pro.h:1015
Sint32 create(const string &sName, Uint32 iType=CRM64PRO_GUI_PANEL) override
Creates a new GUI object.
Definition GUI.cpp:1051
Sint32 addWatch(const string &sName, Sint32 *iIntegerVar, float *fFloatVar=nullptr)
Add a watch.
Definition GUIDebugWindow.cpp:275
#define CRM64PRO_GUI_DEBUGWINDOW
Definition CRM64Pro.h:9195
Widget & baseWidget()
Get the reference to base Widget for this object.
Definition GUIDebugWindow.cpp:269
Sint32 print(const char *format,...)
Print a formatted message to the console.
Definition GUIConsole.cpp:403
Console * getConsole(Sint32 idGUI=CRM64PRO_GUI_CONSOLE)
Get a pointer to a Console using its handle.
Definition GUI.cpp:1366
DebugWindow * getDebugWindow(Sint32 idGUI)
Get a pointer to a DebugWindow using its handle.
Definition GUI.cpp:1375
Sint32 close(Sint32 idGUI) override
Close and destroy a GUI object.
Definition GUI.cpp:1168
Log * get(Sint32 idLog=0)
Get a pointer to the log object.
Definition CoreLog.cpp:921
bool init(const string &sAppname, eLogLevel eLL, eLogMode eLM, const string &sFilename="", const string &sAuthor="", const string &sEmail="", const string &sWeb="")
Initialize the log object.
Definition CoreLog.cpp:338
@ LM_FILE
Log output mode for the 'lm' parameter in CRM64Pro::Log::init(). Output to a file and overwrite exist...
Definition CRM64Pro.h:748
@ LM_STDOUT
Log output mode for the 'lm' parameter in CRM64Pro::Log::init(). Output to standard output (stdout).
Definition CRM64Pro.h:750
@ LL_INFO
Runtime events (startup/shutdown). Messages without timestamp.
Definition CRM64Pro.h:764
@ LL_DEBUG
Detailed information for flow control.
Definition CRM64Pro.h:765
@ LL_CRITICAL
Fatal errors, application crash, or assertions.
Definition CRM64Pro.h:761
@ LL_ERROR
Runtime errors that do not require immediate termination.
Definition CRM64Pro.h:762
TileMgr & tileMgr()
Get reference to Tile Manager.
Definition CoreMain.cpp:766
GUIMgr & guiMgr()
Get reference to GUI Manager.
Definition CoreMain.cpp:808
Timer & timer()
Get reference to Timer module.
Definition CoreMain.cpp:730
Sint32 update(SDL_Event *evUser=nullptr)
Manage the GDK update cycle with a fixed virtual logic frame rate.
Definition CoreMain.cpp:451
ImageMgr & imageMgr()
Get reference to Image Manager.
Definition CoreMain.cpp:754
CursorMgr & cursorMgr()
Get reference to Cursor Manager.
Definition CoreMain.cpp:760
static void terminate()
Main explicit destructor.
Definition CoreMain.cpp:266
static Main & instance()
Access the Main singleton.
Definition CoreMain.cpp:252
LogMgr & logMgr()
Get reference to Log Manager.
Definition CoreMain.cpp:724
Tool & tool()
Get reference to Tool module.
Definition CoreMain.cpp:718
ArchiveMgr & archiveMgr()
Get reference to Archive Manager.
Definition CoreMain.cpp:736
FontMgr & fontMgr()
Get reference to Font Manager.
Definition CoreMain.cpp:778
ConfigMgr & configMgr()
Get reference to Config Manager.
Definition CoreMain.cpp:712
@ GS_SHOWN
General status: enabled and shown.
Definition CRM64Pro.h:300
@ PH_RIGHT
Widget/Font: right with optional offset. Scene: align to map right/end (MapWidth - ViewportWidth)....
Definition CRM64Pro.h:340
@ PH_TOP
Widget/Font: top with optional offset. Scene: align to map top/begin (0.0). Valid for Y axis.
Definition CRM64Pro.h:337
bool info(Sint32 iMode=0) override
Request Tile Manager information.
Definition GraphicsTile.cpp:702
Sint32 load(const string &sCDCFile, const string &sName)
Load a tile stored in a CDC file.
Definition GraphicsTile.cpp:905
Tile * get(Sint32 idTile)
Get a pointer to the tile using its handle.
Definition GraphicsTile.cpp:850
bool setOffset(Sint32 iTSMode, Sint32 iX, Sint32 iY)
Set tileset mode and offset.
Definition GraphicsTile.cpp:351
Sint32 close(Sint32 idTile) override
Close and destroy a tile.
Definition GraphicsTile.cpp:785
Sint32 render(Sint32 iTS=1, Sint32 idRes=0)
Render the tile.
Definition GraphicsTile.cpp:438
Sint32 create(const string &sName, Uint32 iVersion=10) override
Create a new tile.
Definition GraphicsTile.cpp:744
Sint32 assignImage(Sint32 idImage, Sint32 iOwnership=0)
Assign an Image to this tile.
Definition GraphicsTile.cpp:281
Sint32 save(const string &sCDCFile, const string &sResourceName="")
Save the tile to a CDC file.
Definition GraphicsTile.cpp:554
bool setPosition(float fX, float fY)
Set the tile position.
Definition GraphicsTile.cpp:410
bool init(eTimerState eState=TS_INIT)
Initialize the timer system.
Definition CoreTimer.cpp:543
bool setRate(Uint16 iR, Uint16 iL)
Set preferred Render and Logic Frame Rate.
Definition CoreTimer.cpp:556
CRM64Pro GDK.
Definition AudioTrack.cpp:36
Absolute coordinate or helper-relative position used by layout APIs.
Definition CRM64Pro.h:346