From f412a71587b7df80fc6b5d2630121d039a158053 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Fri, 28 Aug 2009 16:36:10 +0000
Subject: [PATCH] 0.8.7
---
Rules.make.standalone | 2 +-
Rules.make.system | 2 +-
Rules.windows | 2 +-
debian/changelog | 7 +++++++
desktop/instead.desktop.in | 2 +-
doc/writing_games.txt | 2 ++
src/sdl-instead/game.c | 13 +++++++++----
src/sdl-instead/graphics.c | 5 ++++-
src/sdl-instead/windows.c | 11 +++++++++--
stead/stead.lua | 2 +-
10 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/Rules.make.standalone b/Rules.make.standalone
index 22c9a4b..2b34081 100644
--- a/Rules.make.standalone
+++ b/Rules.make.standalone
@@ -1,4 +1,4 @@
-VERSION := \"0.8.6\"
+VERSION := \"0.8.7\"
DESTDIR=
BIN=
diff --git a/Rules.make.system b/Rules.make.system
index 4dffdee..24e13ae 100644
--- a/Rules.make.system
+++ b/Rules.make.system
@@ -1,4 +1,4 @@
-VERSION := \"0.8.6\"
+VERSION := \"0.8.7\"
DESTDIR=/usr/local
BIN=$(DESTDIR)/bin/
diff --git a/Rules.windows b/Rules.windows
index 6e902f7..4559349 100644
--- a/Rules.windows
+++ b/Rules.windows
@@ -1,4 +1,4 @@
-VERSION := \"0.8.6\"
+VERSION := \"0.8.7\"
DESTDIR=
BIN=..\..\bin\\
diff --git a/debian/changelog b/debian/changelog
index 608f292..d0453d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+instead (0.8.7) unstable; urgency=low
+
+ * highlight bug in nohl mode with filter
+ * windows version now looks games and themes in appdir.
+
+ -- Peter Kosyh Fri, 28 Aug 2009 12:51:08 +0400
+
instead (0.8.6) unstable; urgency=low
* cat game fixes
diff --git a/desktop/instead.desktop.in b/desktop/instead.desktop.in
index 366374b..ed718f5 100644
--- a/desktop/instead.desktop.in
+++ b/desktop/instead.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
-Version=0.8.6
+Version=0.8.7
Type=Application
Name=INSTEAD
Name[ru]=INSTEAD
diff --git a/doc/writing_games.txt b/doc/writing_games.txt
index feb9a4f..99a402b 100644
--- a/doc/writing_games.txt
+++ b/doc/writing_games.txt
@@ -29,6 +29,7 @@
}}}
Графический интерпретатор ищет доступные игры в каталоге games. Unix версия интерпретатора кроме этого каталога просматривает также игры в каталоге ~/.instead/games.
+Windows версия (>=0.8.7): Documents and Settings//Local Settings/Application Data/instead/games.
== 1. Сцена ==
@@ -961,6 +962,7 @@ scr.gfx.h = 500
Интерпретатор выполняет поиск тем в каталоге themes. Unix версия кроме этого каталога, просматривает также каталог ~/.instead/themes/
+Windows версия (>=0.8.7): Documents and Settings//Local Settings/Application Data/instead/themes
TODO
Полный список объектов и методов.
diff --git a/src/sdl-instead/game.c b/src/sdl-instead/game.c
index d561a6b..cf35d67 100644
--- a/src/sdl-instead/game.c
+++ b/src/sdl-instead/game.c
@@ -21,8 +21,15 @@
#endif
int opt_fsize = 0;
+#ifndef MAEMO
int opt_fs = 0;
+int opt_owntheme = 1;
int opt_hl = 1;
+#else
+int opt_fs = 1;
+int opt_owntheme = 0;
+int opt_hl = 0;
+#endif
int opt_hz = 22050;
int opt_vol = 127;
int opt_motion = 1;
@@ -30,7 +37,6 @@ int opt_click = 1;
int opt_music = 1;
int opt_autosave = 1;
int opt_filter = 1;
-int opt_owntheme = 1;
char *opt_game = NULL;
char *opt_theme = NULL;
char *err_msg = NULL;
@@ -2391,11 +2397,10 @@ int game_highlight(int x, int y, int on)
static xref_t hxref = NULL;
xref_t xref = NULL;
int up = 0;
- if (!opt_hl)
- return 0;
+
if (on) {
xref = look_xref(x, y, &elem);
- if (xref) {
+ if (xref && opt_hl) {
game_cursor(-1);
xref_set_active(xref, 1);
xref_update(xref, elem->x, elem->y, game_clear);
diff --git a/src/sdl-instead/graphics.c b/src/sdl-instead/graphics.c
index 8570f49..ebd1736 100644
--- a/src/sdl-instead/graphics.c
+++ b/src/sdl-instead/graphics.c
@@ -445,8 +445,11 @@ int gfx_setmode(int w, int h, int fs)
{
gfx_width = w;
gfx_height = h;
-
+#ifndef MAEMO
screen = SDL_SetVideoMode(gfx_width, gfx_height, 32, SDL_DOUBLEBUF | SDL_HWSURFACE | ( ( fs ) ? SDL_FULLSCREEN : 0 ) );
+#else
+ screen = SDL_SetVideoMode(gfx_width, gfx_height, 16, SDL_DOUBLEBUF | SDL_HWSURFACE | ( ( fs ) ? SDL_FULLSCREEN : 0 ) );
+#endif
if (screen == NULL) {
fprintf(stderr, "Unable to set %dx%d video: %s\n", w, h, SDL_GetError());
return -1;
diff --git a/src/sdl-instead/windows.c b/src/sdl-instead/windows.c
index 17ba7a7..f67e98c 100644
--- a/src/sdl-instead/windows.c
+++ b/src/sdl-instead/windows.c
@@ -14,6 +14,9 @@
extern char *curgame;
extern char *curgame_dir;
+static char local_games_path[PATH_MAX];
+static char local_themes_path[PATH_MAX];
+
static char save_path[PATH_MAX];
void nsleep(int u)
@@ -21,14 +24,18 @@ void nsleep(int u)
Sleep(u);
}
+char *app_dir( void );
+
char *game_local_games_path(void)
{
- return NULL; /* TODO ? */
+ snprintf(local_games_path, sizeof(local_games_path) - 1 , "%s/instead/games/", app_dir());
+ return local_games_path;
}
char *game_local_themes_path(void)
{
- return NULL; /* TODO ? */
+ snprintf(local_themes_path, sizeof(local_themes_path) - 1 , "%s/instead/themes/", app_dir());
+ return local_themes_path;
}
extern void unix_path(char *);
diff --git a/stead/stead.lua b/stead/stead.lua
index c89efb7..c58e59d 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -1247,7 +1247,7 @@ function game_step(self)
return game_life(self);
end
-version = "0.8.6";
+version = "0.8.7";
game = game {
nam = "INSTEAD -- Simple Text Adventure interpreter v"..version.." '2009 by Peter Kosyh",