projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20070310-2-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 104b6e4dbc164dc11b213b1feae0ef2b2821c91b..207be5f457a86e581b913aa095390bc803cc2381 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1290,14
+1290,14
@@
void DrawGameValue_Emeralds(int value)
struct TextPosInfo *pos = &game.panel.gems;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
struct TextPosInfo *pos = &game.panel.gems;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
- int
digit
s = pos->chars;
+ int
char
s = pos->chars;
if (PANEL_DEACTIVATED(pos))
return;
if (PANEL_DEACTIVATED(pos))
return;
- pos->width =
digit
s * font_width;
+ pos->width =
char
s * font_width;
- DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
digit
s), font_nr);
+ DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
char
s), font_nr);
}
void DrawGameValue_Dynamite(int value)
}
void DrawGameValue_Dynamite(int value)
@@
-1305,14
+1305,14
@@
void DrawGameValue_Dynamite(int value)
struct TextPosInfo *pos = &game.panel.inventory;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
struct TextPosInfo *pos = &game.panel.inventory;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
- int
digit
s = pos->chars;
+ int
char
s = pos->chars;
if (PANEL_DEACTIVATED(pos))
return;
if (PANEL_DEACTIVATED(pos))
return;
- pos->width =
digit
s * font_width;
+ pos->width =
char
s * font_width;
- DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
digit
s), font_nr);
+ DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
char
s), font_nr);
}
void DrawGameValue_Score(int value)
}
void DrawGameValue_Score(int value)
@@
-1320,42
+1320,42
@@
void DrawGameValue_Score(int value)
struct TextPosInfo *pos = &game.panel.score;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
struct TextPosInfo *pos = &game.panel.score;
int font_nr = FONT_TEXT_2;
int font_width = getFontWidth(font_nr);
- int
digit
s = pos->chars;
+ int
char
s = pos->chars;
if (PANEL_DEACTIVATED(pos))
return;
if (PANEL_DEACTIVATED(pos))
return;
- pos->width =
digit
s * font_width;
+ pos->width =
char
s * font_width;
- DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
digit
s), font_nr);
+ DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
char
s), font_nr);
}
void DrawGameValue_Time(int value)
{
struct TextPosInfo *pos = &game.panel.time;
static int last_value = -1;
}
void DrawGameValue_Time(int value)
{
struct TextPosInfo *pos = &game.panel.time;
static int last_value = -1;
- int
digit
s1 = 3;
- int
digit
s2 = 4;
- int
digit
s = pos->chars;
+ int
char
s1 = 3;
+ int
char
s2 = 4;
+ int
char
s = pos->chars;
int font1_nr = FONT_TEXT_2;
int font2_nr = FONT_TEXT_1;
int font_nr = font1_nr;
int font1_nr = FONT_TEXT_2;
int font2_nr = FONT_TEXT_1;
int font_nr = font1_nr;
- boolean use_dynamic_
digits = (digit
s == -1 ? TRUE : FALSE);
+ boolean use_dynamic_
chars = (char
s == -1 ? TRUE : FALSE);
if (PANEL_DEACTIVATED(pos))
return;
if (PANEL_DEACTIVATED(pos))
return;
- if (use_dynamic_
digits) /* use dynamic number of digit
s */
+ if (use_dynamic_
chars) /* use dynamic number of char
s */
{
{
-
digits = (value < 1000 ? digits1 : digit
s2);
+
chars = (value < 1000 ? chars1 : char
s2);
font_nr = (value < 1000 ? font1_nr : font2_nr);
}
font_nr = (value < 1000 ? font1_nr : font2_nr);
}
- /* clear background if value just changed its size (dynamic
digit
s only) */
- if (use_dynamic_
digit
s && (last_value < 1000) != (value < 1000))
+ /* clear background if value just changed its size (dynamic
char
s only) */
+ if (use_dynamic_
char
s && (last_value < 1000) != (value < 1000))
{
{
- int width1 =
digit
s1 * getFontWidth(font1_nr);
- int width2 =
digit
s2 * getFontWidth(font2_nr);
+ int width1 =
char
s1 * getFontWidth(font1_nr);
+ int width2 =
char
s2 * getFontWidth(font2_nr);
int max_width = MAX(width1, width2);
int max_height = MAX(getFontHeight(font1_nr), getFontHeight(font2_nr));
int max_width = MAX(width1, width2);
int max_height = MAX(getFontHeight(font1_nr), getFontHeight(font2_nr));
@@
-1365,9
+1365,9
@@
void DrawGameValue_Time(int value)
max_width, max_height);
}
max_width, max_height);
}
- pos->width =
digit
s * getFontWidth(font_nr);
+ pos->width =
char
s * getFontWidth(font_nr);
- DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
digit
s), font_nr);
+ DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
char
s), font_nr);
last_value = value;
}
last_value = value;
}
@@
-1375,26
+1375,26
@@
void DrawGameValue_Time(int value)
void DrawGameValue_Level(int value)
{
struct TextPosInfo *pos = &game.panel.level;
void DrawGameValue_Level(int value)
{
struct TextPosInfo *pos = &game.panel.level;
- int
digit
s1 = 2;
- int
digit
s2 = 3;
- int
digit
s = pos->chars;
+ int
char
s1 = 2;
+ int
char
s2 = 3;
+ int
char
s = pos->chars;
int font1_nr = FONT_TEXT_2;
int font2_nr = FONT_TEXT_1;
int font_nr = font1_nr;
int font1_nr = FONT_TEXT_2;
int font2_nr = FONT_TEXT_1;
int font_nr = font1_nr;
- boolean use_dynamic_
digits = (digit
s == -1 ? TRUE : FALSE);
+ boolean use_dynamic_
chars = (char
s == -1 ? TRUE : FALSE);
if (PANEL_DEACTIVATED(pos))
return;
if (PANEL_DEACTIVATED(pos))
return;
- if (use_dynamic_
digits) /* use dynamic number of digit
s */
+ if (use_dynamic_
chars) /* use dynamic number of char
s */
{
{
-
digits = (level_nr < 100 ? digits1 : digit
s2);
+
chars = (level_nr < 100 ? chars1 : char
s2);
font_nr = (level_nr < 100 ? font1_nr : font2_nr);
}
font_nr = (level_nr < 100 ? font1_nr : font2_nr);
}
- pos->width =
digit
s * getFontWidth(font_nr);
+ pos->width =
char
s * getFontWidth(font_nr);
- DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
digit
s), font_nr);
+ DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value,
char
s), font_nr);
}
void DrawGameValue_Keys(int key[MAX_NUM_KEYS])
}
void DrawGameValue_Keys(int key[MAX_NUM_KEYS])