[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src win_theme.cc,1.4,1.5 types.h,1.15
From: |
Alexandre Courbot <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src win_theme.cc,1.4,1.5 types.h,1.15,1.16 screen.cc,1.12,1.13 prefs.cc,1.17,1.18 nls.cc,1.4,1.5 music_ogg.c,1.3,1.4 mapview.cc,1.13,1.14 main.cc,1.43,1.44 image.cc,1.9,1.10 game.cc,1.25,1.26 event.h,1.25,1.26 dialog_screen.cc,1.5,1.6 audio.cc,1.30,1.31 adonthell.cc,1.5,1.6 |
Date: |
Thu, 25 Apr 2002 11:34:14 -0400 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv28021/src
Modified Files:
win_theme.cc types.h screen.cc prefs.cc nls.cc music_ogg.c
mapview.cc main.cc image.cc game.cc event.h dialog_screen.cc
audio.cc adonthell.cc
Log Message:
FIXED several things to make the beast compile under Windows.
Index: win_theme.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/win_theme.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** win_theme.cc 23 Aug 2001 21:53:00 -0000 1.4
--- win_theme.cc 25 Apr 2002 15:34:11 -0000 1.5
***************
*** 29,33 ****
{
string strtheme = string (theme) + "/";
!
normal=new win_border((char *) strtheme.c_str(), WIN_BORDER_NORMAL_SIZE);
--- 29,33 ----
{
string strtheme = string (theme) + "/";
!
normal=new win_border((char *) strtheme.c_str(), WIN_BORDER_NORMAL_SIZE);
Index: types.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/types.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** types.h 31 Aug 2001 15:34:10 -0000 1.15
--- types.h 25 Apr 2002 15:34:11 -0000 1.16
***************
*** 22,26 ****
#include "SDL.h"
- #include "inttypes.h"
// We should put ifdefs here to put the correct int values accordingly to the
system type
--- 22,25 ----
Index: screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/screen.cc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** screen.cc 24 Oct 2001 13:09:48 -0000 1.12
--- screen.cc 25 Apr 2002 15:34:11 -0000 1.13
***************
*** 62,68 ****
break;
default:
- if (emulated) cout << "Emulating " << (u_int16) depth << "bpp
depth in "
- << (u_int16) bpp << "bpp mode: " << nl << "x"
<< nh << ".\n";
- else cout << "Using " << (u_int16) bpp << "bpp depth: " << nl <<
"x" << nh << ".\n";
bytes_per_pixel_ = bpp / 8;
break;
--- 62,65 ----
Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** prefs.cc 24 Apr 2002 14:15:36 -0000 1.17
--- prefs.cc 25 Apr 2002 15:34:11 -0000 1.18
***************
*** 52,56 ****
--- 52,60 ----
// set the path to the adonthellrc file:
+ #ifndef WIN32
adonthellrc = string (getenv ("HOME")) + "/.adonthell";
+ #else
+ adonthellrc = string (".");
+ #endif
}
***************
*** 251,255 ****
void config::write_adonthellrc ()
{
! string fname = adonthellrc + "/adonthellrc";
ofstream rc (fname.c_str ());
--- 255,265 ----
void config::write_adonthellrc ()
{
! string fname;
!
! #ifndef WIN32
! fname = adonthellrc + "/adonthellrc";
! #else
! fname = adonthellrc + "/adonthell.ini";
! #endif
ofstream rc (fname.c_str ());
***************
*** 276,280 ****
{
int n, i = 1;
! string s, fname = adonthellrc + "/adonthellrc", version = "0";
// try to create that directory in case it dosn't exist
--- 286,298 ----
{
int n, i = 1;
! string s, fname, version;
!
! #ifndef WIN32
! fname = adonthellrc + "/adonthellrc";
! #else
! fname = adonthellrc + "/adonthell.ini";
! #endif
!
! version = "0";
// try to create that directory in case it dosn't exist
Index: nls.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/nls.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** nls.cc 13 Apr 2002 20:21:43 -0000 1.4
--- nls.cc 25 Apr 2002 15:34:11 -0000 1.5
***************
*** 31,34 ****
--- 31,35 ----
void nls::init (config &myconfig)
{
+ #if ENABLE_NLS
// if no language specified in the config file, determine
// the locale from the environment variables
***************
*** 43,54 ****
bindtextdomain (myconfig.game_name.c_str (), location.c_str ());
textdomain (myconfig.game_name.c_str ());
}
// Set the language to use
void nls::set_language (const string &language)
! {
setenv ("LANGUAGE", language.c_str (), 1);
-
- #ifdef ENABLE_NLS
{
// tell gettext that the language has changed
--- 44,55 ----
bindtextdomain (myconfig.game_name.c_str (), location.c_str ());
textdomain (myconfig.game_name.c_str ());
+ #endif
}
// Set the language to use
void nls::set_language (const string &language)
! {
! #if ENABLE_NLS
setenv ("LANGUAGE", language.c_str (), 1);
{
// tell gettext that the language has changed
***************
*** 56,62 ****
++_nl_msg_cat_cntr;
}
- #endif
-
setlocale (LC_MESSAGES, language.c_str ());
}
--- 57,62 ----
++_nl_msg_cat_cntr;
}
setlocale (LC_MESSAGES, language.c_str ());
+ #endif
}
***************
*** 64,67 ****
--- 64,71 ----
const char* nls::translate (const string &text)
{
+ #if ENABLE_NLS
return gettext (text.c_str ());
+ #else
+ return text.c_str();
+ #endif
}
Index: music_ogg.c
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/music_ogg.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** music_ogg.c 6 Jan 2002 11:40:48 -0000 1.3
--- music_ogg.c 25 Apr 2002 15:34:11 -0000 1.4
***************
*** 78,82 ****
}
} else {
! SDL_OutOfMemory();
}
return(music);
--- 78,83 ----
}
} else {
! SDL_SetError("Out of Memory!");
! return (NULL);
}
return(music);
***************
*** 134,138 ****
music->snd_available = music->cvt.buf;
} else {
! SDL_OutOfMemory();
music->playing = 0;
}
--- 135,139 ----
music->snd_available = music->cvt.buf;
} else {
! SDL_SetError("Out of Memory!");
music->playing = 0;
}
Index: mapview.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/mapview.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** mapview.cc 9 Sep 2001 09:48:28 -0000 1.13
--- mapview.cc 25 Apr 2002 15:34:11 -0000 1.14
***************
*** 256,260 ****
PyTuple_SetItem (theargs, i, intref);
}
! schedule.create_instance ("schedules/mapviews/" + file, file,
theargs);
Py_DECREF (theargs);
}
--- 256,260 ----
PyTuple_SetItem (theargs, i, intref);
}
! schedule.create_instance ("schedules.mapviews." + file, file,
theargs);
Py_DECREF (theargs);
}
Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** main.cc 13 Apr 2002 11:05:10 -0000 1.43
--- main.cc 25 Apr 2002 15:34:11 -0000 1.44
***************
*** 57,64 ****
// Initialise the import path.
// Shared modules path
! python::insert_path (DATA_DIR"/modules");
// Game specific path
! string t = game::game_data_dir () + "/scripts/modules";
python::insert_path ((char *) t.c_str ());
t = game::game_data_dir () + "/scripts";
--- 57,66 ----
// Initialise the import path.
// Shared modules path
! string t;
! t = game::global_data_dir() + "/modules";
! python::insert_path ((char *) t.c_str());
// Game specific path
! t = game::game_data_dir () + "/scripts/modules";
python::insert_path ((char *) t.c_str ());
t = game::game_data_dir () + "/scripts";
Index: image.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/image.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** image.cc 20 Feb 2002 19:02:26 -0000 1.9
--- image.cc 25 Apr 2002 15:34:11 -0000 1.10
***************
*** 146,150 ****
s_int8 ret = 0;
! file = SDL_RWFromFile (fname.c_str (), "r");
if (!file)
return 1;
--- 146,150 ----
s_int8 ret = 0;
! file = SDL_RWFromFile (fname.c_str (), "rb");
if (!file)
return 1;
Index: game.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/game.cc,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** game.cc 7 Apr 2002 09:51:28 -0000 1.25
--- game.cc 25 Apr 2002 15:34:11 -0000 1.26
***************
*** 39,44 ****
--- 39,48 ----
{
Global_data_dir = DATA_DIR;
+ #ifndef WIN32
User_data_dir = getenv ("HOME");
User_data_dir += "/.adonthell";
+ #else
+ User_data_dir = ".";
+ #endif
Game_data_dir = game_dir;
}
Index: event.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/event.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** event.h 10 Sep 2001 14:28:54 -0000 1.25
--- event.h 25 Apr 2002 15:34:11 -0000 1.26
***************
*** 35,39 ****
*
*/
! #define EVENTS_DIR "events/"
--- 35,39 ----
*
*/
! #define EVENTS_DIR "game_events."
Index: dialog_screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/dialog_screen.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dialog_screen.cc 12 Apr 2002 15:35:40 -0000 1.5
--- dialog_screen.cc 25 Apr 2002 15:34:11 -0000 1.6
***************
*** 45,49 ****
{
string path = dlg_file;
! string file = strrchr (dlg_file, '/') ? strrchr (dlg_file, '/') + 1 :
dlg_file;
audio::play_wave (-1, 0);
--- 45,49 ----
{
string path = dlg_file;
! string file = strrchr (dlg_file, '.') ? strrchr (dlg_file, '.') + 1 :
dlg_file;
audio::play_wave (-1, 0);
Index: audio.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/audio.cc,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** audio.cc 26 Jan 2002 21:52:07 -0000 1.30
--- audio.cc 25 Apr 2002 15:34:11 -0000 1.31
***************
*** 99,104 ****
audio_initialized = true;
Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
- fprintf(stderr, "Audio started in %d Hz %d bit %s format.\n", audio_rate,
- (audio_format&0xFF), (audio_channels > 1) ? "stereo" : "mono");
set_background_volume (background_volume);
}
--- 99,102 ----
***************
*** 311,315 ****
schedule_args = args;
Py_XINCREF (schedule_args);
! schedule.create_instance ("schedules/audio/" + file, file, args);
}
}
--- 309,313 ----
schedule_args = args;
Py_XINCREF (schedule_args);
! schedule.create_instance ("schedules.audio." + file, file, args);
}
}
Index: adonthell.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/adonthell.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** adonthell.cc 7 Jan 2002 13:41:38 -0000 1.5
--- adonthell.cc 25 Apr 2002 15:34:11 -0000 1.6
***************
*** 38,42 ****
// load the script taking care of additional game commands
! control.create_instance ("schedules/control", "control");
}
--- 38,42 ----
// load the script taking care of additional game commands
! control.create_instance ("schedules.control", "control");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src win_theme.cc,1.4,1.5 types.h,1.15,1.16 screen.cc,1.12,1.13 prefs.cc,1.17,1.18 nls.cc,1.4,1.5 music_ogg.c,1.3,1.4 mapview.cc,1.13,1.14 main.cc,1.43,1.44 image.cc,1.9,1.10 game.cc,1.25,1.26 event.h,1.25,1.26 dialog_screen.cc,1.5,1.6 audio.cc,1.30,1.31 adonthell.cc,1.5,1.6,
Alexandre Courbot <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/intl localename.c,1.3,1.4
- Next by Date:
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.21,1.22 fileops.cc,1.6,1.7 gamedata.cc,1.17,1.18
- Previous by thread:
[Adonthell-commits] CVS: adonthell/intl localename.c,1.3,1.4
- Next by thread:
[Adonthell-commits] CVS: adonthell/src data_screen.cc,1.21,1.22 fileops.cc,1.6,1.7 gamedata.cc,1.17,1.18
- Index(es):