1 | 59c59
|
---|
2 | < SDL_Rect tmpBlackRect; // Black rectangle at end of the GL screen
|
---|
3 | ---
|
---|
4 | > SDL_Rect tmpBlackRect; // Bottom black border
|
---|
5 | 61a62
|
---|
6 | > int _glBorderHeight; // Used if using black borders
|
---|
7 | 80c81
|
---|
8 | < _glBilinearFilter = true;
|
---|
9 | ---
|
---|
10 | > _glBilinearFilter = false;
|
---|
11 | 82a84
|
---|
12 | > _glBorderHeight = 0; // Forces _glScreenStart to always be 0
|
---|
13 | 170c172
|
---|
14 | < _scaleFactor = _usingOpenGL ? 2 : 1;
|
---|
15 | ---
|
---|
16 | > _scaleFactor = 1; //_usingOpenGL ? 2 : 1;
|
---|
17 | 180c182
|
---|
18 | < if (_mode != GFX_NORMAL)
|
---|
19 | ---
|
---|
20 | > if (_mode != GFX_NORMAL) {
|
---|
21 | 182c184,185
|
---|
22 | <
|
---|
23 | ---
|
---|
24 | > }
|
---|
25 | >
|
---|
26 | 199a203,215
|
---|
27 | >
|
---|
28 | > // Note: Our GL screen is vertically stretched (yfix = 15).
|
---|
29 | > // That makes visible only 320x240 of the GL screen.
|
---|
30 | > // 320x240 visible in GL screen => yfix = 15
|
---|
31 | > // 320x200 visible in GL screen => yfix = 72
|
---|
32 | > int yfix = 15;
|
---|
33 | > _glBorderHeight = 0;
|
---|
34 | > if (_screenHeight == 200) {
|
---|
35 | > // If we are not using borders, we want 320x200 visible
|
---|
36 | > yfix = _glScreenStart? 15: 72;
|
---|
37 | > // 20 (top) + 200 (height) + 20 (bottom) = 240
|
---|
38 | > _glBorderHeight = 20;
|
---|
39 | > }
|
---|
40 | 201,202c217
|
---|
41 | < fb2gl.init(_glWindow.w, _glWindow.h, 0, _glScreenStart? 15: 70,
|
---|
42 | < _glFlags);
|
---|
43 | ---
|
---|
44 | > fb2gl.init(_glWindow.w, _glWindow.h, 0, yfix, _glFlags);
|
---|
45 | 339a355
|
---|
46 | > // Top black border
|
---|
47 | 342c358
|
---|
48 | < _glScreenStart,
|
---|
49 | ---
|
---|
50 | > 0, // _glScreenStart,
|
---|
51 | 419c435
|
---|
52 | < if (!(_full_screen) && (tmpBlackRect.h > 0)) {
|
---|
53 | ---
|
---|
54 | > if (_adjustAspectRatio && tmpBlackRect.h > 0) {
|
---|
55 | 565c581,599
|
---|
56 | < _glScreenStart = 20;
|
---|
57 | ---
|
---|
58 | > _glScreenStart = _glBorderHeight;
|
---|
59 | > // Top black border
|
---|
60 | > SDL_Rect blackrect = {
|
---|
61 | > 0,
|
---|
62 | > 0, // _glScreenStart,
|
---|
63 | > _screenWidth,
|
---|
64 | > _newShakePos + _glScreenStart
|
---|
65 | > };
|
---|
66 | >
|
---|
67 | > SDL_FillRect(tmpSurface, &blackrect, 0);
|
---|
68 | > fb2gl.blit16(tmpSurface, 1, &blackrect, 0, 0);
|
---|
69 | >
|
---|
70 | > // Bottom black border
|
---|
71 | > int _glBottomOfGameScreen = _screenHeight +
|
---|
72 | > _glScreenStart + _currentShakePos;
|
---|
73 | >
|
---|
74 | > tmpBlackRect.h = _glBottomOfTexture -
|
---|
75 | > _glBottomOfGameScreen;
|
---|
76 | >
|
---|
77 | 567c601,602
|
---|
78 | < fb2gl.blit16(tmpSurface, 1, &tmpBlackRect, 0, 0);
|
---|
79 | ---
|
---|
80 | > fb2gl.blit16(tmpSurface, 1, &tmpBlackRect, 0,
|
---|
81 | > _glBottomOfGameScreen);
|
---|
82 | 570c605
|
---|
83 | < fb2gl.init(0, 0, 0, 70, _glFlags);
|
---|
84 | ---
|
---|
85 | > fb2gl.init(0, 0, 0, 72, _glFlags);
|
---|
86 | 574,575c609,610
|
---|
87 | < SDL_Rect full = {0, 0, _screenWidth, _screenHeight};
|
---|
88 | < fb2gl.blit16(_tmpscreen, 1, &full, 0, _glScreenStart);
|
---|
89 | ---
|
---|
90 | > SDL_Rect redraw = {0, 0, _screenWidth, _screenHeight};
|
---|
91 | > fb2gl.blit16(_tmpscreen, 1, &redraw, 0, _glScreenStart);
|
---|
92 | 589a625,626
|
---|
93 | > _scaleFactor = 1;
|
---|
94 | > _scaler_proc = Normal1x;
|
---|
95 | 605c642,643
|
---|
96 | < if (_usingOpenGL)
|
---|
97 | ---
|
---|
98 | > if (_usingOpenGL) {
|
---|
99 | > _glBilinearFilter = false;
|
---|
100 | 606a645
|
---|
101 | > }
|
---|
102 | 611,613c650,652
|
---|
103 | < if (_usingOpenGL) {
|
---|
104 | < SDL_Rect full = {0, 0, _screenWidth, _screenHeight};
|
---|
105 | < fb2gl.blit16(_tmpscreen, 1, &full, 0, _glScreenStart);
|
---|
106 | ---
|
---|
107 | > /* if (_usingOpenGL) {
|
---|
108 | > SDL_Rect redraw = {0, 0, _screenWidth, _screenHeight};
|
---|
109 | > fb2gl.blit16(_tmpscreen, 1, &redraw, 0, _glScreenStart);
|
---|
110 | 615c654
|
---|
111 | < }
|
---|
112 | ---
|
---|
113 | > }*/
|
---|
114 | 622d660
|
---|
115 | <
|
---|