clear screen after set mode
This commit is contained in:
parent
3263f93f61
commit
d2d64fff10
|
@ -1241,7 +1241,7 @@ Do not use lua compiler luac, it produces platform-dependent code!
|
|||
But game compilation is useful to find errors in the game code.
|
||||
|
||||
==== Switching between players ====
|
||||
You can create a game with several characters and switch between them from time to time (see “switch_pl”). But you can also use the same trick to switch between different types of inventory.
|
||||
You can create a game with several characters and switch between them from time to time (see “change_pl”). But you can also use the same trick to switch between different types of inventory.
|
||||
|
||||
==== Using the first parameter of a handler ====
|
||||
Code example.
|
||||
|
|
|
@ -1232,7 +1232,7 @@ doencfile("game");
|
|||
Однако, компиляция игр может быть использована для поиска ошибок в коде.
|
||||
|
||||
==== Переключение между игроками ====
|
||||
Вы можете создать игру с несколькими персонажами и время от времени переключаться между ними (см. switch_pl). Но вы можете также использовать этот трюк для того, что бы иметь возможность переключаться между разными типами инвентаря.
|
||||
Вы можете создать игру с несколькими персонажами и время от времени переключаться между ними (см. change_pl). Но вы можете также использовать этот трюк для того, что бы иметь возможность переключаться между разными типами инвентаря.
|
||||
|
||||
==== Использование первого параметра обработчика ====
|
||||
Пример кода.
|
||||
|
|
|
@ -704,6 +704,7 @@ int game_theme_update(void)
|
|||
|
||||
int game_theme_init(void)
|
||||
{
|
||||
color_t col = { .r = 0, .g = 0, .b = 0 };
|
||||
int w = opt_mode[0];
|
||||
int h = opt_mode[1];
|
||||
|
||||
|
@ -719,7 +720,7 @@ int game_theme_init(void)
|
|||
opt_mode[0] = opt_mode[1] = -1; opt_fs = 0; /* safe options */
|
||||
return -1;
|
||||
}
|
||||
|
||||
gfx_fill(0, 0, game_theme.w, game_theme.h, col);
|
||||
if (game_theme_update_data()) {
|
||||
fprintf(stderr, "Can not init theme!\n");
|
||||
game_theme_free();
|
||||
|
|
Loading…
Reference in a new issue