Diff for games/_shared/winbgim.cpp between version 1.3 and 1.4
| version 1.3, 2003/07/12 12:56:17 |
version 1.4, 2003/07/16 19:54:41 |
| Line 161 static char* font_name[] = |
|
| Line 161 static char* font_name[] = |
|
| "Courier New Bold", // BoldFont |
"Courier New Bold", // BoldFont |
| }; |
}; |
| static int text_halign_cnv[] = {TA_LEFT, TA_CENTER, TA_RIGHT}; |
static int text_halign_cnv[] = {TA_LEFT, TA_CENTER, TA_RIGHT}; |
| static int text_valign_cnv[] = {TA_BOTTOM, TA_BASELINE, TA_TOP}; |
static int text_valign_cnv[] = {TA_BOTTOM, TA_TOP /* TA_BASELINE */, TA_TOP}; |
| static palettetype current_palette; |
static palettetype current_palette; |
| static struct { int width; int height; } font_metrics[][11] = { |
static struct { int width; int height; } font_metrics[][11] = { |
| {{0,0},{8,8},{16,16},{24,24},{32,32},{40,40},{48,48},{56,56},{64,64},{72,72},{80,80}}, // DefaultFont |
{{0,0},{8,8},{16,16},{24,24},{32,32},{40,40},{48,48},{56,56},{64,64},{72,72},{80,80}}, // DefaultFont |
| Line 1069 void outtext(const char* str) |
|
| Line 1069 void outtext(const char* str) |
|
| SetTextAlign(hdc[1], align); |
SetTextAlign(hdc[1], align); |
| } |
} |
| |
|
| |
/* Win API does not have known possibility of vertical centered text. |
| |
This is and emulation hack. See notes below in outtextxy() function. */ |
| |
if (text_settings.vert == CENTER_TEXT) { |
| |
text_output(0, 0 - textheight(str) / 2, str); |
| |
return; |
| |
} |
| |
|
| text_output(0, 0, str); |
text_output(0, 0, str); |
| } |
} |
| |
|
| Line 1087 void outtextxy(int x, int y, const char* |
|
| Line 1094 void outtextxy(int x, int y, const char* |
|
| SetTextAlign(hdc[1], align); |
SetTextAlign(hdc[1], align); |
| } |
} |
| |
|
| |
/* Win API does not have known possibility of vertical centered text. |
| |
There is a TA_BASELINE constant, which differs from TA_BOTTOM, but it is |
| |
still centered text. Thus vertical centered text is emulated using TA_TOP |
| |
and addition of half of textheight(str). */ |
| |
if (text_settings.vert == CENTER_TEXT) { |
| |
text_output(x, y - textheight(str) / 2, str); |
| |
return; |
| |
} |
| |
|
| text_output(x, y, str); |
text_output(x, y, str); |
| } |
} |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|