mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +01:00
BSOD: fix placement of the second-last line
This commit is contained in:
parent
e2d9d21f3f
commit
0cfef4ddca
1 changed files with 4 additions and 4 deletions
|
@ -241,8 +241,8 @@ SYMBOL_EXPORT void FatalError(struct Game* game, bool exit, char* format, ...) {
|
|||
const int lines = ceil(error_w / (al_get_display_width(game->display) * 0.8));
|
||||
const int letters_per_line = (error_len / lines) + 1;
|
||||
|
||||
int row = 5, l = 0;
|
||||
for (; l < lines; ++l) {
|
||||
int row = 5;
|
||||
for (int l = 0; l < lines; ++l) {
|
||||
int start = l * letters_per_line;
|
||||
unsigned int end = (l + 1) * letters_per_line;
|
||||
if (end >= sizeof(text)) {
|
||||
|
@ -263,11 +263,11 @@ SYMBOL_EXPORT void FatalError(struct Game* game, bool exit, char* format, ...) {
|
|||
|
||||
++row;
|
||||
if (exit) {
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx - head2w / 2, (int)(offsety + 11 * fonth * 1.25), ALLEGRO_ALIGN_LEFT, "This is fatal error. My bad.");
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx - head2w / 2, (int)(offsety + row * fonth * 1.25), ALLEGRO_ALIGN_LEFT, "This is fatal error. My bad.");
|
||||
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx, (int)(offsety + (row + 2) * fonth * 1.25), ALLEGRO_ALIGN_CENTRE, "Press any key to quit _");
|
||||
} else {
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx - head2w / 2, (int)(offsety + 11 * fonth * 1.25), ALLEGRO_ALIGN_LEFT, "Anything I can do to help?");
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx - head2w / 2, (int)(offsety + row * fonth * 1.25), ALLEGRO_ALIGN_LEFT, "Anything I can do to help?");
|
||||
|
||||
al_draw_text(game->_priv.font_bsod, al_map_rgb(255, 255, 255), offsetx, (int)(offsety + (row + 2) * fonth * 1.25), ALLEGRO_ALIGN_CENTRE, "Press any key to continue _");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue