1 | 58,59c58,59
|
---|
2 | < SDL_Surface *glEnd; // Black rectangle at end of the GL screen
|
---|
3 | < SDL_Rect blackrect2; // Needed for blitting the above surface
|
---|
4 | ---
|
---|
5 | > SDL_Surface *tmpSurface; // Used for black rectangles blitting
|
---|
6 | > SDL_Rect tmpBlackRect; // Black rectangle at end of the GL screen
|
---|
7 | 210a211,218
|
---|
8 | > uint32 Rmask, Gmask, Bmask, Amask;
|
---|
9 | > // I have to force 16 bit color depth with 565 ordering
|
---|
10 | > // SDL_SetVideoMode sometimes doesn't accept your color depth definition
|
---|
11 | > Rmask = 0xF800; // 5
|
---|
12 | > Gmask = 0x07E0; // 6
|
---|
13 | > Bmask = 0x001F; // 5
|
---|
14 | > Amask = 0;
|
---|
15 | >
|
---|
16 | 231,239c239
|
---|
17 | < // SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
|
---|
18 | < // if (fb2gl.screen->format->Rmask == 0x7C00)
|
---|
19 | < // SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
|
---|
20 | < // else
|
---|
21 | < // SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 6 );
|
---|
22 | < // SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
|
---|
23 | < // SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
|
---|
24 | <
|
---|
25 | < int gl_flags = FB2GL_320 | FB2GL_RGBA | FB2GL_EXPAND;
|
---|
26 | ---
|
---|
27 | > int gl_flags = FB2GL_320 | FB2GL_RGBA | FB2GL_16BIT;
|
---|
28 | 255,258c255,258
|
---|
29 | < fb2gl.screen->format->Rmask,
|
---|
30 | < fb2gl.screen->format->Gmask,
|
---|
31 | < fb2gl.screen->format->Bmask,
|
---|
32 | < fb2gl.screen->format->Amask);
|
---|
33 | ---
|
---|
34 | > Rmask,
|
---|
35 | > Gmask,
|
---|
36 | > Bmask,
|
---|
37 | > Amask);
|
---|
38 | 260c260,262
|
---|
39 | < glEnd = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth,
|
---|
40 | ---
|
---|
41 | > fprintf(stderr,"bits: %d\n",sdl_tmpscreen->format->BitsPerPixel);
|
---|
42 | >
|
---|
43 | > tmpSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth,
|
---|
44 | 264,272c266,274
|
---|
45 | < fb2gl.screen->format->Rmask,
|
---|
46 | < fb2gl.screen->format->Gmask,
|
---|
47 | < fb2gl.screen->format->Bmask,
|
---|
48 | < fb2gl.screen->format->Amask);
|
---|
49 | <
|
---|
50 | < blackrect2.x = 0;
|
---|
51 | < blackrect2.y = 0;
|
---|
52 | < blackrect2.w = _screenWidth;
|
---|
53 | < blackrect2.h = 256-_screenHeight-_screenStart;
|
---|
54 | ---
|
---|
55 | > Rmask,
|
---|
56 | > Gmask,
|
---|
57 | > Bmask,
|
---|
58 | > Amask);
|
---|
59 | >
|
---|
60 | > tmpBlackRect.x = 0;
|
---|
61 | > tmpBlackRect.y = 0;
|
---|
62 | > tmpBlackRect.w = _screenWidth;
|
---|
63 | > tmpBlackRect.h = 256-_screenHeight-_screenStart;
|
---|
64 | 308,310c310,312
|
---|
65 | < SDL_FillRect(sdl_tmpscreen, &blackrect, 0);
|
---|
66 | <
|
---|
67 | < fb2gl.blit16(sdl_tmpscreen,1,&blackrect,0,0);
|
---|
68 | ---
|
---|
69 | >
|
---|
70 | > SDL_FillRect(tmpSurface, &blackrect, 0);
|
---|
71 | > fb2gl.blit16(tmpSurface,1,&blackrect,0,0);
|
---|
72 | 365,366c367,368
|
---|
73 | < SDL_FillRect(glEnd, &blackrect2, 0);
|
---|
74 | < fb2gl.blit16(glEnd,1,&blackrect2,0,_screenHeight+_screenStart);
|
---|
75 | ---
|
---|
76 | > SDL_FillRect(tmpSurface, &tmpBlackRect, 0);
|
---|
77 | > fb2gl.blit16(tmpSurface,1,&tmpBlackRect,0,_screenHeight+_screenStart);
|
---|