From d2d64fff10dad81c5e15e15d10a8c2ea6cad62f0 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Fri, 15 Apr 2011 12:05:47 +0000
Subject: [PATCH] clear screen after set mode
---
doc/writing_games-en.txt | 2 +-
doc/writing_games.txt | 2 +-
src/sdl-instead/themes.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/doc/writing_games-en.txt b/doc/writing_games-en.txt
index 81fa166..b837437 100644
--- a/doc/writing_games-en.txt
+++ b/doc/writing_games-en.txt
@@ -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.
diff --git a/doc/writing_games.txt b/doc/writing_games.txt
index 13c6fc2..4209400 100644
--- a/doc/writing_games.txt
+++ b/doc/writing_games.txt
@@ -1232,7 +1232,7 @@ doencfile("game");
Однако, компиляция игр может быть использована для поиска ошибок в коде.
==== Переключение между игроками ====
-Вы можете создать игру с несколькими персонажами и время от времени переключаться между ними (см. switch_pl). Но вы можете также использовать этот трюк для того, что бы иметь возможность переключаться между разными типами инвентаря.
+Вы можете создать игру с несколькими персонажами и время от времени переключаться между ними (см. change_pl). Но вы можете также использовать этот трюк для того, что бы иметь возможность переключаться между разными типами инвентаря.
==== Использование первого параметра обработчика ====
Пример кода.
diff --git a/src/sdl-instead/themes.c b/src/sdl-instead/themes.c
index 0321c43..00671af 100644
--- a/src/sdl-instead/themes.c
+++ b/src/sdl-instead/themes.c
@@ -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();