16
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
17
*/
18
18
19
- /* $Id: sdlmain.cpp,v 1.151 2009-05-20 18:26 :35 qbix79 Exp $ */
19
+ /* $Id: sdlmain.cpp,v 1.152 2009-05-22 20:56 :35 c2woody Exp $ */
20
20
21
21
#ifndef _GNU_SOURCE
22
22
#define _GNU_SOURCE
@@ -1180,13 +1180,6 @@ static void GUI_StartUp(Section * sec) {
1180
1180
for (Bitu y=0 ; y<400 ; y++) {
1181
1181
1182
1182
Bit8u* tmpbuf = tmpbufp + y*640 *3 ;
1183
- /* Bit8u * draw=((Bit8u *)splash_surf->pixels)+((399-y)*splash_surf->pitch);
1184
- for (Bitu x=0; x<640; x++) {
1185
- *draw++ = tmpbuf[x*3+2];
1186
- *draw++ = tmpbuf[x*3+1];
1187
- *draw++ = tmpbuf[x*3+0];
1188
- *draw++ = 0xff;
1189
- } */
1190
1183
Bit32u * draw=(Bit32u*)(((Bit8u *)splash_surf->pixels )+((y)*splash_surf->pitch ));
1191
1184
for (Bitu x=0 ; x<640 ; x++) {
1192
1185
// #if SDL_BYTEORDER == SDL_BIG_ENDIAN
@@ -1203,7 +1196,7 @@ static void GUI_StartUp(Section * sec) {
1203
1196
static Bitu splash_fade = 100 ;
1204
1197
static bool use_fadeout = true ;
1205
1198
1206
- for (Bit32u ct = 0 ,startticks = GetTicks ();ct < max_splash_loop;ct = GetTicks ()-startticks) {
1199
+ for (Bit32u ct = 0 ,startticks = GetTicks ();ct < max_splash_loop;ct = GetTicks ()-startticks) {
1207
1200
SDL_Event evt;
1208
1201
while (SDL_PollEvent (&evt)) {
1209
1202
if (evt.type == SDL_QUIT) {
@@ -1221,13 +1214,12 @@ static void GUI_StartUp(Section * sec) {
1221
1214
} else if (ct>=max_splash_loop-splash_fade) {
1222
1215
if (use_fadeout) {
1223
1216
SDL_FillRect (sdl.surface , NULL , SDL_MapRGB (sdl.surface ->format , 0 , 0 , 0 ));
1224
- SDL_SetAlpha (splash_surf, SDL_SRCALPHA, (max_splash_loop-1 -ct)*255 /(splash_fade-1 ));
1217
+ SDL_SetAlpha (splash_surf, SDL_SRCALPHA, (Bit8u)(( max_splash_loop-1 -ct)*255 /(splash_fade-1 ) ));
1225
1218
SDL_BlitSurface (splash_surf, NULL , sdl.surface , NULL );
1226
1219
SDL_Flip (sdl.surface );
1227
1220
}
1228
1221
}
1229
1222
1230
- // SDL_Delay(1);
1231
1223
}
1232
1224
1233
1225
if (use_fadeout) {
0 commit comments