[Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.1,1.2 actionmap.h,1.2,1.3 actionmap_mod.h,1.1,1.2 actor.cpp,1.5,1.6 actor.h,1.2,1.3 actor_mod.h,1.2,1.3 animation.cpp,1.1,1.2 animation.h,1.2,1.3 animation_mod.h,1.1,1.2 cvar.cpp,1.2,1.3 cvar.h,1.2,1.3 cvar_mod.h,1.2,1.3 events.cpp,1.6,1.7 font.cpp,1.3,1.4 font.h,1.2,1.3 game.cpp,1.5,1.6 game.h,1.2,1.3 game_mod.h,1.2,1.3 gfx.cpp,1.5,1.6 gfx_mod.h,1.2,1.3 image.cpp,1.2,1.3 image.h,1.2,1.3 image_mod.h,1.1,1.2 interface.cpp,1.3,1.4 interface.h,1.2,1.3 isomap.cpp,1.2,1.3 isomap.h,1.2,1.3 isomap_mod.h,1.1,1.2 ite_introproc.h,1.2,1.3 music.cpp,1.9,1.10 music.h,1.3,1.4 objectmap.cpp,1.4,1.5 objectmap.h,1.2,1.3 objectmap_mod.h,1.1,1.2 palanim.cpp,1.2,1.3 palanim.h,1.2,1.3 palanim_mod.h,1.1,1.2 reinherit.h,1.11,1.12 render.cpp,1.3,1.4 render.h,1.2,1.3 render_mod.h,1.2,1.3 rscfile.cpp,1.2,1.3 rscfile_mod.h,1.1,1.2 scene.cpp,1.3,1.4 scene.h,1.2,1.3 scene_mod.h,1.2,1.3 script.cpp,1.2,1.3 script.h,1.2,1.3 script_mod.h,1.1,1.2 sdata.cpp,1.1,1.2 sdebug.cpp,1.1,1.2 sfuncs.cpp,1.1,1.2 sndres.cpp,1.8,1.9 sndres.h,1.7,1.8 sound.h,1.4,1.5 sprite.cpp,1.3,1.4 sprite.h,1.2,1.3 sthread.cpp,1.2,1.3 sthread.h,1.1,1.2 sysgfx.cpp,1.3,1.4 systimer.cpp,1.2,1.3 systimer.h,1.3,1.4 transitions.cpp,1.1,1.2
Eugene Sandulenko
sev at users.sourceforge.net
Fri Apr 30 16:04:00 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga music.cpp,1.8,1.9 sysgfx.cpp,1.2,1.3 sysgfx.h,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.2,1.3 actionmap.h,1.3,1.4 actionmap_mod.h,1.2,1.3 actor.cpp,1.6,1.7 actor.h,1.3,1.4 actor_mod.h,1.3,1.4 actordata.cpp,1.1,1.2 actordata.h,1.2,1.3 animation.cpp,1.2,1.3 animation.h,1.3,1.4 animation_mod.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30212
Modified Files:
actionmap.cpp actionmap.h actionmap_mod.h actor.cpp actor.h
actor_mod.h animation.cpp animation.h animation_mod.h cvar.cpp
cvar.h cvar_mod.h events.cpp font.cpp font.h game.cpp game.h
game_mod.h gfx.cpp gfx_mod.h image.cpp image.h image_mod.h
interface.cpp interface.h isomap.cpp isomap.h isomap_mod.h
ite_introproc.h music.cpp music.h objectmap.cpp objectmap.h
objectmap_mod.h palanim.cpp palanim.h palanim_mod.h
reinherit.h render.cpp render.h render_mod.h rscfile.cpp
rscfile_mod.h scene.cpp scene.h scene_mod.h script.cpp
script.h script_mod.h sdata.cpp sdebug.cpp sfuncs.cpp
sndres.cpp sndres.h sound.h sprite.cpp sprite.h sthread.cpp
sthread.h sysgfx.cpp systimer.cpp systimer.h transitions.cpp
Log Message:
Move from custom unsigned types to those provided by main config.h
Index: actionmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- actionmap.cpp 12 Apr 2004 21:40:46 -0000 1.1
+++ actionmap.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -68,7 +68,7 @@
return R_SUCCESS;
}
-int ACTIONMAP_Load(const uchar * exmap_res, size_t exmap_res_len)
+int ACTIONMAP_Load(const byte * exmap_res, size_t exmap_res_len)
/*--------------------------------------------------------------------------*\
* Loads exit map data from specified exit map resource
\*--------------------------------------------------------------------------*/
@@ -80,7 +80,7 @@
int exit_ct;
int i, pt;
- const uchar *read_p = exmap_res;
+ const byte *read_p = exmap_res;
size_t read_len = exmap_res_len;
assert(ActmapModule.init);
Index: actionmap.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actionmap.h 25 Apr 2004 14:42:13 -0000 1.2
+++ actionmap.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -54,7 +54,7 @@
int n_exits;
R_ACTIONMAP_ENTRY *exits_tbl;
- const uchar *exmap_res;
+ const byte *exmap_res;
size_t exmap_res_len;
};
Index: actionmap_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actionmap_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- actionmap_mod.h 12 Apr 2004 21:40:46 -0000 1.1
+++ actionmap_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -37,7 +37,7 @@
int ACTIONMAP_Register(void);
int ACTIONMAP_Init(void);
-int ACTIONMAP_Load(const uchar * exmap_res, size_t exmap_res_len);
+int ACTIONMAP_Load(const byte * exmap_res, size_t exmap_res_len);
int ACTIONMAP_Draw(R_SURFACE * ds, int color);
int ACTIONMAP_Free(void);
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- actor.cpp 28 Apr 2004 23:54:40 -0000 1.5
+++ actor.cpp 30 Apr 2004 23:02:23 -0000 1.6
@@ -522,9 +522,9 @@
return R_SUCCESS;
}
-int ACTOR_GetActorIndex(uint actor_id)
+int ACTOR_GetActorIndex(uint16 actor_id)
{
- uint actor_idx;
+ uint16 actor_idx;
if (actor_id == 1) {
actor_idx = 0;
@@ -539,9 +539,9 @@
return actor_idx;
}
-int ACTOR_ActorExists(uint actor_id)
+int ACTOR_ActorExists(uint16 actor_id)
{
- uint actor_idx;
+ uint16 actor_idx;
if (actor_id == 1) {
actor_idx = 0;
@@ -556,7 +556,7 @@
return 1;
}
-int ACTOR_Speak(int index, const char *d_string, uint d_voice_rn, R_SEMAPHORE * sem)
+int ACTOR_Speak(int index, const char *d_string, uint16 d_voice_rn, R_SEMAPHORE * sem)
{
YS_DL_NODE *node;
@@ -730,7 +730,7 @@
return R_SUCCESS;
}
-int ACTOR_GetSpeechTime(const char *d_string, uint d_voice_rn)
+int ACTOR_GetSpeechTime(const char *d_string, uint16 d_voice_rn)
{
int voice_len;
@@ -767,7 +767,7 @@
return R_SUCCESS;
}
-int ACTOR_SetAction(int index, int action_n, uint action_flags)
+int ACTOR_SetAction(int index, int action_n, uint16 action_flags)
{
R_ACTOR *actor;
@@ -795,7 +795,7 @@
return R_SUCCESS;
}
-int ACTOR_SetDefaultAction(int index, int action_n, uint action_flags)
+int ACTOR_SetDefaultAction(int index, int action_n, uint16 action_flags)
{
R_ACTOR *actor;
@@ -847,10 +847,10 @@
int LoadActorSpriteIndex(R_ACTOR * actor, int si_rn, int *last_frame_p)
{
- uchar *res_p;
+ byte *res_p;
size_t res_len;
- const uchar *read_p;
+ const byte *read_p;
int s_action_ct;
R_ACTORACTION *action_p;
@@ -950,7 +950,7 @@
return R_SUCCESS;
}
-int ACTOR_WalkTo(int id, R_POINT * walk_pt, uint flags, R_SEMAPHORE * sem)
+int ACTOR_WalkTo(int id, R_POINT * walk_pt, uint16 flags, R_SEMAPHORE * sem)
/*--------------------------------------------------------------------------*\
\*--------------------------------------------------------------------------*/
{
@@ -1341,7 +1341,7 @@
if (argc < 3)
return;
- actor.id = (uint) atoi(argv[0]);
+ actor.id = (uint16) atoi(argv[0]);
actor.a_pt.x = atoi(argv[1]);
actor.a_pt.y = atoi(argv[2]);
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actor.h 25 Apr 2004 14:42:13 -0000 1.2
+++ actor.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -71,7 +71,7 @@
struct R_WALKINTENT {
int wi_active;
- uint wi_flags;
+ uint16 wi_flags;
int wi_init;
int time;
@@ -100,7 +100,7 @@
struct R_SPEAKINTENT {
int si_init;
- uint si_flags;
+ uint16 si_flags;
int si_last_action;
YS_DL_LIST *si_diaglist; /* Actor dialogue list */
@@ -110,7 +110,7 @@
struct R_ACTORINTENT {
int a_itype;
- uint a_iflags;
+ uint16 a_iflags;
int a_idone;
void *a_data;
@@ -123,7 +123,7 @@
int id; /* Actor id */
int name_i; /* Actor's index in actor name string list */
- uint flags;
+ uint16 flags;
R_POINT a_pt; /* Actor's logical coordinates */
R_POINT s_pt; /* Actor's screen coordinates */
@@ -149,10 +149,10 @@
*/
int def_action;
- uint def_action_flags;
+ uint16 def_action_flags;
int action;
- uint action_flags;
+ uint16 action_flags;
int action_frame;
int action_time;
@@ -170,7 +170,7 @@
int d_playing;
const char *d_string;
- uint d_voice_rn;
+ uint16 d_voice_rn;
long d_time;
int d_sem_held;
@@ -193,7 +193,7 @@
R_RSCFILE_CONTEXT *actor_ctxt;
- uint count;
+ uint16 count;
int *alias_tbl;
YS_DL_NODE **tbl;
Index: actor_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- actor_mod.h 25 Apr 2004 14:42:13 -0000 1.2
+++ actor_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -72,7 +72,7 @@
int ACTOR_Direct(int msec);
int ACTOR_Create(int actor_id, int x, int y);
-int ACTOR_ActorExists(uint actor_id);
+int ACTOR_ActorExists(uint16 actor_id);
int ACTOR_DrawList(void);
int ACTOR_AtoS(R_POINT * logical, const R_POINT * actor);
@@ -81,18 +81,18 @@
int ACTOR_Move(int index, R_POINT * move_pt);
int ACTOR_MoveRelative(int index, R_POINT * move_pt);
-int ACTOR_WalkTo(int index, R_POINT * walk_pt, uint flags, R_SEMAPHORE * sem);
+int ACTOR_WalkTo(int index, R_POINT * walk_pt, uint16 flags, R_SEMAPHORE * sem);
-int ACTOR_GetActorIndex(uint actor_id);
+int ACTOR_GetActorIndex(uint16 actor_id);
-int ACTOR_Speak(int index, const char *d_string, uint d_voice_rn, R_SEMAPHORE * sem);
+int ACTOR_Speak(int index, const char *d_string, uint16 d_voice_rn, R_SEMAPHORE * sem);
int ACTOR_SkipDialogue(void);
-int ACTOR_GetSpeechTime(const char *d_string, uint d_voice_rn);
+int ACTOR_GetSpeechTime(const char *d_string, uint16 d_voice_rn);
int ACTOR_SetOrientation(int index, int orient);
-int ACTOR_SetAction(int index, int action_n, uint action_flags);
-int ACTOR_SetDefaultAction(int index, int action_n, uint action_flags);
+int ACTOR_SetAction(int index, int action_n, uint16 action_flags);
+int ACTOR_SetDefaultAction(int index, int action_n, uint16 action_flags);
} // End of namespace Saga
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- animation.cpp 12 Apr 2004 21:40:46 -0000 1.1
+++ animation.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -71,7 +71,7 @@
int ANIM_Shutdown(void)
{
- uint i;
+ uint16 i;
for (i = 0; i < R_MAX_ANIMATIONS; i++) {
@@ -84,13 +84,13 @@
}
int
-ANIM_Load(const uchar * anim_resdata,
- size_t anim_resdata_len, uint * anim_id_p)
+ANIM_Load(const byte * anim_resdata,
+ size_t anim_resdata_len, uint16 * anim_id_p)
{
R_ANIMATION *new_anim;
- uint anim_id = 0;
- uint i;
+ uint16 anim_id = 0;
+ uint16 i;
if (!AnimInfo.initialized) {
return R_FAILURE;
@@ -176,7 +176,7 @@
return R_SUCCESS;
}
-int ANIM_Link(uint anim_id1, uint anim_id2)
+int ANIM_Link(uint16 anim_id1, uint16 anim_id2)
{
R_ANIMATION *anim1;
R_ANIMATION *anim2;
@@ -202,22 +202,22 @@
return R_SUCCESS;
}
-int ANIM_Play(uint anim_id, int vector_time)
+int ANIM_Play(uint16 anim_id, int vector_time)
{
R_EVENT event;
R_ANIMATION *anim;
R_ANIMATION *link_anim;
- uint link_anim_id;
+ uint16 link_anim_id;
R_BUFFER_INFO buf_info;
- uchar *display_buf;
+ byte *display_buf;
- const uchar *nextf_p;
+ const byte *nextf_p;
size_t nextf_len;
- uint frame;
+ uint16 frame;
int result;
R_GAME_DISPLAYINFO disp_info;
@@ -354,7 +354,7 @@
int ANIM_Reset(void)
{
- uint i;
+ uint16 i;
for (i = 0; i < R_MAX_ANIMATIONS; i++) {
@@ -366,7 +366,7 @@
return R_SUCCESS;
}
-int ANIM_SetFlag(uint anim_id, uint flag)
+int ANIM_SetFlag(uint16 anim_id, uint16 flag)
{
R_ANIMATION *anim;
@@ -386,7 +386,7 @@
return R_SUCCESS;
}
-int ANIM_SetFrameTime(uint anim_id, int time)
+int ANIM_SetFrameTime(uint16 anim_id, int time)
{
R_ANIMATION *anim;
@@ -406,7 +406,7 @@
return R_SUCCESS;
}
-int ANIM_Free(uint anim_id)
+int ANIM_Free(uint16 anim_id)
{
R_ANIMATION *anim;
@@ -434,7 +434,7 @@
return R_SUCCESS;
}
-int ANIM_GetNumFrames(const uchar * anim_resource, uint * n_frames)
+int ANIM_GetNumFrames(const byte * anim_resource, uint16 * n_frames)
/*--------------------------------------------------------------------------*\
* The actual number of frames present in an animation resource is
* sometimes less than number present in the .nframes member of the
@@ -449,7 +449,7 @@
int x;
- const uchar *read_p = anim_resource;
+ const byte *read_p = anim_resource;
if (!AnimInfo.initialized) {
@@ -495,34 +495,34 @@
}
int
-ITE_DecodeFrame(const uchar * resdata,
- size_t frame_offset, uchar * buf, size_t buf_len)
+ITE_DecodeFrame(const byte * resdata,
+ size_t frame_offset, byte * buf, size_t buf_len)
{
R_ANIMATION_HEADER ah;
R_FRAME_HEADER fh;
- const uchar *read_p = resdata;
- uchar *write_p;
+ const byte *read_p = resdata;
+ byte *write_p;
- uint magic;
+ uint16 magic;
- uint x_start;
- uint y_start;
- ulong screen_w;
- ulong screen_h;
+ uint16 x_start;
+ uint16 y_start;
+ uint32 screen_w;
+ uint32 screen_h;
int mark_byte;
- uchar data_byte;
+ byte data_byte;
int new_row;
- uint control_ch;
- uint param_ch;
+ uint16 control_ch;
+ uint16 param_ch;
- uint runcount;
+ uint16 runcount;
int x_vector;
- uint i;
+ uint16 i;
if (!AnimInfo.initialized) {
@@ -705,10 +705,10 @@
}
int
-IHNM_DecodeFrame(uchar * decode_buf,
+IHNM_DecodeFrame(byte * decode_buf,
size_t decode_buf_len,
- const uchar * thisf_p,
- size_t thisf_len, const uchar ** nextf_p, size_t * nextf_len)
+ const byte * thisf_p,
+ size_t thisf_len, const byte ** nextf_p, size_t * nextf_len)
{
int in_ch;
@@ -719,23 +719,23 @@
int control_ch;
int param_ch;
- uchar data_pixel;
+ byte data_pixel;
int x_origin = 0;
int y_origin = 0;
int x_vector;
int new_row;
- uint runcount;
- uint c;
+ uint16 runcount;
+ uint16 c;
size_t in_ch_offset;
- const uchar *inbuf_p = thisf_p;
+ const byte *inbuf_p = thisf_p;
size_t inbuf_remain = thisf_len;
- uchar *outbuf_p = decode_buf;
- uchar *outbuf_endp = (decode_buf + decode_buf_len) - 1;
+ byte *outbuf_p = decode_buf;
+ byte *outbuf_endp = (decode_buf + decode_buf_len) - 1;
size_t outbuf_remain = decode_buf_len;
R_GAME_DISPLAYINFO di;
@@ -1017,22 +1017,22 @@
}
int
-ANIM_GetFrameOffset(const uchar * resdata,
- uint find_frame, size_t * frame_offset_p)
+ANIM_GetFrameOffset(const byte * resdata,
+ uint16 find_frame, size_t * frame_offset_p)
{
R_ANIMATION_HEADER ah;
- uint num_frames;
- uint current_frame;
+ uint16 num_frames;
+ uint16 current_frame;
- const uchar *read_p = resdata;
- const uchar *search_ptr;
+ const byte *read_p = resdata;
+ const byte *search_ptr;
- uchar mark_byte;
- uint control;
- uint runcount;
+ byte mark_byte;
+ uint16 control;
+ uint16 runcount;
- uint magic;
+ uint16 magic;
if (!AnimInfo.initialized) {
@@ -1163,9 +1163,9 @@
static void CF_anim_info(int argc, char *argv[])
{
- uint anim_ct;
- uint i;
- uint idx;
+ uint16 anim_ct;
+ uint16 i;
+ uint16 idx;
YS_IGNORE_PARAM(argc);
YS_IGNORE_PARAM(argv);
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animation.h 25 Apr 2004 14:42:13 -0000 1.2
+++ animation.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -45,19 +45,19 @@
struct R_ANIMATION_HEADER {
- uint magic;
+ uint16 magic;
- uint screen_w;
- uint screen_h;
+ uint16 screen_w;
+ uint16 screen_h;
- uint unknown06;
- uint unknown07;
+ uint16 unknown06;
+ uint16 unknown07;
- uint nframes;
- uint flags;
+ uint16 nframes;
+ uint16 flags;
- uint unknown10;
- uint unknown11;
+ uint16 unknown10;
+ uint16 unknown11;
};
@@ -81,26 +81,26 @@
/* Animation info array member */
struct R_ANIMATION {
- const uchar *resdata;
+ const byte *resdata;
size_t resdata_len;
- uint n_frames;
+ uint16 n_frames;
size_t *frame_offsets;
- uint current_frame;
- uint end_frame;
- uint stop_frame;
+ uint16 current_frame;
+ uint16 end_frame;
+ uint16 stop_frame;
- const uchar *cur_frame_p;
+ const byte *cur_frame_p;
size_t cur_frame_len;
int frame_time;
- uint play_flag;
+ uint16 play_flag;
int link_flag;
- uint link_id;
+ uint16 link_id;
- uint flags;
+ uint16 flags;
};
@@ -108,28 +108,28 @@
int initialized;
- uint anim_count;
- uint anim_limit;
+ uint16 anim_count;
+ uint16 anim_limit;
R_ANIMATION *anim_tbl[R_MAX_ANIMATIONS];
};
-int ANIM_GetNumFrames(const uchar * anim_resource, uint * n_frames);
+int ANIM_GetNumFrames(const byte * anim_resource, uint16 * n_frames);
int
-ITE_DecodeFrame(const uchar * anim_resource,
- size_t frame_offset, uchar * buf, size_t buf_len);
+ITE_DecodeFrame(const byte * anim_resource,
+ size_t frame_offset, byte * buf, size_t buf_len);
int
-IHNM_DecodeFrame(uchar * decode_buf,
+IHNM_DecodeFrame(byte * decode_buf,
size_t decode_buf_len,
- const uchar * thisf_p,
- size_t thisf_len, const uchar ** nextf_p, size_t * nextf_len);
+ const byte * thisf_p,
+ size_t thisf_len, const byte ** nextf_p, size_t * nextf_len);
int
-ANIM_GetFrameOffset(const uchar * anim_resource,
- uint find_frame, size_t * frame_offset);
+ANIM_GetFrameOffset(const byte * anim_resource,
+ uint16 find_frame, size_t * frame_offset);
static void CF_anim_info(int argc, char *argv[]);
Index: animation_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- animation_mod.h 12 Apr 2004 21:40:46 -0000 1.1
+++ animation_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -46,18 +46,18 @@
int ANIM_Shutdown(void);
int
-ANIM_Load(const uchar * anim_resdata,
- size_t anim_resdata_len, uint * anim_id_p);
+ANIM_Load(const byte * anim_resdata,
+ size_t anim_resdata_len, uint16 * anim_id_p);
-int ANIM_Free(uint anim_id);
+int ANIM_Free(uint16 anim_id);
-int ANIM_Play(uint anim_id, int vector_time);
+int ANIM_Play(uint16 anim_id, int vector_time);
-int ANIM_Link(uint anim_id1, uint anim_id2);
+int ANIM_Link(uint16 anim_id1, uint16 anim_id2);
-int ANIM_SetFlag(uint anim_id, uint flag);
+int ANIM_SetFlag(uint16 anim_id, uint16 flag);
-int ANIM_SetFrameTime(uint anim_id, int time);
+int ANIM_SetFrameTime(uint16 anim_id, int time);
int ANIM_Reset(void);
Index: cvar.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/cvar.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cvar.cpp 25 Apr 2004 14:42:13 -0000 1.2
+++ cvar.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -216,7 +216,7 @@
{
long int int_param;
- unsigned long uint_param;
+ unsigned long uint16_param;
char *end_p;
ptrdiff_t scan_len;
@@ -288,16 +288,16 @@
return R_FAILURE;
}
- uint_param = strtoul(r_value, &end_p, 10);
+ uint16_param = strtoul(r_value, &end_p, 10);
- if (uint_param == ULONG_MAX) {
+ if (uint16_param == ULONG_MAX) {
CVAR_ErrorState = CVERR_PARSEOVERFLOW;
return R_FAILURE;
}
scan_len = end_p - r_value;
- if (uint_param == 0) {
+ if (uint16_param == 0) {
if (!scan_len || r_value[scan_len - 1] != '0') {
/* strtol() returned 0, but string isn't "0". Invalid. */
@@ -312,7 +312,7 @@
return R_FAILURE;
}
- if (uint_param > CV_UINTMAX) {
+ if (uint16_param > CV_UINTMAX) {
/* Overflows destination type */
CVAR_ErrorState = CVERR_DESTOVERFLOW;
return R_FAILURE;
@@ -321,18 +321,18 @@
/* Ignore bounds if equal */
if (cvar->t.ui.lbound != cvar->t.ui.ubound) {
- if ((uint_param < cvar->t.ui.lbound) ||
- (uint_param > cvar->t.ui.ubound)) {
+ if ((uint16_param < cvar->t.ui.lbound) ||
+ (uint16_param > cvar->t.ui.ubound)) {
/* Value is outside cvar bounds */
CVAR_ErrorState = CVERR_BOUND;
return R_FAILURE;
}
}
- *(cvar->t.ui.var_p) = (cv_uint_t) uint_param;
+ *(cvar->t.ui.var_p) = (cv_uint16_t) uint16_param;
#ifdef R_CVAR_TRACE
- printf("Set cvar to value %lu.\n", uint_param);
+ printf("Set cvar to value %lu.\n", uint16_param);
#endif
break;
@@ -413,7 +413,7 @@
int
CVAR_RegisterFunc(cv_func_t func,
const char *func_name,
- const char *func_argstr, uint flags, int min_args, int max_args)
+ const char *func_argstr, uint16 flags, int min_args, int max_args)
/****************************************************************************\
Registers a console function 'cvar'
(could think of a better place to put these...?)
@@ -444,7 +444,7 @@
int
CVAR_Register_I(cv_int_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_int_t lbound, cv_int_t ubound)
+ const char *section, uint16 flags, cv_int_t lbound, cv_int_t ubound)
/****************************************************************************\
Registers an integer type cvar.
\****************************************************************************/
@@ -473,9 +473,9 @@
}
int
-CVAR_Register_UI(cv_uint_t * var_p,
+CVAR_Register_UI(cv_uint16_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_uint_t lbound, cv_uint_t ubound)
+ const char *section, uint16 flags, cv_uint16_t lbound, cv_uint16_t ubound)
/****************************************************************************\
Registers an unsigned integer type cvar.
\****************************************************************************/
@@ -506,7 +506,7 @@
int
CVAR_Register_F(cv_float_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_float_t lbound, cv_float_t ubound)
+ const char *section, uint16 flags, cv_float_t lbound, cv_float_t ubound)
/****************************************************************************\
Registers a floating point type cvar.
\****************************************************************************/
@@ -536,7 +536,7 @@
int
CVAR_Register_S(cv_char_t * var_str,
- const char *var_name, const char *section, uint flags, int ubound)
+ const char *var_name, const char *section, uint16 flags, int ubound)
/****************************************************************************\
Registers a string type cvar. Storage must be provided in var_p for 'ubound'
characters plus 1 for NUL char.
Index: cvar.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/cvar.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cvar.h 25 Apr 2004 14:42:13 -0000 1.2
+++ cvar.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -45,9 +45,9 @@
struct R_SUBCVAR_UINT {
- cv_uint_t *var_p;
- cv_uint_t ubound;
- cv_uint_t lbound;
+ cv_uint16_t *var_p;
+ cv_uint16_t ubound;
+ cv_uint16_t lbound;
};
@@ -80,7 +80,7 @@
int type;
const char *name;
const char *section;
- uint flags;
+ uint16 flags;
union {
R_SUBCVAR_INT i;
Index: cvar_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/cvar_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cvar_mod.h 25 Apr 2004 14:42:13 -0000 1.2
+++ cvar_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -39,7 +39,7 @@
#define CV_UINTMAX UINT_MAX
typedef int cv_int_t;
-typedef unsigned int cv_uint_t;
+typedef unsigned int cv_uint16_t;
typedef float cv_float_t;
typedef char cv_char_t;
typedef void (*cv_func_t) (int cv_argc, char *cv_argv[]);
@@ -80,22 +80,22 @@
int
CVAR_RegisterFunc(cv_func_t func,
const char *func_name,
- const char *func_argstr, uint flags, int min_args, int max_args);
+ const char *func_argstr, uint16 flags, int min_args, int max_args);
int CVAR_Register_I(cv_int_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_int_t lbound, cv_int_t ubound);
+ const char *section, uint16 flags, cv_int_t lbound, cv_int_t ubound);
-int CVAR_Register_UI(cv_uint_t * var_p,
+int CVAR_Register_UI(cv_uint16_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_uint_t lbound, cv_uint_t ubound);
+ const char *section, uint16 flags, cv_uint16_t lbound, cv_uint16_t ubound);
int CVAR_Register_F(cv_float_t * var_p,
const char *var_name,
- const char *section, uint flags, cv_float_t lbound, cv_float_t ubound);
+ const char *section, uint16 flags, cv_float_t lbound, cv_float_t ubound);
int CVAR_Register_S(cv_char_t * var_str,
- const char *var_name, const char *section, uint flags, int ubound);
+ const char *var_name, const char *section, uint16 flags, int ubound);
int EXPR_Parse(const char **exp_pp, int *len, R_CVAR_P * expr_cvar,
char **rvalue);
Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/events.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- events.cpp 29 Apr 2004 03:52:59 -0000 1.6
+++ events.cpp 30 Apr 2004 23:02:23 -0000 1.7
@@ -594,7 +594,7 @@
YS_DL_NODE *walk_node;
R_EVENT *event_p;
- uint event_count = 0;
+ uint16 event_count = 0;
for (walk_node = ys_dll_head(EventList);
walk_node != NULL; walk_node = ys_dll_next(walk_node)) {
Index: font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/font.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- font.cpp 25 Apr 2004 14:45:08 -0000 1.3
+++ font.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -125,18 +125,18 @@
return R_SUCCESS;
}
-int FONT_Load(ulong font_rn, int font_id)
+int FONT_Load(uint32 font_rn, int font_id)
{
R_FONT_HEADER fh;
R_FONT *font;
R_FONT_STYLE *normal_font;
- uchar *fontres_p;
+ byte *fontres_p;
size_t fontres_len;
size_t remain;
- const uchar *read_p;
+ const byte *read_p;
int nbits;
int c;
@@ -498,7 +498,7 @@
size_t ct;
int width = 0;
int ch;
- const uchar *txt_p;
+ const byte *txt_p;
if (!FontModule.init) {
return R_FAILURE;
@@ -516,7 +516,7 @@
font = FontModule.fonts[font_id];
assert(font != NULL);
- txt_p = (const uchar *) test_str;
+ txt_p = (const byte *) test_str;
for (ct = test_str_ct;
*txt_p && (!test_str_ct || ct > 0); txt_p++, ct--) {
@@ -598,16 +598,16 @@
size_t draw_str_ct, int text_x, int text_y, int color)
{
- const uchar *draw_str_p;
+ const byte *draw_str_p;
- uchar *c_data_ptr;
+ byte *c_data_ptr;
int c_code;
int char_row;
- uchar *output_ptr;
- uchar *output_ptr_min;
- uchar *output_ptr_max;
+ byte *output_ptr;
+ byte *output_ptr_min;
+ byte *output_ptr_max;
int row;
int row_limit;
@@ -623,7 +623,7 @@
return R_SUCCESS;
}
- draw_str_p = (const uchar *) draw_str;
+ draw_str_p = (const byte *) draw_str;
ct = draw_str_ct;
/* Draw string one character at a time, maximum of 'draw_str'_ct
@@ -700,7 +700,7 @@
c_bit--) {
if ((*c_data_ptr >> c_bit) & 0x01) {
- *output_ptr = (uchar) color;
+ *output_ptr = (byte) color;
}
output_ptr++;
Index: font.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/font.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- font.h 25 Apr 2004 14:42:14 -0000 1.2
+++ font.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -78,14 +78,14 @@
R_FONT_HEADER hdr;
FONT_CHAR_ENTRY fce[256];
- uchar *font_free_p;
- uchar *font_p;
+ byte *font_free_p;
+ byte *font_p;
};
struct R_FONT {
- ulong font_rn;
+ uint32 font_rn;
int font_id;
int normal_loaded;
@@ -93,7 +93,7 @@
int outline_loaded;
R_FONT_STYLE *outline;
- uchar *res_data;
+ byte *res_data;
size_t res_len;
};
@@ -112,7 +112,7 @@
};
-int FONT_Load(ulong font_rn, int font_id);
+int FONT_Load(uint32 font_rn, int font_id);
static R_FONT_STYLE *FONT_CreateOutline(R_FONT_STYLE * src_font);
Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game.cpp 27 Apr 2004 08:54:03 -0000 1.5
+++ game.cpp 30 Apr 2004 23:02:23 -0000 1.6
@@ -406,7 +406,7 @@
int GAME_Init(void)
{
- uint game_n;
+ uint16 game_n;
char *game_dir;
game_dir = GameModule.game_dir;
@@ -445,7 +445,7 @@
char lang_file[R_MAXPATH];
// char lang_path[R_MAXPATH];
- uint game_n;
+ uint16 game_n;
File test_file;
@@ -508,11 +508,11 @@
? "No error description." : GameModule.err_str;
}
-int GAME_GetFileContext(R_RSCFILE_CONTEXT ** ctxt_p, uint r_type, int param)
+int GAME_GetFileContext(R_RSCFILE_CONTEXT ** ctxt_p, uint16 r_type, int param)
{
R_RSCFILE_CONTEXT *found_ctxt = NULL;
- uint i;
+ uint16 i;
YS_IGNORE_PARAM(param);
@@ -540,13 +540,13 @@
return R_SUCCESS;
}
-int DetectGame(const char *game_dir, uint * game_n_p)
+int DetectGame(const char *game_dir, uint16 * game_n_p)
{
- uint game_count = ARRAYSIZE(GameDescs);
- uint game_n;
+ uint16 game_count = ARRAYSIZE(GameDescs);
+ uint16 game_n;
- uint file_count;
- uint file_n;
+ uint16 file_count;
+ uint16 file_n;
File test_file;
@@ -604,17 +604,17 @@
return R_FAILURE;
}
-int LoadGame(const char *game_dir, uint game_n)
+int LoadGame(const char *game_dir, uint16 game_n)
{
R_RSCFILE_CONTEXT *load_ctxt;
- uint game_count = ARRAYSIZE(GameDescs);
+ uint16 game_count = ARRAYSIZE(GameDescs);
const char *game_fname;
- uint game_filect;
+ uint16 game_filect;
- uint i;
+ uint16 i;
if ((game_dir == NULL) || (game_n >= game_count)) {
@@ -755,8 +755,8 @@
R_RSCFILE_CONTEXT *test_ctx;
- ulong script_lut_len;
- ulong script_lut_rn;
+ uint32 script_lut_len;
+ uint32 script_lut_rn;
int verified = 0;
Index: game.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game.h 25 Apr 2004 14:42:14 -0000 1.2
+++ game.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -48,7 +48,7 @@
struct R_GAME_FILEDESC {
const char *gf_fname;
- uint gf_type;
+ uint16 gf_type;
};
@@ -85,8 +85,8 @@
R_RSCFILE_CONTEXT *file_ctxt;
- uint file_types;
- uint file_flags;
+ uint16 file_types;
+ uint16 file_flags;
};
@@ -104,10 +104,10 @@
char game_language[R_GAME_LANGSTR_LIMIT];
- uint gfile_n;
+ uint16 gfile_n;
R_GAME_FILEDATA *gfile_data;
- uint gd_fontct;
+ uint16 gd_fontct;
R_GAME_FONTDESC *gd_fontdescs;
int err_n;
@@ -117,9 +117,9 @@
int LoadLanguage(void);
-int DetectGame(const char *game_dir, uint * game_n_p);
+int DetectGame(const char *game_dir, uint16 * game_n_p);
-int LoadGame(const char *game_dir, uint game_n_p);
+int LoadGame(const char *game_dir, uint16 game_n_p);
int Verify_ITEDEMO(const char *game_dir);
int Verify_ITEDISK(const char *game_dir);
Index: game_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game_mod.h 25 Apr 2004 14:42:14 -0000 1.2
+++ game_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -95,24 +95,24 @@
struct R_GAME_FONTDESC {
- uint font_id;
- ulong font_rn;
+ uint16 font_id;
+ uint32 font_rn;
};
struct R_GAME_SCENEDESC {
- ulong scene_lut_rn;
- ulong first_scene;
+ uint32 scene_lut_rn;
+ uint32 first_scene;
};
struct R_GAME_RESOURCEDESC {
- ulong scene_lut_rn;
- ulong script_lut_rn;
- ulong command_panel_rn;
- ulong dialogue_panel_rn;
+ uint32 scene_lut_rn;
+ uint32 script_lut_rn;
+ uint32 command_panel_rn;
+ uint32 dialogue_panel_rn;
};
@@ -120,7 +120,7 @@
int GAME_Init(void);
-int GAME_GetFileContext(R_RSCFILE_CONTEXT ** ctxt_p, uint r_type, int param);
+int GAME_GetFileContext(R_RSCFILE_CONTEXT ** ctxt_p, uint16 r_type, int param);
int GAME_GetFontInfo(R_GAME_FONTDESC **, int *);
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gfx.cpp 28 Apr 2004 02:11:09 -0000 1.5
+++ gfx.cpp 30 Apr 2004 23:02:23 -0000 1.6
@@ -97,8 +97,8 @@
}
int GFX_SimpleBlit(R_SURFACE *dst_s, R_SURFACE *src_s) {
- uchar *src_p;
- uchar *dst_p;
+ byte *src_p;
+ byte *dst_p;
int y, w, p;
assert((dst_s != NULL) && (src_s != NULL));
@@ -148,11 +148,11 @@
int src_skip = src_s->buf_pitch - src_s->buf_w;
int dst_skip = dst_s->buf_pitch - dst_s->buf_w;
- uchar *src_ptr = src_s->buf;
- uchar *dst_ptr = dst_s->buf;
+ byte *src_ptr = src_s->buf;
+ byte *dst_ptr = dst_s->buf;
- uchar *src_row;
- uchar *dst_row;
+ byte *src_row;
+ byte *dst_row;
assert(dst_s->buf_w == (src_s->buf_w * 2));
assert(dst_s->buf_h == (src_s->buf_h * 2));
@@ -183,8 +183,8 @@
int src_skip;
int dest_skip;
- uchar *src_ptr = src_s->buf;
- uchar *dest_ptr = dst_s->buf;
+ byte *src_ptr = src_s->buf;
+ byte *dest_ptr = dst_s->buf;
short *src_row;
short *dest_row;
@@ -226,10 +226,10 @@
* - The surface must match the logical dimensions of the buffer exactly.
* - Returns R_FAILURE on error
\*--------------------------------------------------------------------------*/
-int GFX_BufToSurface(R_SURFACE *ds, const uchar *src, int src_w, int src_h,
+int GFX_BufToSurface(R_SURFACE *ds, const byte *src, int src_w, int src_h,
R_RECT *src_rect, R_POINT *dst_pt) {
- const uchar *read_p;
- uchar *write_p;
+ const byte *read_p;
+ byte *write_p;
int row;
@@ -352,10 +352,10 @@
return R_SUCCESS;
}
-int GFX_BufToBuffer(uchar *dst_buf, int dst_w, int dst_h, const uchar *src,
+int GFX_BufToBuffer(byte *dst_buf, int dst_w, int dst_h, const byte *src,
int src_w, int src_h, R_RECT *src_rect, R_POINT *dst_pt) {
- const uchar *read_p;
- uchar *write_p;
+ const byte *read_p;
+ byte *write_p;
int row;
@@ -475,7 +475,7 @@
}
int GFX_DrawCursor(R_SURFACE *ds, R_POINT *p1) {
- static uchar cursor_img[R_CURSOR_W * R_CURSOR_H] = {
+ static byte cursor_img[R_CURSOR_W * R_CURSOR_H] = {
0, 0, 0, 255, 0, 0, 0,
0, 0, 0, 255, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
@@ -487,7 +487,7 @@
R_CLIPINFO ci;
- uchar *src_p, *dst_p;
+ byte *src_p, *dst_p;
int x, y;
int src_skip, dst_skip;
@@ -547,7 +547,7 @@
* the specified color.
\*--------------------------------------------------------------------------*/
int GFX_DrawRect(R_SURFACE *ds, R_RECT *dst_rect, int color) {
- uchar *write_p;
+ byte *write_p;
int w;
int h;
@@ -821,7 +821,7 @@
* Performs no clipping
\*--------------------------------------------------------------------------*/
void GFX_DrawLine(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) {
- uchar *write_p;
+ byte *write_p;
int clip_result;
@@ -892,21 +892,21 @@
if (dx == 0) {
for (i = 0; i <= dy; i++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += ds->buf_pitch;
}
return;
}
if (dy == 0) {
for (i = 0; i <= dx; i++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += x_vector;
}
return;
}
if (dx == dy) {
for (i = 0; i <= dx; i++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += x_vector + ds->buf_pitch;
}
return;
@@ -929,7 +929,7 @@
/* Horiz. seg */
for (k = 0; k < init_run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += x_vector;
}
write_p += ds->buf_pitch;
@@ -945,7 +945,7 @@
/* Horiz. seg */
for (k = 0; k < run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += x_vector;
}
write_p += ds->buf_pitch;
@@ -954,7 +954,7 @@
/* Horiz. seg */
for (k = 0; k < end_run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += x_vector;
}
write_p += ds->buf_pitch;
@@ -983,7 +983,7 @@
/* Vertical seg */
for (k = 0; k < init_run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += ds->buf_pitch;
}
write_p += x_vector;
@@ -998,7 +998,7 @@
/* Vertical seg */
for (k = 0; k < run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += ds->buf_pitch;
}
write_p += x_vector;
@@ -1007,7 +1007,7 @@
/* Vertical seg */
for (k = 0; k < end_run; k++) {
- *write_p = (uchar) color;
+ *write_p = (byte) color;
write_p += ds->buf_pitch;
}
write_p += x_vector;
Index: gfx_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gfx_mod.h 25 Apr 2004 14:42:14 -0000 1.2
+++ gfx_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -69,14 +69,14 @@
int GFX_DrawPalette(R_SURFACE * dst_s);
int GFX_BufToSurface(R_SURFACE * ds,
- const uchar * src,
+ const byte * src,
int src_w, int src_h, R_RECT * src_rect, R_POINT * dst_pt);
int
-GFX_BufToBuffer(uchar * dst_buf,
+GFX_BufToBuffer(byte * dst_buf,
int dst_w,
int dst_h,
- const uchar * src,
+ const byte * src,
int src_w, int src_h, R_RECT * src_rect, R_POINT * dst_pt);
int GFX_DrawCursor(R_SURFACE * ds, R_POINT * p1);
Index: image.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/image.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- image.cpp 27 Apr 2004 11:44:17 -0000 1.2
+++ image.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -67,24 +67,24 @@
}
int
-IMG_DecodeBGImage(const uchar * image_data,
+IMG_DecodeBGImage(const byte * image_data,
size_t image_size,
- uchar ** output_buf, size_t * output_buf_len, int *w, int *h)
+ byte ** output_buf, size_t * output_buf_len, int *w, int *h)
{
R_IMAGE_HEADER hdr;
int modex_height;
- const uchar *RLE_data_ptr;
+ const byte *RLE_data_ptr;
size_t RLE_data_len;
- uchar *decode_buf;
+ byte *decode_buf;
size_t decode_buf_len;
- uchar *out_buf;
+ byte *out_buf;
size_t out_buf_len;
- const uchar *read_p = image_data;
+ const byte *read_p = image_data;
if (image_size <= SAGA_IMAGE_DATA_OFFSET) {
/* Image size is way too small */
@@ -102,10 +102,10 @@
modex_height = granulate(hdr.height, 4);
decode_buf_len = hdr.width * modex_height;
- decode_buf = (uchar *)malloc(decode_buf_len);
+ decode_buf = (byte *)malloc(decode_buf_len);
out_buf_len = hdr.width * hdr.height;
- out_buf = (uchar *)malloc(out_buf_len);
+ out_buf = (byte *)malloc(out_buf_len);
if (DecodeBGImageRLE(RLE_data_ptr,
RLE_data_len, decode_buf, decode_buf_len) != R_SUCCESS) {
@@ -137,31 +137,31 @@
}
int
-DecodeBGImageRLE(const uchar * inbuf,
- size_t inbuf_len, uchar * outbuf, size_t outbuf_len)
+DecodeBGImageRLE(const byte * inbuf,
+ size_t inbuf_len, byte * outbuf, size_t outbuf_len)
{
- const uchar *inbuf_ptr;
- uchar *outbuf_ptr;
- size_t inbuf_remain;
+ const byte *inbuf_ptr;
+ byte *outbuf_ptr;
+ uint16 inbuf_remain;
- const uchar *inbuf_end;
- uchar *outbuf_end;
- size_t outbuf_remain;
+ const byte *inbuf_end;
+ byte *outbuf_end;
+ uint16 outbuf_remain;
- uchar mark_byte;
+ byte mark_byte;
int test_byte;
- uint runcount;
+ uint16 runcount;
- uchar bitfield;
- uchar bitfield_byte1;
- uchar bitfield_byte2;
+ byte bitfield;
+ byte bitfield_byte1;
+ byte bitfield_byte2;
- uchar *backtrack_ptr;
+ byte *backtrack_ptr;
int backtrack_amount;
- uint c, b;
+ uint16 c, b;
int decode_err = 0;
@@ -368,18 +368,18 @@
return R_SUCCESS;
}
-int FlipImage(uchar * img_buf, int columns, int scanlines)
+int FlipImage(byte * img_buf, int columns, int scanlines)
{
int line;
- uchar *tmp_scan;
+ byte *tmp_scan;
- uchar *flip_p1;
- uchar *flip_p2;
+ byte *flip_p1;
+ byte *flip_p2;
int flipcount = scanlines / 2;
- tmp_scan = (uchar *)malloc(columns);
+ tmp_scan = (byte *)malloc(columns);
if (tmp_scan == NULL) {
return R_FAILURE;
}
@@ -403,8 +403,8 @@
}
int
-UnbankBGImage(uchar * dst_buf,
- const uchar * src_buf, int columns, int scanlines)
+UnbankBGImage(byte * dst_buf,
+ const byte * src_buf, int columns, int scanlines)
{
int x, y;
@@ -416,11 +416,11 @@
int rowjump_src;
int rowjump_dest;
- const uchar *src_p;
- uchar *dst_p;
+ const byte *src_p;
+ byte *dst_p;
- const uchar *srcptr1, *srcptr2, *srcptr3, *srcptr4;
- uchar *dstptr1, *dstptr2, *dstptr3, *dstptr4;
+ const byte *srcptr1, *srcptr2, *srcptr3, *srcptr4;
+ byte *dstptr1, *dstptr2, *dstptr3, *dstptr4;
quadruple_rows = scanlines - (scanlines % 4);
remain_rows = scanlines - quadruple_rows;
@@ -519,7 +519,7 @@
return R_SUCCESS;
}
-const uchar *IMG_GetImagePal(const uchar * image_data, size_t image_size)
+const byte *IMG_GetImagePal(const byte * image_data, size_t image_size)
{
if (image_size <= SAGA_IMAGE_HEADER_LEN) {
return NULL;
Index: image.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/image.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- image.h 25 Apr 2004 14:42:14 -0000 1.2
+++ image.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -49,14 +49,14 @@
};
int
-DecodeBGImageRLE(const uchar * inbuf,
- size_t inbuf_len, uchar * outbuf, size_t outbuf_len);
+DecodeBGImageRLE(const byte * inbuf,
+ size_t inbuf_len, byte * outbuf, size_t outbuf_len);
-int FlipImage(uchar * img_buf, int columns, int scanlines);
+int FlipImage(byte * img_buf, int columns, int scanlines);
int
-UnbankBGImage(uchar * dest_buf,
- const uchar * src_buf, int columns, int scanlines);
+UnbankBGImage(byte * dest_buf,
+ const byte * src_buf, int columns, int scanlines);
} // End of namespace Saga
Index: image_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/image_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- image_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ image_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -34,11 +34,11 @@
namespace Saga {
int
-IMG_DecodeBGImage(const uchar * image_data,
+IMG_DecodeBGImage(const byte * image_data,
size_t image_size,
- uchar ** output_buf, size_t * output_buf_len, int *w, int *h);
+ byte ** output_buf, size_t * output_buf_len, int *w, int *h);
-const uchar *IMG_GetImagePal(const uchar * image_data, size_t image_size);
+const byte *IMG_GetImagePal(const byte * image_data, size_t image_size);
} // End of namespace Saga
Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- interface.cpp 28 Apr 2004 02:11:09 -0000 1.3
+++ interface.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -544,7 +544,7 @@
int HandlePlayfieldClick(R_SURFACE *ds, R_POINT *imouse_pt) {
int hit_object;
int object_num;
- uint object_flags = 0;
+ uint16 object_flags = 0;
int script_num;
R_POINT iactor_pt;
@@ -588,7 +588,7 @@
int HandlePlayfieldUpdate(R_SURFACE *ds, R_POINT *imouse_pt) {
const char *object_name;
int object_num;
- uint object_flags = 0;
+ uint16 object_flags = 0;
char new_status[R_STATUS_TEXT_LEN];
Index: interface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- interface.h 25 Apr 2004 14:42:14 -0000 1.2
+++ interface.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -106,11 +106,11 @@
struct R_INTERFACE_PANEL {
- uchar *res;
+ byte *res;
size_t res_len;
int x;
int y;
- uchar *img;
+ byte *img;
size_t img_len;
int img_w;
int img_h;
Index: isomap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- isomap.cpp 25 Apr 2004 15:14:46 -0000 1.2
+++ isomap.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -55,15 +55,15 @@
return R_SUCCESS;
}
-int ISOMAP_LoadTileset(const uchar * tileres_p, size_t tileres_len)
+int ISOMAP_LoadTileset(const byte * tileres_p, size_t tileres_len)
{
R_ISOTILE_ENTRY first_entry;
R_ISOTILE_ENTRY *tile_tbl;
- uint i;
+ uint16 i;
- const uchar *read_p = tileres_p;
+ const byte *read_p = tileres_p;
size_t read_len = tileres_len;
assert((IsoModule.init) && (!IsoModule.tiles_loaded));
@@ -100,16 +100,16 @@
return R_SUCCESS;
}
-int ISOMAP_LoadMetaTileset(const uchar * mtileres_p, size_t mtileres_len)
+int ISOMAP_LoadMetaTileset(const byte * mtileres_p, size_t mtileres_len)
{
R_ISO_METATILE_ENTRY *mtile_tbl;
- const uchar *read_p = mtileres_p;
+ const byte *read_p = mtileres_p;
size_t read_len = mtileres_len;
- uint mtile_ct;
- uint ct;
+ uint16 mtile_ct;
+ uint16 ct;
int i;
@@ -148,10 +148,10 @@
return R_SUCCESS;
}
-int ISOMAP_LoadMetamap(const uchar * mm_res_p, size_t mm_res_len)
+int ISOMAP_LoadMetamap(const byte * mm_res_p, size_t mm_res_len)
{
- const uchar *read_p = mm_res_p;
+ const byte *read_p = mm_res_p;
size_t read_len = mm_res_len;
int i;
@@ -225,7 +225,7 @@
}
int
-ISOMAP_DrawMetaTile(R_SURFACE * dst_s, uint mtile_i, int mtile_x, int mtile_y)
+ISOMAP_DrawMetaTile(R_SURFACE * dst_s, uint16 mtile_i, int mtile_x, int mtile_y)
{
int tile_xi;
@@ -276,13 +276,13 @@
return R_SUCCESS;
}
-int ISOMAP_DrawTile(R_SURFACE * dst_s, uint tile_i, int tile_x, int tile_y)
+int ISOMAP_DrawTile(R_SURFACE * dst_s, uint16 tile_i, int tile_x, int tile_y)
{
- const uchar *tile_p;
- const uchar *read_p;
+ const byte *tile_p;
+ const byte *read_p;
- uchar *draw_p;
+ byte *draw_p;
int draw_x;
int draw_y;
Index: isomap.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- isomap.h 25 Apr 2004 14:42:14 -0000 1.2
+++ isomap.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -73,29 +73,29 @@
int init;
int tiles_loaded;
- const uchar *tileres_p;
+ const byte *tileres_p;
size_t tileres_len;
- uint tile_ct;
+ uint16 tile_ct;
R_ISOTILE_ENTRY *tile_tbl;
int mtiles_loaded;
- const uchar *mtileres_p;
+ const byte *mtileres_p;
size_t mtileres_len;
- uint mtile_ct;
+ uint16 mtile_ct;
R_ISO_METATILE_ENTRY *mtile_tbl;
int metamap_loaded;
int metamap_n;
- uint metamap_tbl[SAGA_METAMAP_SIZE];
- const uchar *mm_res_p;
+ uint16 metamap_tbl[SAGA_METAMAP_SIZE];
+ const byte *mm_res_p;
size_t mm_res_len;
};
-int ISOMAP_DrawTile(R_SURFACE * dst_s, uint tile_i, int tile_x, int tile_y);
+int ISOMAP_DrawTile(R_SURFACE * dst_s, uint16 tile_i, int tile_x, int tile_y);
int
-ISOMAP_DrawMetaTile(R_SURFACE * dst_s, uint mtile_i, int mtile_x, int mtile_y);
+ISOMAP_DrawMetaTile(R_SURFACE * dst_s, uint16 mtile_i, int mtile_x, int mtile_y);
int ISOMAP_DrawMetamap(R_SURFACE * dst_s, int map_x, int map_y);
Index: isomap_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- isomap_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ isomap_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -35,11 +35,11 @@
int ISOMAP_Init(void);
-int ISOMAP_LoadTileset(const uchar *, size_t);
+int ISOMAP_LoadTileset(const byte *, size_t);
-int ISOMAP_LoadMetaTileset(const uchar *, size_t);
+int ISOMAP_LoadMetaTileset(const byte *, size_t);
-int ISOMAP_LoadMetamap(const uchar * mm_res_p, size_t mm_res_len);
+int ISOMAP_LoadMetamap(const byte * mm_res_p, size_t mm_res_len);
int ISOMAP_Draw(R_SURFACE * dst_s);
Index: ite_introproc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ite_introproc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ite_introproc.h 25 Apr 2004 14:42:14 -0000 1.2
+++ ite_introproc.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -63,7 +63,7 @@
struct R_INTRO_DIALOGUE {
- ulong i_voice_rn;
+ uint32 i_voice_rn;
const char *i_cvar_name;
char i_str[R_INTRO_STRMAX];
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- music.cpp 30 Apr 2004 21:41:51 -0000 1.9
+++ music.cpp 30 Apr 2004 23:02:23 -0000 1.10
@@ -158,11 +158,11 @@
delete _player;
}
-int Music::play(ulong music_rn, uint flags) {
+int Music::play(uint32 music_rn, uint16 flags) {
R_RSCFILE_CONTEXT *rsc_ctxt = NULL;
const char *midi_file = NULL;
- uchar *resource_data;
+ byte *resource_data;
size_t resource_size;
if (!_musicInitialized) {
@@ -310,7 +310,7 @@
if (midi_file) {
debug(0, "Using external MIDI file: %s.mid", midi_file);
resource_size = f_midi.size();
- resource_data = (uchar *) malloc(resource_size);
+ resource_data = (byte *) malloc(resource_size);
f_midi.read(resource_data, resource_size);
f_midi.close();
Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- music.h 30 Apr 2004 07:13:26 -0000 1.3
+++ music.h 30 Apr 2004 23:02:23 -0000 1.4
@@ -100,7 +100,7 @@
~Music(void);
void hasNativeMT32(bool b) { _player->hasNativeMT32(b); }
- int play(ulong music_rn, uint flags);
+ int play(uint32 music_rn, uint16 flags);
int pause(void);
int resume(void);
int stop(void);
Index: objectmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- objectmap.cpp 28 Apr 2004 00:30:16 -0000 1.4
+++ objectmap.cpp 30 Apr 2004 23:02:23 -0000 1.5
@@ -101,7 +101,7 @@
return R_SUCCESS;
}
-int OBJECTMAP_Load(const uchar * om_res, size_t om_res_len)
+int OBJECTMAP_Load(const byte * om_res, size_t om_res_len)
/*--------------------------------------------------------------------------*\
* Loads an object map resource ( objects ( clickareas ( points ) ) )
\*--------------------------------------------------------------------------*/
@@ -320,7 +320,7 @@
return R_SUCCESS;
}
-int OBJECTMAP_GetFlags(int object, uint * flags)
+int OBJECTMAP_GetFlags(int object, uint16 * flags)
{
int i;
Index: objectmap.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- objectmap.h 25 Apr 2004 14:42:14 -0000 1.2
+++ objectmap.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -44,7 +44,7 @@
struct R_OBJECTMAP_ENTRY {
int unknown0;
- uint flags;
+ uint16 flags;
int object_num;
int script_num;
Index: objectmap_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- objectmap_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ objectmap_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -45,17 +45,17 @@
int OBJECTMAP_Shutdown(void);
-int OBJECTMAP_Load(const uchar * om_res, size_t om_res_len);
+int OBJECTMAP_Load(const byte * om_res, size_t om_res_len);
int OBJECTMAP_Free(void);
-int OBJECTMAP_LoadNames(const uchar * onl_res, size_t onl_res_len);
+int OBJECTMAP_LoadNames(const byte * onl_res, size_t onl_res_len);
int OBJECTMAP_FreeNames(void);
int OBJECTMAP_GetName(int object, const char **name);
-int OBJECTMAP_GetFlags(int object, uint * flags);
+int OBJECTMAP_GetFlags(int object, uint16 * flags);
int OBJECTMAP_GetEPNum(int object, int *ep_num);
Index: palanim.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/palanim.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- palanim.cpp 13 Apr 2004 09:18:36 -0000 1.2
+++ palanim.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -48,12 +48,12 @@
static PALANIM_DATA PAnimData;
-int PALANIM_Load(const uchar * resdata, size_t resdata_len)
+int PALANIM_Load(const byte * resdata, size_t resdata_len)
{
- const uchar *read_p = resdata;
+ const byte *read_p = resdata;
void *test_p;
- uint i;
+ uint16 i;
YS_IGNORE_PARAM(resdata_len);
@@ -108,7 +108,7 @@
return R_MEM;
}
- PAnimData.entries[i].pal_index = (uchar *)test_p;
+ PAnimData.entries[i].pal_index = (byte *)test_p;
# if 0
R_printf(R_STDOUT,
@@ -127,18 +127,18 @@
for (p = 0; p < pal_count; p++) {
PAnimData.entries[i].pal_index[p] =
- (uchar) ys_read_u8(read_p, &read_p);
+ (byte) ys_read_u8(read_p, &read_p);
}
for (c = 0; c < color_count; c++) {
PAnimData.entries[i].colors[c].red =
- (uchar) ys_read_u8(read_p, &read_p);
+ (byte) ys_read_u8(read_p, &read_p);
PAnimData.entries[i].colors[c].green =
- (uchar) ys_read_u8(read_p, &read_p);
+ (byte) ys_read_u8(read_p, &read_p);
PAnimData.entries[i].colors[c].blue =
- (uchar) ys_read_u8(read_p, &read_p);
+ (byte) ys_read_u8(read_p, &read_p);
}
}
@@ -172,12 +172,12 @@
R_SURFACE *back_buf;
static PALENTRY pal[256];
- uint pal_index;
- uint col_index;
+ uint16 pal_index;
+ uint16 col_index;
- uint i, j;
- uint cycle;
- uint cycle_limit;
+ uint16 i, j;
+ uint16 cycle;
+ uint16 cycle_limit;
R_EVENT event;
@@ -200,14 +200,14 @@
col_index = (cycle + j) % cycle_limit;
pal[pal_index].red =
- (uchar) PAnimData.entries[i].colors[col_index].red;
+ (byte) PAnimData.entries[i].colors[col_index].red;
pal[pal_index].green =
- (uchar) PAnimData.entries[i].colors[col_index].
+ (byte) PAnimData.entries[i].colors[col_index].
green;
pal[pal_index].blue =
- (uchar) PAnimData.entries[i].colors[col_index].
+ (byte) PAnimData.entries[i].colors[col_index].
blue;
}
@@ -234,7 +234,7 @@
int PALANIM_Free(void)
{
- uint i;
+ uint16 i;
if (!PAnimData.loaded) {
return R_FAILURE;
Index: palanim.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/palanim.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- palanim.h 25 Apr 2004 14:42:14 -0000 1.2
+++ palanim.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -39,11 +39,11 @@
struct PALANIM_ENTRY {
- uint pal_count;
- uint color_count;
- uint cycle;
+ uint16 pal_count;
+ uint16 color_count;
+ uint16 cycle;
- uchar *pal_index;
+ byte *pal_index;
R_COLOR *colors;
};
@@ -51,7 +51,7 @@
struct PALANIM_DATA {
int loaded;
- uint entry_count;
+ uint16 entry_count;
PALANIM_ENTRY *entries;
Index: palanim_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/palanim_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- palanim_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ palanim_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -33,7 +33,7 @@
namespace Saga {
-int PALANIM_Load(const uchar *, size_t);
+int PALANIM_Load(const byte *, size_t);
int PALANIM_CycleStart(void);
Index: reinherit.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/reinherit.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- reinherit.h 29 Apr 2004 03:52:59 -0000 1.11
+++ reinherit.h 30 Apr 2004 23:02:23 -0000 1.12
@@ -69,16 +69,6 @@
* Define common data types
\*--------------------------------------------------------------------------*/
-#ifndef HAVE_UCHAR
-typedef unsigned char uchar;
-#endif
-#ifndef HAVE_ULONG
-typedef unsigned long ulong;
-#endif
-#ifndef HAVE_UINT
-typedef unsigned int uint;
-#endif
-
typedef Common::Point R_POINT;
typedef Common::Rect R_RECT;
@@ -91,7 +81,7 @@
};
struct R_SURFACE {
- uchar *buf;
+ byte *buf;
int buf_w;
int buf_h;
int buf_pitch;
@@ -132,10 +122,10 @@
/*
* r_transitions.c
\*--------------------------------------------------------------------------*/
-int TRANSITION_Dissolve(uchar *dst_img,
+int TRANSITION_Dissolve(byte *dst_img,
int dst_w,
int dst_h,
- int dst_p, const uchar *src_img, int src_p, int flags, double percent);
+ int dst_p, const byte *src_img, int src_p, int flags, double percent);
/*--------------------------------------------------------------------------*\
* System specific routines
@@ -147,7 +137,6 @@
#define R_PAL_ENTRIES 256
struct R_SYSGFX_INIT {
-
int backbuf_w;
int backbuf_h;
int backbuf_bpp;
@@ -157,7 +146,6 @@
int screen_bpp;
int fullscreen;
-
};
int SYSGFX_Init(R_SYSGFX_INIT *);
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- render.cpp 27 Apr 2004 11:22:13 -0000 1.3
+++ render.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -171,7 +171,7 @@
RenderModule.r_bg_buf_w = disp_info.logical_w;
RenderModule.r_bg_buf_h = disp_info.logical_h;
- RenderModule.r_bg_buf = (uchar *)calloc(disp_info.logical_w,
+ RenderModule.r_bg_buf = (byte *)calloc(disp_info.logical_w,
disp_info.logical_h);
if (RenderModule.r_bg_buf == NULL) {
@@ -194,7 +194,7 @@
tmp_bytepp = 2;
}
- RenderModule.r_tmp_buf = (uchar *)calloc(1, tmp_w * tmp_h * tmp_bytepp);
+ RenderModule.r_tmp_buf = (byte *)calloc(1, tmp_w * tmp_h * tmp_bytepp);
if (RenderModule.r_tmp_buf == NULL) {
free(RenderModule.r_bg_buf);
Index: render.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- render.h 25 Apr 2004 14:42:14 -0000 1.2
+++ render.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -58,11 +58,11 @@
R_SURFACE *r_display_surface;
R_SURFACE *r_backbuf_surface;
- uchar *r_bg_buf;
+ byte *r_bg_buf;
int r_bg_buf_w;
int r_bg_buf_h;
- uchar *r_tmp_buf;
+ byte *r_tmp_buf;
int r_tmp_buf_w;
int r_tmp_buf_h;
Index: render_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- render_mod.h 25 Apr 2004 14:42:14 -0000 1.2
+++ render_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -55,11 +55,11 @@
struct R_BUFFER_INFO {
- uchar *r_bg_buf;
+ byte *r_bg_buf;
int r_bg_buf_w;
int r_bg_buf_h;
- uchar *r_tmp_buf;
+ byte *r_tmp_buf;
int r_tmp_buf_w;
int r_tmp_buf_h;
Index: rscfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rscfile.cpp 23 Apr 2004 11:40:51 -0000 1.2
+++ rscfile.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -114,17 +114,17 @@
int RSC_LoadRSC(R_RSCFILE_CONTEXT * rsc)
{
- ulong res_tbl_ct;
- ulong res_tbl_offset;
+ uint32 res_tbl_ct;
+ uint32 res_tbl_offset;
- uchar tblinfo_buf[RSC_TABLEINFO_SIZE];
- uchar *tbl_buf;
+ byte tblinfo_buf[RSC_TABLEINFO_SIZE];
+ byte *tbl_buf;
size_t tbl_len;
- ulong i;
+ uint32 i;
R_RSCFILE_RESOURCE *rsc_restbl;
- const uchar *read_p;
+ const byte *read_p;
read_p = tblinfo_buf;
@@ -155,7 +155,7 @@
* \*------------------------------------------------------------- */
tbl_len = RSC_TABLEENTRY_SIZE * res_tbl_ct;
- tbl_buf = (uchar *)malloc(tbl_len);
+ tbl_buf = (byte *)malloc(tbl_len);
if (tbl_buf == NULL) {
return R_FAILURE;
}
@@ -208,13 +208,13 @@
return R_SUCCESS;
}
-ulong RSC_GetResourceCount(R_RSCFILE_CONTEXT * rsc)
+uint32 RSC_GetResourceCount(R_RSCFILE_CONTEXT * rsc)
{
return (rsc == NULL) ? 0 : rsc->rc_res_ct;
}
int
-RSC_GetResourceSize(R_RSCFILE_CONTEXT * rsc, ulong res_num, ulong * res_size)
+RSC_GetResourceSize(R_RSCFILE_CONTEXT * rsc, uint32 res_num, uint32 * res_size)
{
if ((rsc == NULL) || (res_size == NULL)) {
return R_FAILURE;
@@ -231,7 +231,7 @@
int
RSC_GetResourceOffset(R_RSCFILE_CONTEXT * rsc,
- ulong res_num, ulong * res_offset)
+ uint32 res_num, uint32 * res_offset)
{
if ((rsc == NULL) || (res_offset == NULL)) {
return R_FAILURE;
@@ -248,11 +248,11 @@
int
RSC_LoadResource(R_RSCFILE_CONTEXT * rsc,
- ulong res_num, uchar ** res_p, size_t * res_size_p)
+ uint32 res_num, byte ** res_p, size_t * res_size_p)
{
- ulong res_offset;
+ uint32 res_offset;
size_t res_size;
- uchar *res_buf;
+ byte *res_buf;
if ((rsc == NULL) || (res_p == NULL)) {
return R_FAILURE;
@@ -267,7 +267,7 @@
rsc->rc_file.seek((long)res_offset, SEEK_SET);
- res_buf = (uchar *)malloc(res_size);
+ res_buf = (byte *)malloc(res_size);
if (res_buf == NULL) {
return R_MEM;
}
@@ -286,7 +286,7 @@
return R_SUCCESS;
}
-int RSC_FreeResource(uchar * resource_ptr)
+int RSC_FreeResource(byte * resource_ptr)
{
free(resource_ptr);
Index: rscfile_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- rscfile_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ rscfile_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -44,15 +44,15 @@
int RSC_CloseContext(R_RSCFILE_CONTEXT *);
-ulong RSC_GetResourceCount(R_RSCFILE_CONTEXT *);
+uint32 RSC_GetResourceCount(R_RSCFILE_CONTEXT *);
-int RSC_GetResourceSize(R_RSCFILE_CONTEXT *, ulong, ulong *);
+int RSC_GetResourceSize(R_RSCFILE_CONTEXT *, uint32, uint32 *);
-int RSC_GetResourceOffset(R_RSCFILE_CONTEXT *, ulong, ulong *);
+int RSC_GetResourceOffset(R_RSCFILE_CONTEXT *, uint32, uint32 *);
-int RSC_LoadResource(R_RSCFILE_CONTEXT *, ulong, uchar **, size_t *);
+int RSC_LoadResource(R_RSCFILE_CONTEXT *, uint32, byte **, size_t *);
-int RSC_FreeResource(uchar *);
+int RSC_FreeResource(byte *);
} // End of namespace Saga
Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- scene.cpp 27 Apr 2004 10:01:15 -0000 1.3
+++ scene.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -80,10 +80,10 @@
R_GAME_SCENEDESC gs_desc;
- uchar *scene_lut_p;
+ byte *scene_lut_p;
size_t scene_lut_len;
- const uchar *read_p;
+ const byte *read_p;
int result;
int i;
@@ -478,7 +478,7 @@
return R_SUCCESS;
}
-int SCENE_GetBGMaskInfo(int *w, int *h, uchar ** buf, size_t * buf_len)
+int SCENE_GetBGMaskInfo(int *w, int *h, byte ** buf, size_t * buf_len)
{
assert(SceneModule.init);
@@ -519,7 +519,7 @@
{
R_SCENE_INFO scene_info;
- ulong res_number = 0;
+ uint32 res_number = 0;
int result;
int i;
@@ -652,13 +652,13 @@
return R_SUCCESS;
}
-int LoadSceneDescriptor(ulong res_number)
+int LoadSceneDescriptor(uint32 res_number)
{
- uchar *scene_desc_data;
+ byte *scene_desc_data;
size_t scene_desc_len;
- const uchar *read_p;
+ const byte *read_p;
int result;
@@ -694,13 +694,13 @@
return R_SUCCESS;
}
-int LoadSceneResourceList(ulong reslist_rn)
+int LoadSceneResourceList(uint32 reslist_rn)
{
- uchar *resource_list;
+ byte *resource_list;
size_t resource_list_len;
- const uchar *read_p;
+ const byte *read_p;
int result;
int i;
@@ -759,10 +759,10 @@
int ProcessSceneResources(void)
{
- const uchar *res_data;
+ const byte *res_data;
size_t res_data_len;
- const uchar *pal_p;
+ const byte *pal_p;
int i;
@@ -951,7 +951,7 @@
case SAGA_ANIM_7:
{
SCENE_ANIMINFO *new_animinfo;
- uint new_anim_id;
+ uint16 new_anim_id;
R_printf(R_STDOUT,
"Loading animation resource...\n");
Index: scene.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- scene.h 25 Apr 2004 14:42:14 -0000 1.2
+++ scene.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -71,10 +71,10 @@
struct R_SCENE_RESLIST {
- ulong res_number;
+ uint32 res_number;
int res_type;
- uchar *res_data;
+ byte *res_data;
size_t res_data_len;
};
@@ -105,10 +105,10 @@
int h;
int p;
- uchar *buf;
+ byte *buf;
size_t buf_len;
- uchar *res_buf;
+ byte *res_buf;
size_t res_len;
PALENTRY pal[256];
@@ -126,7 +126,7 @@
struct R_SCENE_QUEUE {
- ulong scene_n;
+ uint32 scene_n;
R_SCENE_DESC *scene_desc;
int load_flag;
@@ -181,9 +181,9 @@
SCENE_Load(int scene,
int load_flag, R_SCENE_PROC scene_proc, R_SCENE_DESC *);
-int LoadSceneDescriptor(ulong res_number);
+int LoadSceneDescriptor(uint32 res_number);
-int LoadSceneResourceList(ulong res_number);
+int LoadSceneResourceList(uint32 res_number);
int ProcessSceneResources(void);
Index: scene_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene_mod.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- scene_mod.h 25 Apr 2004 14:42:14 -0000 1.2
+++ scene_mod.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -61,7 +61,7 @@
int bg_h;
int bg_p;
- uchar *bg_buf;
+ byte *bg_buf;
size_t bg_buflen;
};
@@ -89,7 +89,7 @@
int SCENE_Draw(R_SURFACE *);
int SCENE_GetMode(void);
-int SCENE_GetBGMaskInfo(int *w, int *h, uchar ** buf, size_t * buf_len);
+int SCENE_GetBGMaskInfo(int *w, int *h, byte ** buf, size_t * buf_len);
int SCENE_IsBGMaskPresent(void);
int SCENE_GetBGInfo(SCENE_BGINFO * bginfo);
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- script.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ script.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -77,11 +77,11 @@
{
R_RSCFILE_CONTEXT *s_lut_ctxt;
- uchar *rsc_ptr;
+ byte *rsc_ptr;
size_t rsc_len;
- const uchar *read_ptr;
- const uchar *read_ptr2;
+ const byte *read_ptr;
+ const byte *read_ptr2;
int result;
int i;
@@ -232,17 +232,17 @@
R_SCRIPTDATA *script_data;
- uchar *bytecode_p;
+ byte *bytecode_p;
size_t bytecode_len;
- ulong scriptl_rn;
+ uint32 scriptl_rn;
- uchar *diagl_p;
+ byte *diagl_p;
size_t diagl_len;
- ulong diagl_rn;
+ uint32 diagl_rn;
- uchar *voicelut_p;
+ byte *voicelut_p;
size_t voicelut_len;
- ulong voicelut_rn;
+ uint32 voicelut_rn;
int result;
@@ -415,7 +415,7 @@
return R_SUCCESS;
}
-R_SCRIPT_BYTECODE *SCRIPT_LoadBytecode(uchar * bytecode_p,
+R_SCRIPT_BYTECODE *SCRIPT_LoadBytecode(byte * bytecode_p,
size_t bytecode_len)
/*--------------------------------------------------------------------------*\
* Reads the entrypoint table from a script bytecode resource in memory.
@@ -423,7 +423,7 @@
\*--------------------------------------------------------------------------*/
{
- const uchar *read_p = bytecode_p;
+ const byte *read_p = bytecode_p;
R_PROC_TBLENTRY *bc_ep_tbl = NULL;
R_SCRIPT_BYTECODE *bc_new_data = NULL;
@@ -494,7 +494,7 @@
}
}
- bc_new_data->bytecode_p = (uchar *) bytecode_p;
+ bc_new_data->bytecode_p = (byte *) bytecode_p;
bc_new_data->bytecode_len = bytecode_len;
bc_new_data->n_entrypoints = n_entrypoints;
@@ -504,19 +504,19 @@
return bc_new_data;
}
-R_DIALOGUE_LIST *SCRIPT_LoadDialogue(const uchar * dialogue_p,
+R_DIALOGUE_LIST *SCRIPT_LoadDialogue(const byte * dialogue_p,
size_t dialogue_len)
/*--------------------------------------------------------------------------*\
* Reads a logical dialogue list from a dialogue list resource in memory.
* Returns NULL on failure.
\*--------------------------------------------------------------------------*/
{
- const uchar *read_p = dialogue_p;
+ const byte *read_p = dialogue_p;
R_DIALOGUE_LIST *dialogue_list;
- uint n_dialogue;
+ uint16 n_dialogue;
- uint i;
+ uint16 i;
size_t offset;
R_printf(R_STDOUT, "Loading dialogue list...\n");
@@ -572,19 +572,19 @@
return dialogue_list;
}
-R_VOICE_LUT *SCRIPT_LoadVoiceLUT(const uchar * voicelut_p,
+R_VOICE_LUT *SCRIPT_LoadVoiceLUT(const byte * voicelut_p,
size_t voicelut_len, R_SCRIPTDATA * script)
/*--------------------------------------------------------------------------*\
* Reads a logical voice LUT from a voice LUT resource in memory.
* Returns NULL on failure.
\*--------------------------------------------------------------------------*/
{
- const uchar *read_p = voicelut_p;
+ const byte *read_p = voicelut_p;
R_VOICE_LUT *voice_lut;
- uint n_voices;
- uint i;
+ uint16 n_voices;
+ uint16 i;
voice_lut = (R_VOICE_LUT *)malloc(sizeof *voice_lut);
if (voice_lut == NULL) {
@@ -615,8 +615,8 @@
void CF_script_info(int argc, char *argv[])
{
- ulong n_entrypoints;
- ulong i;
+ uint32 n_entrypoints;
+ uint32 i;
char *name_ptr;
if (ScriptModule.current_script == NULL) {
@@ -645,7 +645,7 @@
void CF_script_exec(int argc, char *argv[])
{
- uint ep_num;
+ uint16 ep_num;
if (argc < 1) {
return;
Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- script.h 25 Apr 2004 14:42:14 -0000 1.2
+++ script.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -118,7 +118,7 @@
int voice_lut_present;
R_SCRIPT_LUT_ENTRY *script_lut;
int script_lut_max;
- uint script_lut_entrylen;
+ uint16 script_lut_entrylen;
R_SCRIPTDATA *current_script;
YS_DL_LIST *thread_list;
@@ -133,13 +133,13 @@
extern R_SCRIPT_MODULE ScriptModule;
-R_SCRIPT_BYTECODE *SCRIPT_LoadBytecode(uchar * bytecode_p,
+R_SCRIPT_BYTECODE *SCRIPT_LoadBytecode(byte * bytecode_p,
size_t bytecode_len);
-R_DIALOGUE_LIST *SCRIPT_LoadDialogue(const uchar * dialogue_p,
+R_DIALOGUE_LIST *SCRIPT_LoadDialogue(const byte * dialogue_p,
size_t dialogue_len);
-R_VOICE_LUT *SCRIPT_LoadVoiceLUT(const uchar * voicelut_p,
+R_VOICE_LUT *SCRIPT_LoadVoiceLUT(const byte * voicelut_p,
size_t voicelut_len, R_SCRIPTDATA * script);
int
Index: script_mod.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script_mod.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- script_mod.h 12 Apr 2004 21:40:47 -0000 1.1
+++ script_mod.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -70,7 +70,7 @@
int SDATA_ReadWordS(SDataWord_T word);
-uint SDATA_ReadWordU(SDataWord_T word);
+uint16 SDATA_ReadWordU(SDataWord_T word);
R_SCRIPT_THREAD *STHREAD_Create(void);
Index: sdata.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sdata.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sdata.cpp 12 Apr 2004 21:40:47 -0000 1.1
+++ sdata.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -188,7 +188,7 @@
int SDATA_ReadWordS(SDataWord_T word)
{
- uint u_int = word;
+ uint16 u_int = word;
int s_int;
if (u_int & 0x8000U) {
@@ -200,9 +200,9 @@
return s_int;
}
-uint SDATA_ReadWordU(SDataWord_T word)
+uint16 SDATA_ReadWordU(SDataWord_T word)
{
- uint u_int = (uint) word;
+ uint16 u_int = (uint16) word;
return u_int;
}
Index: sdebug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sdebug.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sdebug.cpp 12 Apr 2004 21:40:48 -0000 1.1
+++ sdebug.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -59,8 +59,8 @@
R_TEXTLIST_ENTRY tl_e;
- const uchar *start_p;
- const uchar *read_p;
+ const byte *start_p;
+ const byte *read_p;
char tmp_buf[80] = { 0 };
static char disp_buf[SD_DISPLAY_LEN] = { 0 };
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sfuncs.cpp 12 Apr 2004 21:40:48 -0000 1.1
+++ sfuncs.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -598,7 +598,7 @@
int actor_idx;
int action;
- /*uint flags; */
+ /*uint16 flags; */
SSTACK_Pop(thread->stack, &actor_parm);
@@ -644,7 +644,7 @@
int actor_idx;
int action;
- /*uint flags; */
+ /*uint16 flags; */
SSTACK_Pop(thread->stack, &actor_parm);
@@ -687,8 +687,8 @@
int tframes;
- uint anim_id1;
- uint anim_id2;
+ uint16 anim_id1;
+ uint16 anim_id2;
SSTACK_Pop(thread->stack, &anim1_parm);
SSTACK_Pop(thread->stack, &anim2_parm);
Index: sndres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sndres.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sndres.cpp 30 Apr 2004 17:49:33 -0000 1.8
+++ sndres.cpp 30 Apr 2004 23:02:23 -0000 1.9
@@ -71,7 +71,7 @@
_init = 1;
}
-int SndRes::playVoice(ulong voice_rn) {
+int SndRes::playVoice(uint32 voice_rn) {
R_SOUNDBUFFER snd_buffer;
int result;
@@ -92,8 +92,8 @@
return R_SUCCESS;
}
-int SndRes::load(R_RSCFILE_CONTEXT *snd_ctxt, ulong snd_rn, R_SOUNDBUFFER *snd_buf_i) {
- uchar *snd_res;
+int SndRes::load(R_RSCFILE_CONTEXT *snd_ctxt, uint32 snd_rn, R_SOUNDBUFFER *snd_buf_i) {
+ byte *snd_res;
size_t snd_res_len;
int result;
@@ -149,8 +149,8 @@
long byte_rate;
- const uchar *read_p;
- size_t read_len;
+ const byte *read_p;
+ uint16 read_len;
read_p = snd_res;
read_len = snd_res_len;
@@ -235,8 +235,8 @@
return R_SUCCESS;
}
-int SndRes::getVoiceLength(ulong voice_rn) {
- ulong length;
+int SndRes::getVoiceLength(uint32 voice_rn) {
+ uint32 length;
double ms_f;
int ms_i = -1;
@@ -267,20 +267,20 @@
return ms_i;
}
-int SndRes::ITEVOC_Resample(long src_freq, long dst_freq, uchar *src_buf,
- size_t src_buf_len, uchar **dst_buf, size_t *dst_buf_len) {
- uchar *resamp_buf;
+int SndRes::ITEVOC_Resample(long src_freq, long dst_freq, byte *src_buf,
+ size_t src_buf_len, byte **dst_buf, size_t *dst_buf_len) {
+ byte *resamp_buf;
size_t resamp_len;
- uchar src_samp_a;
- uchar src_samp_b;
+ byte src_samp_a;
+ byte src_samp_b;
- const uchar *read_pa;
- const uchar *read_pb;
+ const byte *read_pa;
+ const byte *read_pb;
- uchar *write_pa;
- uchar *write_pb;
- uchar *write_pc;
+ byte *write_pa;
+ byte *write_pb;
+ byte *write_pc;
size_t src_i;
@@ -288,7 +288,7 @@
assert(dst_freq == 22050);
resamp_len = (size_t) (src_buf_len * 1.5);
- resamp_buf = (uchar *)malloc(resamp_len);
+ resamp_buf = (byte *)malloc(resamp_len);
if (resamp_buf == NULL) {
return R_FAILURE;
}
@@ -308,7 +308,7 @@
read_pb += 2;
*write_pa = src_samp_a;
- *write_pb = (uchar) ((src_samp_a / 2) + (src_samp_b / 2));
+ *write_pb = (byte) ((src_samp_a / 2) + (src_samp_b / 2));
*write_pc = src_samp_b;
write_pa += 3;
Index: sndres.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sndres.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sndres.h 29 Apr 2004 01:24:18 -0000 1.7
+++ sndres.h 30 Apr 2004 23:02:23 -0000 1.8
@@ -45,24 +45,24 @@
struct R_VOC_HEADER_BLOCK {
char ft_desc[20]; /* BYTE [20] */
- uint db_offset; /* WORD */
- uint voc_version; /* WORD */
- uint voc_fileid; /* WORD */
+ uint16 db_offset; /* WORD */
+ uint16 voc_version; /* WORD */
+ uint16 voc_fileid; /* WORD */
};
#define R_VOC_HEADER_BLOCK_LEN 26
struct R_VOC_GENBLOCK {
int block_id; /* BYTE */
- ulong block_len; /* BYTE[3] */
+ uint32 block_len; /* BYTE[3] */
};
#define R_VOC_GENBLOCK_LEN 4
struct R_VOC_BLOCK1 {
int block_id; /* BYTE */
- ulong block_len; /* BYTE[3] */
- uint time_constant; /* BYTE */
+ uint32 block_len; /* BYTE[3] */
+ uint16 time_constant; /* BYTE */
int pack_method; /* BYTE */
};
@@ -71,14 +71,14 @@
SndRes(SagaEngine *vm);
- int loadSound(ulong sound_rn);
- int playVoice(ulong voice_rn);
- int getVoiceLength(ulong voice_rn);
- int ITEVOC_Resample(long src_freq, long dst_freq, uchar *src_buf,
- size_t src_buf_len, uchar **dst_buf, size_t *dst_buf_len);
+ int loadSound(uint32 sound_rn);
+ int playVoice(uint32 voice_rn);
+ int getVoiceLength(uint32 voice_rn);
+ int ITEVOC_Resample(long src_freq, long dst_freq, byte *src_buf,
+ size_t src_buf_len, byte **dst_buf, size_t *dst_buf_len);
private:
- int load(R_RSCFILE_CONTEXT *snd_ctxt, ulong snd_rn, R_SOUNDBUFFER *snd_buf_i);
+ int load(R_RSCFILE_CONTEXT *snd_ctxt, uint32 snd_rn, R_SOUNDBUFFER *snd_buf_i);
int loadVocSound(byte *snd_res, size_t snd_res_len, R_SOUNDBUFFER *snd_buf_i);
int _init;
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sound.h 29 Apr 2004 03:52:59 -0000 1.4
+++ sound.h 30 Apr 2004 23:02:23 -0000 1.5
@@ -41,12 +41,12 @@
byte *res_data;
uint32 res_len;
- uint s_freq;
+ uint16 s_freq;
int s_samplebits;
int s_stereo;
int s_signed;
- const uchar *s_buf;
+ const byte *s_buf;
size_t s_buf_len;
};
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sprite.cpp 25 Apr 2004 15:14:46 -0000 1.3
+++ sprite.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -74,7 +74,7 @@
SpriteModule.decode_buf_len = R_DECODE_BUF_LEN;
- SpriteModule.decode_buf = (uchar *)malloc(R_DECODE_BUF_LEN);
+ SpriteModule.decode_buf = (byte *)malloc(R_DECODE_BUF_LEN);
if (SpriteModule.decode_buf == NULL) {
return R_MEM;
}
@@ -101,13 +101,13 @@
{
R_SPRITELIST *new_slist;
- uchar *spritelist_data;
+ byte *spritelist_data;
size_t spritelist_len;
- const uchar *read_p;
+ const byte *read_p;
- uint sprite_count;
- uint i;
+ uint16 sprite_count;
+ uint16 i;
new_slist = (R_SPRITELIST *)malloc(sizeof *new_slist);
if (new_slist == NULL) {
@@ -153,16 +153,16 @@
int SPRITE_AppendList(int resource_num, R_SPRITELIST * spritelist)
{
- uchar *spritelist_data;
+ byte *spritelist_data;
size_t spritelist_len;
- const uchar *read_p;
+ const byte *read_p;
void *test_p;
- uint old_sprite_count;
- uint new_sprite_count;
- uint sprite_count;
+ uint16 old_sprite_count;
+ uint16 new_sprite_count;
+ uint16 sprite_count;
int i;
@@ -236,15 +236,15 @@
int offset;
int offset_idx;
- uchar *sprite_p;
+ byte *sprite_p;
- const uchar *sprite_data_p;
- const uchar *read_p;
+ const byte *sprite_data_p;
+ const byte *read_p;
int i, j;
- uchar *buf_row_p;
- uchar *src_row_p;
+ byte *buf_row_p;
+ byte *src_row_p;
int s_width;
int s_height;
@@ -265,7 +265,7 @@
sprite_p = sprite_list->sprite_data[offset_idx];
sprite_p += offset;
- read_p = (uchar *) sprite_p;
+ read_p = (byte *) sprite_p;
x_align = ys_read_s8(read_p, &read_p);
y_align = ys_read_s8(read_p, &read_p);
@@ -326,18 +326,18 @@
int offset;
int offset_idx;
- uchar *sprite_p;
- const uchar *sprite_data_p;
- const uchar *read_p;
+ byte *sprite_p;
+ const byte *sprite_data_p;
+ const byte *read_p;
int i;
int x, y;
- uchar *dst_row_p;
- uchar *src_row_p;
- uchar *src_p;
- uchar *dst_p;
- uchar *mask_p;
+ byte *dst_row_p;
+ byte *src_row_p;
+ byte *src_p;
+ byte *dst_p;
+ byte *mask_p;
int s_width;
int s_height;
@@ -357,10 +357,10 @@
/* BG mask variables */
int mask_w;
int mask_h;
- uchar *mask_buf;
+ byte *mask_buf;
size_t mask_buf_len;
- uchar *mask_row_p;
+ byte *mask_row_p;
int mask_z;
/* Z info variables */
@@ -499,18 +499,18 @@
}
int
-DecodeRLESprite(const uchar * inbuf,
- size_t inbuf_len, uchar * outbuf, size_t outbuf_len)
+DecodeRLESprite(const byte * inbuf,
+ size_t inbuf_len, byte * outbuf, size_t outbuf_len)
{
int bg_runcount;
int fg_runcount;
- const uchar *inbuf_ptr;
- uchar *outbuf_ptr;
+ const byte *inbuf_ptr;
+ byte *outbuf_ptr;
- const uchar *inbuf_end;
- uchar *outbuf_end;
+ const byte *inbuf_end;
+ byte *outbuf_end;
int c;
@@ -540,7 +540,7 @@
for (c = 0; c < bg_runcount; c++) {
- *outbuf_ptr = (uchar) 0;
+ *outbuf_ptr = (byte) 0;
if (outbuf_ptr < outbuf_end)
outbuf_ptr++;
else
Index: sprite.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sprite.h 25 Apr 2004 14:42:14 -0000 1.2
+++ sprite.h 30 Apr 2004 23:02:23 -0000 1.3
@@ -51,7 +51,7 @@
struct R_SPRITELIST_OFFSET {
- uint data_idx;
+ uint16 data_idx;
size_t offset;
};
@@ -64,7 +64,7 @@
R_SPRITELIST_OFFSET *offset_list;
int slist_rn;
- uchar *sprite_data[R_APPENDMAX];
+ byte *sprite_data[R_APPENDMAX];
};
@@ -74,14 +74,14 @@
R_RSCFILE_CONTEXT *sprite_ctxt;
- uchar *decode_buf;
+ byte *decode_buf;
size_t decode_buf_len;
};
int
-DecodeRLESprite(const uchar * inbuf,
- size_t inbuf_len, uchar * outbuf, size_t outbuf_len);
+DecodeRLESprite(const byte * inbuf,
+ size_t inbuf_len, byte * outbuf, size_t outbuf_len);
} // End of namespace Saga
Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sthread.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ sthread.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -170,7 +170,7 @@
thread->i_offset;
}
-unsigned long GetReadOffset(const uchar * read_p)
+unsigned long GetReadOffset(const byte * read_p)
{
return (unsigned long)(read_p - (unsigned char *)
@@ -217,8 +217,8 @@
int instr_count;
- const uchar *read_p;
- ulong saved_offset;
+ const byte *read_p;
+ uint32 saved_offset;
SDataWord_T param1;
SDataWord_T param2;
@@ -448,7 +448,7 @@
case 0x18:
{
int n_args;
- uint func_num;
+ uint16 func_num;
int FIXME_SHADOWED_result;
SFunc_T sfunc;
Index: sthread.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sthread.h 12 Apr 2004 21:40:48 -0000 1.1
+++ sthread.h 30 Apr 2004 23:02:23 -0000 1.2
@@ -60,7 +60,7 @@
int STHREAD_SetEntrypoint(R_SCRIPT_THREAD *thread, int ep_num);
int STHREAD_Execute(R_SCRIPT_THREAD *thread, int ep_num);
int STHREAD_Run(R_SCRIPT_THREAD *thread, int instr_limit, int msec);
-unsigned long GetReadOffset(const uchar *read_p);
+unsigned long GetReadOffset(const byte *read_p);
unsigned char *GetReadPtr(R_SCRIPT_THREAD *thread);
int SDEBUG_PrintInstr(R_SCRIPT_THREAD *thread);
Index: sysgfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sysgfx.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sysgfx.cpp 30 Apr 2004 21:41:51 -0000 1.3
+++ sysgfx.cpp 30 Apr 2004 23:02:23 -0000 1.4
@@ -86,7 +86,7 @@
sdl_screen->w, sdl_screen->h, sdl_screen->format->BitsPerPixel);
/* Convert sdl surface data to R surface data */
- r_screen.buf = (uchar *)sdl_screen->pixels;
+ r_screen.buf = (byte *)sdl_screen->pixels;
r_screen.buf_w = sdl_screen->w;
r_screen.buf_h = sdl_screen->h;
r_screen.buf_pitch = sdl_screen->pitch;
@@ -116,7 +116,7 @@
}
/* Convert sdl surface data to R surface data */
- r_back_buf.buf = (uchar *)sdl_back_buf->pixels;
+ r_back_buf.buf = (byte *)sdl_back_buf->pixels;
r_back_buf.buf_w = sdl_back_buf->w;
r_back_buf.buf_h = sdl_back_buf->h;
r_back_buf.buf_pitch = sdl_back_buf->pitch;
@@ -181,7 +181,7 @@
return NULL;
}
- new_r_surface->buf = (uchar *)new_sdl_surface->pixels;
+ new_r_surface->buf = (byte *)new_sdl_surface->pixels;
new_r_surface->buf_w = new_sdl_surface->w;
new_r_surface->buf_h = new_sdl_surface->h;
new_r_surface->buf_pitch = new_sdl_surface->pitch;
@@ -295,9 +295,9 @@
int SYSGFX_SetPalette(R_SURFACE *surface, PALENTRY *pal) {
- uchar red;
- uchar green;
- uchar blue;
+ byte red;
+ byte green;
+ byte blue;
int color_delta;
int best_wdelta = 0;
@@ -388,7 +388,7 @@
if (new_entry < 0) {
cur_pal[i].r = 0;
} else {
- cur_pal[i].r = (uchar) new_entry;
+ cur_pal[i].r = (byte) new_entry;
}
new_entry = (int)(src_pal[i].green * fpercent);
@@ -396,7 +396,7 @@
if (new_entry < 0) {
cur_pal[i].g = 0;
} else {
- cur_pal[i].g = (uchar) new_entry;
+ cur_pal[i].g = (byte) new_entry;
}
new_entry = (int)(src_pal[i].blue * fpercent);
@@ -404,7 +404,7 @@
if (new_entry < 0) {
cur_pal[i].b = 0;
} else {
- cur_pal[i].b = (uchar) new_entry;
+ cur_pal[i].b = (byte) new_entry;
}
}
@@ -450,7 +450,7 @@
if (new_entry < 0) {
cur_pal[i].r = 0;
} else {
- cur_pal[i].r = (uchar) new_entry;
+ cur_pal[i].r = (byte) new_entry;
}
new_entry =
@@ -459,7 +459,7 @@
if (new_entry < 0) {
cur_pal[i].g = 0;
} else {
- cur_pal[i].g = (uchar) new_entry;
+ cur_pal[i].g = (byte) new_entry;
}
new_entry =
@@ -468,7 +468,7 @@
if (new_entry < 0) {
cur_pal[i].b = 0;
} else {
- cur_pal[i].b = (uchar) new_entry;
+ cur_pal[i].b = (byte) new_entry;
}
}
Index: systimer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/systimer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- systimer.cpp 27 Apr 2004 11:22:13 -0000 1.2
+++ systimer.cpp 30 Apr 2004 23:02:23 -0000 1.3
@@ -106,7 +106,7 @@
return R_SUCCESS;
}
-int SYSTIMER_Sleep(uint msec)
+int SYSTIMER_Sleep(uint16 msec)
{
SDL_Delay(msec);
Index: systimer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/systimer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- systimer.h 27 Apr 2004 11:22:13 -0000 1.3
+++ systimer.h 30 Apr 2004 23:02:23 -0000 1.4
@@ -33,7 +33,7 @@
unsigned long SYSTIMER_ReadMSCounter(void);
int SYSTIMER_ResetMSCounter(void);
-int SYSTIMER_Sleep(uint msec);
+int SYSTIMER_Sleep(uint16 msec);
int SYSTIMER_CreateTimer(R_SYSTIMER **,
unsigned long, void *, R_SYSTIMER_CALLBACK);
int SYSTIMER_DestroyTimer(R_SYSTIMER *);
Index: transitions.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/transitions.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- transitions.cpp 12 Apr 2004 21:40:48 -0000 1.1
+++ transitions.cpp 30 Apr 2004 23:02:23 -0000 1.2
@@ -38,10 +38,10 @@
namespace Saga {
int
-TRANSITION_Dissolve(uchar * dst_img,
+TRANSITION_Dissolve(byte * dst_img,
int dst_w,
int dst_h,
- int dst_p, const uchar * src_img, int src_p, int flags, double percent)
+ int dst_p, const byte * src_img, int src_p, int flags, double percent)
{
#define XOR_MASK 0xB400;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga music.cpp,1.8,1.9 sysgfx.cpp,1.2,1.3 sysgfx.h,1.2,1.3
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.cpp,1.2,1.3 actionmap.h,1.3,1.4 actionmap_mod.h,1.2,1.3 actor.cpp,1.6,1.7 actor.h,1.3,1.4 actor_mod.h,1.3,1.4 actordata.cpp,1.1,1.2 actordata.h,1.2,1.3 animation.cpp,1.2,1.3 animation.h,1.3,1.4 animation_mod.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list