diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 13:05:27 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 13:05:27 +1000 |
commit | cbf1d4dfa095bc1fae927228ad108b6086738f01 (patch) | |
tree | 158ad908c0cd4d2f96218dfbbf8eb647c2609b91 /demos/games | |
parent | a24fab0d7217aaae1463f62d5d1381ef820cfa17 (diff) | |
download | uGFX-cbf1d4dfa095bc1fae927228ad108b6086738f01.tar.gz uGFX-cbf1d4dfa095bc1fae927228ad108b6086738f01.tar.bz2 uGFX-cbf1d4dfa095bc1fae927228ad108b6086738f01.zip |
Added type gFont to replace V2.x font_t
Diffstat (limited to 'demos/games')
-rw-r--r-- | demos/games/justget10/jg10.c | 2 | ||||
-rw-r--r-- | demos/games/justget10/main.c | 2 | ||||
-rw-r--r-- | demos/games/minesweeper/main.c | 2 | ||||
-rw-r--r-- | demos/games/minesweeper/mines.c | 10 | ||||
-rw-r--r-- | demos/games/tetris/tetris.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/demos/games/justget10/jg10.c b/demos/games/justget10/jg10.c index 7d5f8a46..160be7a7 100644 --- a/demos/games/justget10/jg10.c +++ b/demos/games/justget10/jg10.c @@ -30,7 +30,7 @@ gdispImage jg10Image[JG10_MAX_COUNT]; const char *jg10GraphAnim[] = {"a1.bmp","a2.bmp","a3.bmp","a4.bmp","background.bmp"}; // 5 elements (0-4) gdispImage jg10ImageAnim[JG10_ANIM_IMAGES]; uint8_t jg10MaxVal=4; // Max value in field... -font_t font; +gFont font; #if JG10_SHOW_SPLASH GTimer jg10SplashBlink; gBool jg10SplashTxtVisible = gFalse; diff --git a/demos/games/justget10/main.c b/demos/games/justget10/main.c index d4238fed..c41c152b 100644 --- a/demos/games/justget10/main.c +++ b/demos/games/justget10/main.c @@ -5,7 +5,7 @@ int main(void) { GEventMouse ev; #if !JG10_SHOW_SPLASH - font_t font; + gFont font; #endif gfxInit(); diff --git a/demos/games/minesweeper/main.c b/demos/games/minesweeper/main.c index 54b79743..dad36aaf 100644 --- a/demos/games/minesweeper/main.c +++ b/demos/games/minesweeper/main.c @@ -40,7 +40,7 @@ int main(void) { GEventMouse ev; #if !MINES_SHOW_SPLASH - font_t font; + gFont font; #endif gfxInit(); diff --git a/demos/games/minesweeper/mines.c b/demos/games/minesweeper/mines.c index 1b58fc6b..19d8c373 100644 --- a/demos/games/minesweeper/mines.c +++ b/demos/games/minesweeper/mines.c @@ -93,7 +93,7 @@ static void printStats(void) { char pps_str[12]; - font_t font = gdispOpenFont("fixed_5x8"); + gFont font = gdispOpenFont("fixed_5x8"); uitoa(MINES_MINE_COUNT, pps_str, sizeof(pps_str)); gdispFillString(minesStatusIconWidth+8, gdispGetHeight()-11, " ", font, GFX_BLACK, GFX_BLACK); gdispDrawString(minesStatusIconWidth+8, gdispGetHeight()-11, pps_str, font, GFX_WHITE); @@ -110,7 +110,7 @@ static void minesUpdateTime(void) if (minesTime > 9999) minesTime = 9999; - font_t font = gdispOpenFont("digital_7__mono_20"); + gFont font = gdispOpenFont("digital_7__mono_20"); uitoa(minesTime, pps_str, sizeof(pps_str)); gdispFillArea((MINES_FIELD_WIDTH*MINES_CELL_WIDTH)-gdispGetStringWidth("9999", font), gdispGetHeight()-15, gdispGetWidth(), 15, GFX_BLACK); gdispDrawString((MINES_FIELD_WIDTH*MINES_CELL_WIDTH)-gdispGetStringWidth(pps_str, font), gdispGetHeight()-15, pps_str, font, GFX_LIME); @@ -251,7 +251,7 @@ static DECLARE_THREAD_FUNCTION(thdMines, msg) static void printGameOver(void) { if (minesGameOver) { - font_t font = gdispOpenFont("DejaVuSans16"); + gFont font = gdispOpenFont("DejaVuSans16"); if (minesGameWinner) { gdispDrawString((gdispGetWidth()-gdispGetStringWidth("You LIVE!", font))/2, gdispGetHeight()-15, "You LIVE!", font, GFX_WHITE); } else { @@ -271,7 +271,7 @@ static void initField(void) minesGameOver = gFalse; printGameOver(); - font_t font = gdispOpenFont("fixed_5x8"); + gFont font = gdispOpenFont("fixed_5x8"); gdispImageOpenFile(&minesImage, "plainmine.bmp"); // Saving status icons width/height for later use minesStatusIconWidth = minesImage.width; @@ -391,7 +391,7 @@ void minesStart(void) if (!minesGameWinner) { // Print generated mines for player to see - font_t font = gdispOpenFont("fixed_10x20"); + gFont font = gdispOpenFont("fixed_10x20"); for (x = 0; x < MINES_FIELD_WIDTH; x++) { for (y = 0; y < MINES_FIELD_HEIGHT; y++) { if (minesField[x][y].num == 9 && !minesField[x][y].flag) { diff --git a/demos/games/tetris/tetris.c b/demos/games/tetris/tetris.c index e24c5122..53c0e34b 100644 --- a/demos/games/tetris/tetris.c +++ b/demos/games/tetris/tetris.c @@ -89,8 +89,8 @@ unsigned long tetrisScore = 0; gBool tetrisKeysPressed[5] = {gFalse, gFalse, gFalse, gFalse, gFalse}; // left/down/right/up/pause gBool tetrisPaused = gFalse; gBool tetrisGameOver = gFalse; -font_t font16; -font_t font12; +gFont font16; +gFont font12; GEventMouse ev; |