[Scummvm-cvs-logs] CVS: scummvm/saga music.cpp,1.8,1.9 sysgfx.cpp,1.2,1.3 sysgfx.h,1.2,1.3
Eugene Sandulenko
sev at users.sourceforge.net
Fri Apr 30 14:43:02 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga sndres.cpp,1.7,1.8
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13341
Modified Files:
music.cpp sysgfx.cpp sysgfx.h
Log Message:
Indentation madness
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- music.cpp 30 Apr 2004 07:13:26 -0000 1.8
+++ music.cpp 30 Apr 2004 21:41:51 -0000 1.9
@@ -72,7 +72,6 @@
for (int i = 0; i < 16; ++i) {
if (_channel[i]) {
- debug(0, "%d %d", _channelVolume[i], _masterVolume);
_channel[i]->volume(_channelVolume[i] * _masterVolume / 255);
}
}
Index: sysgfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sysgfx.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sysgfx.cpp 25 Apr 2004 15:14:46 -0000 1.2
+++ sysgfx.cpp 30 Apr 2004 21:41:51 -0000 1.3
@@ -36,8 +36,7 @@
static SDL_Color cur_pal[R_PAL_ENTRIES];
-int SYSGFX_Init(R_SYSGFX_INIT * gfx_init)
-{
+int SYSGFX_Init(R_SYSGFX_INIT *gfx_init) {
SDL_Surface *sdl_screen;
R_SURFACE r_screen;
@@ -55,8 +54,7 @@
flags = SDL_HWPALETTE;
}
- /* Test video mode availability
- * \*------------------------------------------------------------- */
+ /* Test video mode availability */
result = SDL_VideoModeOK(gfx_init->screen_w,
gfx_init->screen_h, gfx_init->screen_bpp, flags);
if (result == 0) {
@@ -69,12 +67,10 @@
return R_FAILURE;
}
- /* Set the video mode
- * \*------------------------------------------------------------- */
+ /* Set the video mode */
sdl_screen = SDL_SetVideoMode(gfx_init->screen_w,
gfx_init->screen_h, gfx_init->screen_bpp, flags);
if (sdl_screen == NULL) {
-
R_printf(R_STDERR,
"Unable to set video mode (%d x %d @ %d bpp).\n",
gfx_init->screen_w,
@@ -103,8 +99,7 @@
r_screen.impl_src = sdl_screen;
- /* Create the back buffer
- * \*------------------------------------------------------------- */
+ /* Create the back buffer */
sdl_back_buf = SDL_CreateRGBSurface(SDL_SWSURFACE,
gfx_init->backbuf_w,
gfx_init->backbuf_h, gfx_init->backbuf_bpp, 0, 0, 0, 0);
@@ -120,8 +115,7 @@
return R_FAILURE;
}
- /* Convert sdl surface data to R surface data
- * \*------------------------------------------------------------- */
+ /* Convert sdl surface data to R surface data */
r_back_buf.buf = (uchar *)sdl_back_buf->pixels;
r_back_buf.buf_w = sdl_back_buf->w;
r_back_buf.buf_h = sdl_back_buf->h;
@@ -135,8 +129,7 @@
r_back_buf.impl_src = sdl_back_buf;
- /* Set module data
- * \*------------------------------------------------------------- */
+ /* Set module data */
SGfxModule.sdl_screen = sdl_screen;
SGfxModule.r_screen = r_screen;
SGfxModule.sdl_back_buf = sdl_back_buf;
@@ -147,18 +140,15 @@
return R_SUCCESS;
}
-R_SURFACE *SYSGFX_GetScreenSurface(void)
-{
+R_SURFACE *SYSGFX_GetScreenSurface(void) {
return &SGfxModule.r_screen;
}
-R_SURFACE *SYSGFX_GetBackBuffer(void)
-{
+R_SURFACE *SYSGFX_GetBackBuffer(void) {
return &SGfxModule.r_back_buf;
}
-int SYSGFX_LockSurface(R_SURFACE * surface)
-{
+int SYSGFX_LockSurface(R_SURFACE *surface) {
int result;
assert(surface != NULL);
@@ -168,8 +158,7 @@
return (result == 0) ? R_SUCCESS : R_FAILURE;
}
-int SYSGFX_UnlockSurface(R_SURFACE * surface)
-{
+int SYSGFX_UnlockSurface(R_SURFACE *surface) {
assert(surface != NULL);
SDL_UnlockSurface((SDL_Surface *) surface->impl_src);
@@ -177,8 +166,7 @@
return R_SUCCESS;
}
-R_SURFACE *SYSGFX_FormatToDisplay(R_SURFACE * surface)
-{
+R_SURFACE *SYSGFX_FormatToDisplay(R_SURFACE *surface) {
R_SURFACE *new_r_surface;
SDL_Surface *new_sdl_surface;
@@ -209,8 +197,7 @@
return new_r_surface;
}
-R_SURFACE *SYSGFX_CreateSurface(int w, int h, int bpp)
-{
+R_SURFACE *SYSGFX_CreateSurface(int w, int h, int bpp) {
R_SURFACE *new_surface;
SDL_Surface *new_sdl_surface;
@@ -245,8 +232,7 @@
return new_surface;
}
-int SYSGFX_DestroySurface(R_SURFACE * surface)
-{
+int SYSGFX_DestroySurface(R_SURFACE *surface) {
SDL_FreeSurface((SDL_Surface *) surface->impl_src);
free(surface);
@@ -254,19 +240,15 @@
return R_SUCCESS;
}
-int SYSGFX_GetWhite(void)
-{
+int SYSGFX_GetWhite(void) {
return SGfxModule.white_index;
}
-int SYSGFX_GetBlack(void)
-{
+int SYSGFX_GetBlack(void) {
return SGfxModule.black_index;
}
-int SYSGFX_MatchColor(unsigned long colormask)
-{
-
+int SYSGFX_MatchColor(unsigned long colormask) {
int i;
int red = (colormask & 0x0FF0000UL) >> 16;
@@ -282,7 +264,6 @@
int best_index = 0;
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
dr = cur_pal[i].r - red;
dr = ABS(dr);
@@ -312,8 +293,7 @@
return best_index;
}
-int SYSGFX_SetPalette(R_SURFACE *surface, PALENTRY *pal)
-{
+int SYSGFX_SetPalette(R_SURFACE *surface, PALENTRY *pal) {
uchar red;
uchar green;
@@ -328,7 +308,6 @@
int i;
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
red = pal[i].red;
cur_pal[i].r = red;
@@ -363,11 +342,9 @@
* If the screen surface is not palettized, set the palette of
* the surface parameter */
if (SGfxModule.r_screen.bpp < 16) {
-
SDL_SetColors(SGfxModule.sdl_screen, cur_pal, 0,
R_PAL_ENTRIES);
} else {
-
SDL_SetColors((SDL_Surface *) surface->impl_src,
cur_pal, 0, R_PAL_ENTRIES);
}
@@ -375,13 +352,10 @@
return R_SUCCESS;
}
-int SYSGFX_GetCurrentPal(PALENTRY * src_pal)
-{
-
+int SYSGFX_GetCurrentPal(PALENTRY *src_pal) {
int i;
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
src_pal[i].red = cur_pal[i].r;
src_pal[i].green = cur_pal[i].g;
src_pal[i].blue = cur_pal[i].b;
@@ -390,9 +364,7 @@
return R_SUCCESS;
}
-int SYSGFX_PalToBlack(R_SURFACE * surface, PALENTRY * src_pal, double percent)
-{
-
+int SYSGFX_PalToBlack(R_SURFACE *surface, PALENTRY *src_pal, double percent) {
int i;
/*int fade_max = 255; */
@@ -411,7 +383,6 @@
/* Use the correct percentage change per frame for each palette entry */
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
new_entry = (int)(src_pal[i].red * fpercent);
if (new_entry < 0) {
@@ -441,22 +412,17 @@
* If the screen surface is not palettized, set the palette of
* the surface parameter */
if (SGfxModule.r_screen.bpp < 16) {
-
SDL_SetColors(SGfxModule.sdl_screen, cur_pal, 0,
R_PAL_ENTRIES);
} else {
-
SDL_SetColors((SDL_Surface *) surface->impl_src,
cur_pal, 0, R_PAL_ENTRIES);
}
return R_SUCCESS;
-
}
-int SYSGFX_BlackToPal(R_SURFACE * surface, PALENTRY * src_pal, double percent)
-{
-
+int SYSGFX_BlackToPal(R_SURFACE *surface, PALENTRY *src_pal, double percent) {
int new_entry;
double fpercent;
@@ -479,7 +445,6 @@
/* Use the correct percentage change per frame for each palette entry */
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
new_entry = (int)(src_pal[i].red - src_pal[i].red * fpercent);
if (new_entry < 0) {
@@ -509,9 +474,7 @@
/* Find the best white and black color indices again */
if (percent >= 1.0) {
-
for (i = 0; i < R_PAL_ENTRIES; i++) {
-
color_delta = cur_pal[i].r;
color_delta += cur_pal[i].g;
color_delta += cur_pal[i].b;
@@ -532,11 +495,9 @@
* If the screen surface is not palettized, set the palette of
* the surface parameter */
if (SGfxModule.r_screen.bpp < 16) {
-
SDL_SetColors(SGfxModule.sdl_screen, cur_pal, 0,
R_PAL_ENTRIES);
} else {
-
SDL_SetColors((SDL_Surface *) surface->impl_src,
cur_pal, 0, R_PAL_ENTRIES);
}
Index: sysgfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sysgfx.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sysgfx.h 25 Apr 2004 14:42:14 -0000 1.2
+++ sysgfx.h 30 Apr 2004 21:41:51 -0000 1.3
@@ -32,7 +32,6 @@
#define R_BLUE_WEIGHT 0.114
struct R_SYSGFX_MODULE {
-
int init;
SDL_Surface *sdl_screen; /* Screen surface */
@@ -43,7 +42,6 @@
int white_index;
int black_index;
-
};
} // End of namespace Saga
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga sndres.cpp,1.7,1.8
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list