Skip to content

Commit 13627d4

Browse files
author
c2woody
committed
cleanup
git-svn-id: http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3400 ed541006-0bf7-43e9-8c4d-6fc63c346d47
1 parent 5668f21 commit 13627d4

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/gui/sdlmain.cpp

+3-11
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1717
*/
1818

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 $ */
2020

2121
#ifndef _GNU_SOURCE
2222
#define _GNU_SOURCE
@@ -1180,13 +1180,6 @@ static void GUI_StartUp(Section * sec) {
11801180
for (Bitu y=0; y<400; y++) {
11811181

11821182
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-
} */
11901183
Bit32u * draw=(Bit32u*)(((Bit8u *)splash_surf->pixels)+((y)*splash_surf->pitch));
11911184
for (Bitu x=0; x<640; x++) {
11921185
//#if SDL_BYTEORDER == SDL_BIG_ENDIAN
@@ -1203,7 +1196,7 @@ static void GUI_StartUp(Section * sec) {
12031196
static Bitu splash_fade = 100;
12041197
static bool use_fadeout = true;
12051198

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) {
12071200
SDL_Event evt;
12081201
while (SDL_PollEvent(&evt)) {
12091202
if (evt.type == SDL_QUIT) {
@@ -1221,13 +1214,12 @@ static void GUI_StartUp(Section * sec) {
12211214
} else if (ct>=max_splash_loop-splash_fade) {
12221215
if (use_fadeout) {
12231216
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)));
12251218
SDL_BlitSurface(splash_surf, NULL, sdl.surface, NULL);
12261219
SDL_Flip(sdl.surface);
12271220
}
12281221
}
12291222

1230-
// SDL_Delay(1);
12311223
}
12321224

12331225
if (use_fadeout) {

0 commit comments

Comments
 (0)