[Scummvm-cvs-logs] CVS: scummvm/saga console.cpp,1.2,1.3 game.cpp,1.3,1.4 gfx.cpp,1.2,1.3 gfx.h,1.1,1.2 ihnm_introproc.cpp,1.2,1.3 interface.cpp,1.1,1.2 isomap.cpp,1.1,1.2 ite_introproc.cpp,1.2,1.3 objectmap.cpp,1.2,1.3 reinherit.h,1.3,1.4 sprite.cpp,1.2,1.3 sysgfx.cpp,1.1,1.2 yslib.h,1.2,1.3
Max Horn
fingolfin at users.sourceforge.net
Sun Apr 25 08:26:06 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.h,1.1,1.2 actor.cpp,1.1,1.2 actor.h,1.1,1.2 actor_mod.h,1.1,1.2 actordata.h,1.1,1.2 animation.h,1.1,1.2 console.cpp,1.1,1.2 console.h,1.1,1.2 cvar.cpp,1.1,1.2 cvar.h,1.1,1.2 cvar_mod.h,1.1,1.2 events.cpp,1.2,1.3 events_mod.h,1.1,1.2 expr.cpp,1.1,1.2 font.cpp,1.1,1.2 font.h,1.1,1.2 game.cpp,1.2,1.3 game.h,1.1,1.2 game_mod.h,1.1,1.2 gfx.cpp,1.1,1.2 gfx_mod.h,1.1,1.2 ihnm_introproc.cpp,1.1,1.2 image.h,1.1,1.2 interface.h,1.1,1.2 isomap.h,1.1,1.2 ite_introproc.cpp,1.1,1.2 ite_introproc.h,1.1,1.2 module.mk,1.3,1.4 objectmap.cpp,1.1,1.2 objectmap.h,1.1,1.2 palanim.h,1.1,1.2 reinherit.h,1.2,1.3 render.cpp,1.1,1.2 render.h,1.1,1.2 render_mod.h,1.1,1.2 rscfile.h,1.2,1.3 saga.cpp,1.5,1.6 scene.cpp,1.1,1.2 scene.h,1.1,1.2 scene_mod.h,1.1,1.2 sceneproc.cpp,1.1,1.2 script.cpp,1.1,1.2 script.h,1.1,1.2 sdata.h,1.1,1.2 sfuncs.h,1.1,1.2 sndres.cpp,1.1,1.2 sndres.h,1.1,1.2 sprite.cpp,1.1,1.2 sprite.h,1.1,1.2 sthread.cpp,1.1,1.2 sysgfx.h,1.1,1.2 systimer.h,1.1,1.2 text_mod.h,1.1,1.2 xmidi.cpp,1.1,1.2 xmidi.h,1.1,1.2 xmidi_mod.h,1.1,1.2 ys_binread.cpp,1.1,1.2 yslib.h,1.1,1.2 x86_32.h,1.2,NONE ys_file.cpp,1.1,NONE
- Next message: [Scummvm-cvs-logs] CVS: scummvm TODO,1.117,1.118
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13671
Modified Files:
console.cpp game.cpp gfx.cpp gfx.h ihnm_introproc.cpp
interface.cpp isomap.cpp ite_introproc.cpp objectmap.cpp
reinherit.h sprite.cpp sysgfx.cpp yslib.h
Log Message:
More ScummVMification
Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/console.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- console.cpp 25 Apr 2004 14:42:13 -0000 1.2
+++ console.cpp 25 Apr 2004 15:14:45 -0000 1.3
@@ -258,11 +258,11 @@
ConInfo.y_pos = CV_ConResize;
}
- fill_rect.x1 = 0;
- fill_rect.y1 = 0;
+ fill_rect.top = 0;
+ fill_rect.left = 0;
- fill_rect.x2 = ds->buf_w - 1;
- fill_rect.y2 = ConInfo.y_pos;
+ fill_rect.bottom = ConInfo.y_pos;
+ fill_rect.right = ds->buf_w - 1;
GFX_DrawRect(ds, &fill_rect, SYSGFX_MatchColor(R_CONSOLE_BGCOLOR));
Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- game.cpp 25 Apr 2004 14:42:14 -0000 1.3
+++ game.cpp 25 Apr 2004 15:14:46 -0000 1.4
@@ -234,10 +234,10 @@
&ITE_Resources,
- YS_NELEMS(ITEDEMO_GameFiles), /* Game datafiles */
+ ARRAYSIZE(ITEDEMO_GameFiles), /* Game datafiles */
ITEDEMO_GameFiles,
- YS_NELEMS(ITEDEMO_GameFonts),
+ ARRAYSIZE(ITEDEMO_GameFonts),
ITEDEMO_GameFonts,
&ITEDEMO_GameSound,
@@ -260,10 +260,10 @@
&ITE_Resources,
- YS_NELEMS(ITEDISK_GameFiles),
+ ARRAYSIZE(ITEDISK_GameFiles),
ITEDISK_GameFiles,
- YS_NELEMS(ITEDISK_GameFonts),
+ ARRAYSIZE(ITEDISK_GameFonts),
ITEDISK_GameFonts,
&ITE_GameSound,
@@ -285,10 +285,10 @@
&ITE_Resources,
- YS_NELEMS(ITECD_GameFiles),
+ ARRAYSIZE(ITECD_GameFiles),
ITECD_GameFiles,
- YS_NELEMS(ITECD_GameFonts),
+ ARRAYSIZE(ITECD_GameFonts),
ITECD_GameFonts,
&ITECD_GameSound,
@@ -310,7 +310,7 @@
IHNM_Resources,
- YS_NELEMS(IHNMDEMO_GameFiles),
+ ARRAYSIZE(IHNMDEMO_GameFiles),
IHNMDEMO_GameFiles,
0,
@@ -335,10 +335,10 @@
IHNM_Resources,
- YS_NELEMS(IHNMCD_GameFiles),
+ ARRAYSIZE(IHNMCD_GameFiles),
IHNMCD_GameFiles,
- YS_NELEMS(IHNMCD_GameFonts),
+ ARRAYSIZE(IHNMCD_GameFonts),
IHNMCD_GameFonts,
&IHNM_GameSound,
@@ -542,7 +542,7 @@
int DetectGame(const char *game_dir, uint * game_n_p)
{
- uint game_count = YS_NELEMS(GameDescs);
+ uint game_count = ARRAYSIZE(GameDescs);
uint game_n;
uint file_count;
@@ -609,7 +609,7 @@
R_RSCFILE_CONTEXT *load_ctxt;
- uint game_count = YS_NELEMS(GameDescs);
+ uint game_count = ARRAYSIZE(GameDescs);
const char *game_fname;
uint game_filect;
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gfx.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ gfx.cpp 25 Apr 2004 15:14:46 -0000 1.3
@@ -87,13 +87,13 @@
for (y = 0; y < 16; y++) {
- pal_rect.y1 = (y * 8) + 4;
- pal_rect.y2 = pal_rect.y1 + 8;
+ pal_rect.top = (y * 8) + 4;
+ pal_rect.bottom = pal_rect.top + 8;
for (x = 0; x < 16; x++) {
- pal_rect.x1 = (x * 8) + 4;
- pal_rect.x2 = pal_rect.x1 + 8;
+ pal_rect.left = (x * 8) + 4;
+ pal_rect.right = pal_rect.left + 8;
GFX_DrawRect(dst_s, &pal_rect, color);
color++;
@@ -267,12 +267,12 @@
* \*------------------------------------------------------------- */
if (src_rect != NULL) {
- R_CLAMP_RECT(src_rect, 0, (src_w - 1), 0, (src_h - 1));
+ src_rect->clip(src_w - 1, src_h - 1);
- s_x1 = src_rect->x1;
- s_y1 = src_rect->y1;
- s_x2 = src_rect->x2;
- s_y2 = src_rect->y2;
+ s_x1 = src_rect->left;
+ s_y1 = src_rect->top;
+ s_x2 = src_rect->right;
+ s_y2 = src_rect->bottom;
if ((s_x1 >= s_x2) || (s_y1 >= s_y2)) {
/* Empty or negative region */
@@ -295,10 +295,10 @@
d_y = 0;
}
- clip_x1 = ds->clip_rect.x1;
- clip_y1 = ds->clip_rect.y1;
- clip_x2 = ds->clip_rect.x2;
- clip_y2 = ds->clip_rect.y2;
+ clip_x1 = ds->clip_rect.left;
+ clip_y1 = ds->clip_rect.top;
+ clip_x2 = ds->clip_rect.right;
+ clip_y2 = ds->clip_rect.bottom;
if (clip_x1 == clip_x2) {
clip_x1 = 0;
@@ -413,12 +413,12 @@
* \*------------------------------------------------------------- */
if (src_rect != NULL) {
- R_CLAMP_RECT(src_rect, 0, (src_w - 1), 0, (src_h - 1));
+ src_rect->clip(src_w - 1, src_h - 1);
- s_x1 = src_rect->x1;
- s_y1 = src_rect->y1;
- s_x2 = src_rect->x2;
- s_y2 = src_rect->y2;
+ s_x1 = src_rect->left;
+ s_y1 = src_rect->top;
+ s_x2 = src_rect->right;
+ s_y2 = src_rect->bottom;
if ((s_x1 >= s_x2) || (s_y1 >= s_y2)) {
/* Empty or negative region */
@@ -546,21 +546,21 @@
R_RECT cur_rect;
/* Clamp point to surface */
- cur_pt.x = MAX(p1->x, 0);
- cur_pt.y = MAX(p1->y, 0);
+ cur_pt.x = MAX(p1->x, (int16)0);
+ cur_pt.y = MAX(p1->y, (int16)0);
- cur_pt.x = MIN(p1->x, ds->buf_w - 1);
- cur_pt.y = MIN(p1->y, ds->buf_h - 1);
+ cur_pt.x = MIN(p1->x, (int16)(ds->buf_w - 1));
+ cur_pt.y = MIN(p1->y, (int16)(ds->buf_h - 1));
cur_pt.x -= R_CURSOR_ORIGIN_X;
cur_pt.y -= R_CURSOR_ORIGIN_Y;
/* Clip cursor to surface */
- cur_rect.x1 = 0;
- cur_rect.y1 = 0;
- cur_rect.x2 = R_CURSOR_W - 1;
- cur_rect.y2 = R_CURSOR_H - 1;
+ cur_rect.left = 0;
+ cur_rect.top = 0;
+ cur_rect.right = R_CURSOR_W - 1;
+ cur_rect.bottom = R_CURSOR_H - 1;
ci.dst_rect = &ds->clip_rect;
ci.src_rect = &cur_rect;
@@ -606,32 +606,32 @@
int h;
int row;
- int x1, y1, x2, y2;
+ int left, top, right, bottom;
if (dst_rect != NULL) {
- R_CLAMP_RECT(dst_rect, 0, (ds->buf_w - 1), 0, (ds->buf_h - 1));
+ dst_rect->clip(ds->buf_w - 1, ds->buf_h - 1);
- x1 = dst_rect->x1;
- y1 = dst_rect->y1;
- x2 = dst_rect->x2;
- y2 = dst_rect->y2;
+ left = dst_rect->left;
+ top = dst_rect->top;
+ right = dst_rect->right;
+ bottom = dst_rect->bottom;
- if ((x1 >= x2) || (y1 >= y2)) {
+ if ((left >= right) || (top >= bottom)) {
/* Empty or negative region */
return R_FAILURE;
}
} else {
- x1 = 0;
- y1 = 0;
- x2 = ds->buf_w - 1;
- y2 = ds->buf_h - 1;
+ left = 0;
+ top = 0;
+ right = ds->buf_w - 1;
+ bottom = ds->buf_h - 1;
}
- w = (x2 - x1) + 1;
- h = (y2 - y1) + 1;
+ w = (right - left) + 1;
+ h = (bottom - top) + 1;
- write_p = ds->buf + (ds->buf_pitch * y1) + x1;
+ write_p = ds->buf + (ds->buf_pitch * top) + left;
for (row = 0; row < h; row++) {
memset(write_p, color, w);
@@ -643,7 +643,7 @@
int GFX_DrawFrame(R_SURFACE * ds, R_POINT * p1, R_POINT * p2, int color)
{
- int x1, y1, x2, y2;
+ int left, top, right, bottom;
int min_x;
int max_x;
@@ -657,15 +657,15 @@
assert((ds != NULL) && (p1 != NULL) && (p2 != NULL));
- x1 = p1->x;
- y1 = p1->y;
- x2 = p2->x;
- y2 = p2->y;
+ left = p1->x;
+ top = p1->y;
+ right = p2->x;
+ bottom = p2->y;
- min_x = MIN(x1, x2);
- min_y = MIN(y1, y2);
- max_x = MAX(x1, x2);
- max_y = MAX(y1, y2);
+ min_x = MIN(left, right);
+ min_y = MIN(top, bottom);
+ max_x = MAX(left, right);
+ max_y = MAX(top, bottom);
n_p1.x = min_x;
n_p1.y = min_y;
@@ -728,15 +728,15 @@
d_y = 0;
}
- s_x1 = clipinfo->src_rect->x1;
- s_y1 = clipinfo->src_rect->y1;
- s_x2 = clipinfo->src_rect->x2;
- s_y2 = clipinfo->src_rect->y2;
+ s_x1 = clipinfo->src_rect->left;
+ s_y1 = clipinfo->src_rect->top;
+ s_x2 = clipinfo->src_rect->right;
+ s_y2 = clipinfo->src_rect->bottom;
- clip_x1 = clipinfo->dst_rect->x1;
- clip_y1 = clipinfo->dst_rect->y1;
- clip_x2 = clipinfo->dst_rect->x2;
- clip_y2 = clipinfo->dst_rect->y2;
+ clip_x1 = clipinfo->dst_rect->left;
+ clip_y1 = clipinfo->dst_rect->top;
+ clip_x2 = clipinfo->dst_rect->right;
+ clip_y2 = clipinfo->dst_rect->bottom;
/* Clip source rectangle to destination surface
* \*------------------------------------------------------------- */
@@ -820,16 +820,16 @@
const R_POINT *n_p2;
int clip_x1, clip_y1, clip_x2, clip_y2;
- int x1, y1, x2, y2;
+ int left, top, right, bottom;
int dx, dy;
float m;
int y_icpt_l, y_icpt_r;
- clip_x1 = ds->clip_rect.x1;
- clip_y1 = ds->clip_rect.y1;
- clip_x2 = ds->clip_rect.x2;
- clip_y2 = ds->clip_rect.y2;
+ clip_x1 = ds->clip_rect.left;
+ clip_y1 = ds->clip_rect.top;
+ clip_x2 = ds->clip_rect.right;
+ clip_y2 = ds->clip_rect.bottom;
/* Normalize points by x */
if (src_p1->x < src_p2->x) {
@@ -846,40 +846,40 @@
dst_p2->x = n_p2->x;
dst_p2->y = n_p2->y;
- x1 = n_p1->x;
- y1 = n_p1->y;
+ left = n_p1->x;
+ top = n_p1->y;
- x2 = n_p2->x;
- y2 = n_p2->y;
+ right = n_p2->x;
+ bottom = n_p2->y;
- dx = x2 - x1;
- dy = y2 - y1;
+ dx = right - left;
+ dy = bottom - top;
- if (x1 < 0) {
+ if (left < 0) {
- if (x2 < 0) {
+ if (right < 0) {
/* Line completely off left edge */
return -1;
}
/* Clip to left edge */
- m = ((float)y2 - y1) / (x2 - x1);
- y_icpt_l = (int)(y1 - (x1 * m) + 0.5f);
+ m = ((float)bottom - top) / (right - left);
+ y_icpt_l = (int)(top - (left * m) + 0.5f);
dst_p1->x = 0;
dst_p1->y = y_icpt_l;
}
- if (y2 > clip_x2) {
+ if (bottom > clip_x2) {
- if (x1 > clip_x2) {
+ if (left > clip_x2) {
/* Line completely off right edge */
return -1;
}
/* Clip to right edge */
- m = ((float)y1 - y2) / (x2 - x1);
- y_icpt_r = (int)(y1 - ((clip_x2 - x1) * m) + 0.5f);
+ m = ((float)top - bottom) / (right - left);
+ y_icpt_r = (int)(top - ((clip_x2 - left) * m) + 0.5f);
dst_p1->y = y_icpt_r;
dst_p2->x = clip_x2;
@@ -916,7 +916,7 @@
int end_run;
R_POINT clip_p1, clip_p2;
- int x1, y1, x2, y2;
+ int left, top, right, bottom;
int i, k;
clip_result = GFX_ClipLine(ds, p1, p2, &clip_p1, &clip_p2);
@@ -925,38 +925,38 @@
return;
}
- x1 = clip_p1.x;
- y1 = clip_p1.y;
+ left = clip_p1.x;
+ top = clip_p1.y;
- x2 = clip_p2.x;
- y2 = clip_p2.y;
+ right = clip_p2.x;
+ bottom = clip_p2.y;
- if ((x1 < ds->clip_rect.x1) || (x2 < ds->clip_rect.x1) ||
- (x1 > ds->clip_rect.x2) || (x2 > ds->clip_rect.x2)) {
+ if ((left < ds->clip_rect.left) || (right < ds->clip_rect.left) ||
+ (left > ds->clip_rect.right) || (right > ds->clip_rect.right)) {
return;
}
- if ((y1 < ds->clip_rect.y1) || (y2 < ds->clip_rect.y1) ||
- (y1 > ds->clip_rect.y2) || (y2 > ds->clip_rect.y2)) {
+ if ((top < ds->clip_rect.top) || (bottom < ds->clip_rect.top) ||
+ (top > ds->clip_rect.bottom) || (bottom > ds->clip_rect.bottom)) {
return;
}
- if (y1 > y2) {
+ if (top > bottom) {
- temp = y1;
- y1 = y2;
- y2 = temp;
+ temp = top;
+ top = bottom;
+ bottom = temp;
- temp = x1;
- x1 = x2;
- x2 = temp;
+ temp = left;
+ left = right;
+ right = temp;
}
- write_p = ds->buf + (y1 * ds->buf_pitch) + x1;
+ write_p = ds->buf + (top * ds->buf_pitch) + left;
- dx = x2 - x1;
+ dx = right - left;
if (dx < 0) {
x_vector = -1;
@@ -965,7 +965,7 @@
x_vector = 1;
}
- dy = y2 - y1;
+ dy = bottom - top;
if (dx == 0) {
for (i = 0; i <= dy; i++) {
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gfx.h 12 Apr 2004 21:40:47 -0000 1.1
+++ gfx.h 25 Apr 2004 15:14:46 -0000 1.2
@@ -39,15 +39,6 @@
#define R_CURSOR_ORIGIN_X 4
#define R_CURSOR_ORIGIN_Y 4
-#define R_CLAMP(a, min, max) \
- (a = (a < (min)) ? (min) : ((a > max) ? (max) : a ))
-
-#define R_CLAMP_RECT( rect, xmin, xmax, ymin, ymax ) \
- R_CLAMP( rect->x1, xmin, xmax ); \
- R_CLAMP( rect->x2, xmin, xmax ); \
- R_CLAMP( rect->y1, ymin, ymax ); \
- R_CLAMP( rect->y2, ymin, ymax )
-
} // End of namespace Saga
#endif /* R_GFX_H_ */
Index: ihnm_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ihnm_introproc.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ihnm_introproc.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ ihnm_introproc.cpp 25 Apr 2004 15:14:46 -0000 1.3
@@ -67,7 +67,7 @@
0, 0, 0, 0, 0, 0, 0, 0,
IHNM_IntroMovie1RL,
- YS_NELEMS(IHNM_IntroMovie1RL)
+ ARRAYSIZE(IHNM_IntroMovie1RL)
};
@@ -82,7 +82,7 @@
0, 0, 0, 0, 0, 0, 0, 0,
IHNM_IntroMovie2RL,
- YS_NELEMS(IHNM_IntroMovie2RL)
+ ARRAYSIZE(IHNM_IntroMovie2RL)
};
@@ -97,7 +97,7 @@
0, 0, 0, 0, 0, 0, 0, 0,
IHNM_IntroMovie3RL,
- YS_NELEMS(IHNM_IntroMovie3RL)
+ ARRAYSIZE(IHNM_IntroMovie3RL)
};
@@ -112,7 +112,7 @@
0, 0, 0, 0, 0, 0, 0, 0,
IHNM_IntroMovie4RL,
- YS_NELEMS(IHNM_IntroMovie4RL)
+ ARRAYSIZE(IHNM_IntroMovie4RL)
};
@@ -131,7 +131,7 @@
size_t n_introscenes;
size_t i;
- n_introscenes = YS_NELEMS(IHNM_IntroList);
+ n_introscenes = ARRAYSIZE(IHNM_IntroList);
for (i = 0; i < n_introscenes; i++) {
Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- interface.cpp 12 Apr 2004 21:40:47 -0000 1.1
+++ interface.cpp 25 Apr 2004 15:14:46 -0000 1.2
@@ -141,7 +141,7 @@
{
size_t i;
- for (i = 0; i < YS_NELEMS(I_VerbData); i++) {
+ for (i = 0; i < ARRAYSIZE(I_VerbData); i++) {
if (CVAR_Register_S(I_VerbData[i].verb_str,
I_VerbData[i].verb_cvar,
@@ -196,14 +196,14 @@
/* Load Inherit the Earth interface desc */
IfModule.c_panel.buttons = ITE_c_buttons;
- IfModule.c_panel.nbuttons = YS_NELEMS(ITE_c_buttons);
+ IfModule.c_panel.nbuttons = ARRAYSIZE(ITE_c_buttons);
IfModule.i_desc = ITE_interface;
} else if (game_type == R_GAMETYPE_IHNM) {
/* Load I Have No Mouth interface desc */
IfModule.c_panel.buttons = IHNM_c_buttons;
- IfModule.c_panel.nbuttons = YS_NELEMS(IHNM_c_buttons);
+ IfModule.c_panel.nbuttons = ARRAYSIZE(IHNM_c_buttons);
IfModule.i_desc = IHNM_interface;
} else {
@@ -318,11 +318,11 @@
/* Erase background of status bar
* \*------------------------------------------------------------- */
- rect.x1 = 0;
- rect.y1 = IfModule.i_desc.status_y;
+ rect.left = 0;
+ rect.top = IfModule.i_desc.status_y;
- rect.x2 = g_di.logical_w - 1;
- rect.y2 = IfModule.i_desc.status_h - 1;
+ rect.right = g_di.logical_w - 1;
+ rect.bottom = IfModule.i_desc.status_h - 1;
GFX_DrawRect(back_buf, &rect, IfModule.i_desc.status_bgcol);
@@ -435,10 +435,10 @@
/* Erase background of status bar
* \*------------------------------------------------------------- */
- rect.x1 = 0;
- rect.y1 = IfModule.i_desc.status_y;
- rect.x2 = g_di.logical_w - 1;
- rect.y2 = IfModule.i_desc.status_y + IfModule.i_desc.status_h - 1;
+ rect.left = 0;
+ rect.top = IfModule.i_desc.status_y;
+ rect.right = g_di.logical_w - 1;
+ rect.bottom = IfModule.i_desc.status_y + IfModule.i_desc.status_h - 1;
GFX_DrawRect(ds, &rect, IfModule.i_desc.status_bgcol);
Index: isomap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- isomap.cpp 12 Apr 2004 21:40:47 -0000 1.1
+++ isomap.cpp 25 Apr 2004 15:14:46 -0000 1.2
@@ -176,14 +176,10 @@
{
R_GAME_DISPLAYINFO disp_info;
- R_RECT iso_rect;
GAME_GetDisplayInfo(&disp_info);
- iso_rect.x1 = 0;
- iso_rect.y1 = 0;
- iso_rect.x2 = disp_info.logical_w - 1;
- iso_rect.y2 = disp_info.scene_h - 1;
+ R_RECT iso_rect(disp_info.logical_w - 1, disp_info.scene_h - 1);
GFX_DrawRect(dst_s, &iso_rect, 0);
Index: ite_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ite_introproc.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ite_introproc.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ ite_introproc.cpp 25 Apr 2004 15:14:46 -0000 1.3
@@ -136,7 +136,7 @@
R_SCENE_QUEUE first_scene;
R_GAME_SCENEDESC gs_desc;
- n_introscenes = YS_NELEMS(ITE_IntroList);
+ n_introscenes = ARRAYSIZE(ITE_IntroList);
for (i = 0; i < n_introscenes; i++) {
@@ -160,7 +160,7 @@
size_t i;
- for (i = 0; i < YS_NELEMS(IntroDiag); i++) {
+ for (i = 0; i < ARRAYSIZE(IntroDiag); i++) {
if (CVAR_Register_S(IntroDiag[i].i_str,
IntroDiag[i].i_cvar_name,
@@ -914,7 +914,7 @@
"Allison Hershey", MEDIUM_FONT_ID}
};
- int n_credits = YS_NELEMS(credits);
+ int n_credits = ARRAYSIZE(credits);
int event_delay = 0;
Index: objectmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- objectmap.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ objectmap.cpp 25 Apr 2004 15:14:46 -0000 1.3
@@ -237,7 +237,6 @@
* Loads an object name list resource
\*--------------------------------------------------------------------------*/
{
- YS_REG_FUNC(OBJECTMAP_LoadNames);
const unsigned char *read_p = onl_res;
int table_len;
@@ -259,7 +258,7 @@
#if 0
# if R_OBJECTMAP_DEBUG >= R_DEBUG_INFO
- R_printf(R_STDOUT, "%s: Loading %d object names.\n", YS_FUNC, n_names);
+ R_printf(R_STDOUT, "OBJECTMAP_LoadNames: Loading %d object names.\n", n_names);
# endif
#endif
OMInfo.names = (const char **)malloc(n_names * sizeof *OMInfo.names);
Index: reinherit.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/reinherit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- reinherit.h 25 Apr 2004 14:42:14 -0000 1.3
+++ reinherit.h 25 Apr 2004 15:14:46 -0000 1.4
@@ -33,6 +33,7 @@
#include "common/stdafx.h"
#include "common/scummsys.h"
+#include "common/rect.h"
#include "base/engine.h"
@@ -78,24 +79,9 @@
typedef unsigned int uint;
#endif
-struct R_POINT {
-
- int x;
- int y;
-
-};
-
-struct R_RECT {
-
- int x1;
- int y1;
- int x2;
- int y2;
-
-};
+typedef Common::Point R_POINT;
+typedef Common::Rect R_RECT;
-#define R_MAKERECT( rect, x1, y1, x2, y2 ) \
- ( rect.x1 = x1, rect.y1 = y1, rect.x2 = x2, rect.y2 = y2, &rect )
struct R_COLOR {
@@ -171,7 +157,6 @@
/*
* r_main.c
\*--------------------------------------------------------------------------*/
-int main(int argc, char *argv[]);
void R_Shutdown(int param);
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sprite.cpp 25 Apr 2004 14:42:14 -0000 1.2
+++ sprite.cpp 25 Apr 2004 15:14:46 -0000 1.3
@@ -420,15 +420,15 @@
SCENE_GetBGMaskInfo(&mask_w, &mask_h, &mask_buf, &mask_buf_len);
- spr_src_rect.x1 = 0;
- spr_src_rect.y1 = 0;
- spr_src_rect.x2 = s_width - 1;
- spr_src_rect.y2 = s_height - 1;
+ spr_src_rect.left = 0;
+ spr_src_rect.top = 0;
+ spr_src_rect.right = s_width - 1;
+ spr_src_rect.bottom = s_height - 1;
- spr_dst_rect.x1 = 0;
- spr_dst_rect.y1 = 0;
- spr_dst_rect.x2 = ds->clip_rect.x2;
- spr_dst_rect.y2 = MIN(ds->clip_rect.y2, mask_h - 1);
+ spr_dst_rect.left = 0;
+ spr_dst_rect.top = 0;
+ spr_dst_rect.right = ds->clip_rect.right;
+ spr_dst_rect.bottom = MIN(ds->clip_rect.bottom, (int16)(mask_h - 1));
spr_pt.x = spr_x + x_align;
spr_pt.y = spr_y + y_align;
Index: sysgfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sysgfx.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sysgfx.cpp 12 Apr 2004 21:40:48 -0000 1.1
+++ sysgfx.cpp 25 Apr 2004 15:14:46 -0000 1.2
@@ -96,10 +96,10 @@
r_screen.buf_pitch = sdl_screen->pitch;
r_screen.bpp = gfx_init->screen_bpp;
- r_screen.clip_rect.x1 = 0;
- r_screen.clip_rect.y1 = 0;
- r_screen.clip_rect.x2 = sdl_screen->w - 1;
- r_screen.clip_rect.y2 = sdl_screen->h - 1;
+ r_screen.clip_rect.left = 0;
+ r_screen.clip_rect.top = 0;
+ r_screen.clip_rect.right = sdl_screen->w - 1;
+ r_screen.clip_rect.bottom = sdl_screen->h - 1;
r_screen.impl_src = sdl_screen;
@@ -128,10 +128,10 @@
r_back_buf.buf_pitch = sdl_back_buf->pitch;
r_back_buf.bpp = gfx_init->backbuf_bpp;
- r_back_buf.clip_rect.x1 = 0;
- r_back_buf.clip_rect.y1 = 0;
- r_back_buf.clip_rect.x2 = sdl_back_buf->w - 1;
- r_back_buf.clip_rect.y2 = sdl_back_buf->h - 1;
+ r_back_buf.clip_rect.left = 0;
+ r_back_buf.clip_rect.top = 0;
+ r_back_buf.clip_rect.right = sdl_back_buf->w - 1;
+ r_back_buf.clip_rect.bottom = sdl_back_buf->h - 1;
r_back_buf.impl_src = sdl_back_buf;
@@ -199,10 +199,10 @@
new_r_surface->buf_pitch = new_sdl_surface->pitch;
new_r_surface->bpp = new_sdl_surface->format->BitsPerPixel;
- new_r_surface->clip_rect.x1 = 0;
- new_r_surface->clip_rect.y1 = 0;
- new_r_surface->clip_rect.x2 = new_sdl_surface->w - 1;
- new_r_surface->clip_rect.y2 = new_sdl_surface->h - 1;
+ new_r_surface->clip_rect.left = 0;
+ new_r_surface->clip_rect.top = 0;
+ new_r_surface->clip_rect.right = new_sdl_surface->w - 1;
+ new_r_surface->clip_rect.bottom = new_sdl_surface->h - 1;
new_r_surface->impl_src = new_sdl_surface;
@@ -235,10 +235,10 @@
new_surface->buf_pitch = new_sdl_surface->pitch;
new_surface->bpp = new_sdl_surface->format->BitsPerPixel;
- new_surface->clip_rect.x1 = 0;
- new_surface->clip_rect.y1 = 0;
- new_surface->clip_rect.x2 = w - 1;
- new_surface->clip_rect.y2 = h - 1;
+ new_surface->clip_rect.left = 0;
+ new_surface->clip_rect.top = 0;
+ new_surface->clip_rect.right = w - 1;
+ new_surface->clip_rect.bottom = h - 1;
new_surface->impl_src = new_sdl_surface;
Index: yslib.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/yslib.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- yslib.h 25 Apr 2004 14:42:14 -0000 1.2
+++ yslib.h 25 Apr 2004 15:14:46 -0000 1.3
@@ -48,17 +48,6 @@
/* Ignore a parameter (Supress warnings) */
#define YS_IGNORE_PARAM( param ) ( void )( param )
-/* Calculate the number of elements in an array */
-#define YS_NELEMS( arr ) (( sizeof arr ) / ( sizeof *arr ))
-
-#define YS_DUMMY_DECL /* C99 permits statements before declarations */
-
-#define YS_REG_FUNC( arr ) YS_DUMMY_DECL
-#define YS_FUNC __func__
-
-#define YS_FLEX_ARRAY
-#define YS_FLEX_ARRAY_MOD 0
-
/* ys_binread.c : Binary input functions (buffer oriented)
\*------------------------------------------------------------------*/
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actionmap.h,1.1,1.2 actor.cpp,1.1,1.2 actor.h,1.1,1.2 actor_mod.h,1.1,1.2 actordata.h,1.1,1.2 animation.h,1.1,1.2 console.cpp,1.1,1.2 console.h,1.1,1.2 cvar.cpp,1.1,1.2 cvar.h,1.1,1.2 cvar_mod.h,1.1,1.2 events.cpp,1.2,1.3 events_mod.h,1.1,1.2 expr.cpp,1.1,1.2 font.cpp,1.1,1.2 font.h,1.1,1.2 game.cpp,1.2,1.3 game.h,1.1,1.2 game_mod.h,1.1,1.2 gfx.cpp,1.1,1.2 gfx_mod.h,1.1,1.2 ihnm_introproc.cpp,1.1,1.2 image.h,1.1,1.2 interface.h,1.1,1.2 isomap.h,1.1,1.2 ite_introproc.cpp,1.1,1.2 ite_introproc.h,1.1,1.2 module.mk,1.3,1.4 objectmap.cpp,1.1,1.2 objectmap.h,1.1,1.2 palanim.h,1.1,1.2 reinherit.h,1.2,1.3 render.cpp,1.1,1.2 render.h,1.1,1.2 render_mod.h,1.1,1.2 rscfile.h,1.2,1.3 saga.cpp,1.5,1.6 scene.cpp,1.1,1.2 scene.h,1.1,1.2 scene_mod.h,1.1,1.2 sceneproc.cpp,1.1,1.2 script.cpp,1.1,1.2 script.h,1.1,1.2 sdata.h,1.1,1.2 sfuncs.h,1.1,1.2 sndres.cpp,1.1,1.2 sndres.h,1.1,1.2 sprite.cpp,1.1,1.2 sprite.h,1.1,1.2 sthread.cpp,1.1,1.2 sysgfx.h,1.1,1.2 systimer.h,1.1,1.2 text_mod.h,1.1,1.2 xmidi.cpp,1.1,1.2 xmidi.h,1.1,1.2 xmidi_mod.h,1.1,1.2 ys_binread.cpp,1.1,1.2 yslib.h,1.1,1.2 x86_32.h,1.2,NONE ys_file.cpp,1.1,NONE
- Next message: [Scummvm-cvs-logs] CVS: scummvm TODO,1.117,1.118
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list