CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
seabattle: Fixed url and description.
[attic/ports/games-cross.git] / reminiscence / reminiscence-0.1.9.lowres.patch
1 diff -purN REminiscence-0.1.9.orig/video.cpp REminiscence-0.1.9/video.cpp
2 --- REminiscence-0.1.9.orig/video.cpp 2010-01-21 20:37:10.000000000 +0100
3 +++ REminiscence-0.1.9/video.cpp 2010-01-21 21:16:09.000000000 +0100
4 @@ -67,7 +67,7 @@ void Video::updateScreen() {
5 debug(DBG_VIDEO, "Video::updateScreen()");
6 // _fullRefresh = true;
7 if (_fullRefresh) {
8 - _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, 256);
9 + _stub->copyRect(0, 0, Video::GAMESCREEN_W, Video::GAMESCREEN_H, _frontLayer, GAMESCREEN_W);
10 _stub->updateScreen(_shakeOffset);
11 _fullRefresh = false;
12 } else {
13 @@ -82,14 +82,14 @@ void Video::updateScreen() {
14 ++nh;
15 } else if (nh != 0) {
16 int16 x = (i - nh) * SCREENBLOCK_W;
17 - _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256);
18 + _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W);
19 nh = 0;
20 ++count;
21 }
22 }
23 if (nh != 0) {
24 int16 x = (i - nh) * SCREENBLOCK_W;
25 - _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, 256);
26 + _stub->copyRect(x, j * SCREENBLOCK_H, nh * SCREENBLOCK_W, SCREENBLOCK_H, _frontLayer, GAMESCREEN_W);
27 ++count;
28 }
29 p += GAMESCREEN_W / SCREENBLOCK_W;
30 @@ -113,7 +113,7 @@ void Video::fullRefresh() {
31 void Video::fadeOut() {
32 debug(DBG_VIDEO, "Video::fadeOut()");
33 for (int step = 16; step >= 0; --step) {
34 - for (int c = 0; c < 256; ++c) {
35 + for (int c = 0; c < GAMESCREEN_W; ++c) {
36 Color col;
37 _stub->getPaletteEntry(c, &col);
38 col.r = col.r * step >> 4;
39 @@ -200,14 +200,14 @@ void Video::copyLevelMap(uint16 room) {
40 for (int i = 0; i < 4; ++i) {
41 uint16 sz = READ_LE_UINT16(p); p += 2;
42 decodeLevelMap(sz, p, _res->_memBuf); p += sz;
43 - memcpy(vid, _res->_memBuf, 256 * 56);
44 - vid += 256 * 56;
45 + memcpy(vid, _res->_memBuf, GAMESCREEN_W * 56);
46 + vid += GAMESCREEN_W * 56;
47 }
48 } else {
49 for (int i = 0; i < 4; ++i) {
50 - for (int y = 0; y < 224; ++y) {
51 + for (int y = 0; y < GAMESCREEN_H; ++y) {
52 for (int x = 0; x < 64; ++x) {
53 - _frontLayer[i + x * 4 + 256 * y] = p[256 * 56 * i + x + 64 * y];
54 + _frontLayer[i + x * 4 + GAMESCREEN_W * y] = p[GAMESCREEN_W * 56 * i + x + 64 * y];
55 }
56 }
57 }
58 @@ -268,7 +268,7 @@ void Video::drawSpriteSub1(const uint8 *
59 }
60 }
61 src += pitch;
62 - dst += 256;
63 + dst += GAMESCREEN_W;
64 }
65 }
66
67 @@ -281,7 +281,7 @@ void Video::drawSpriteSub2(const uint8 *
68 }
69 }
70 src += pitch;
71 - dst += 256;
72 + dst += GAMESCREEN_W;
73 }
74 }
75
76 @@ -294,7 +294,7 @@ void Video::drawSpriteSub3(const uint8 *
77 }
78 }
79 src += pitch;
80 - dst += 256;
81 + dst += GAMESCREEN_W;
82 }
83 }
84
85 @@ -307,7 +307,7 @@ void Video::drawSpriteSub4(const uint8 *
86 }
87 }
88 src += pitch;
89 - dst += 256;
90 + dst += GAMESCREEN_W;
91 }
92 }
93
94 @@ -320,7 +320,7 @@ void Video::drawSpriteSub5(const uint8 *
95 }
96 }
97 ++src;
98 - dst += 256;
99 + dst += GAMESCREEN_W;
100 }
101 }
102
103 @@ -333,7 +333,7 @@ void Video::drawSpriteSub6(const uint8 *
104 }
105 }
106 ++src;
107 - dst += 256;
108 + dst += GAMESCREEN_W;
109 }
110 }
111
112 @@ -342,7 +342,7 @@ void Video::drawChar(uint8 c, int16 y, i
113 y *= 8;
114 x *= 8;
115 const uint8 *src = _res->_fnt + (c - 32) * 32;
116 - uint8 *dst = _frontLayer + x + 256 * y;
117 + uint8 *dst = _frontLayer + x + GAMESCREEN_W * y;
118 for (int h = 0; h < 8; ++h) {
119 for (int i = 0; i < 4; ++i) {
120 uint8 c1 = (*src & 0xF0) >> 4;
121 @@ -371,14 +371,14 @@ void Video::drawChar(uint8 c, int16 y, i
122 }
123 ++dst;
124 }
125 - dst += 256 - 8;
126 + dst += GAMESCREEN_W - 8;
127 }
128 }
129
130 const char *Video::drawString(const char *str, int16 x, int16 y, uint8 col) {
131 debug(DBG_VIDEO, "Video::drawString('%s', %d, %d, 0x%X)", str, x, y, col);
132 int len = 0;
133 - int offset = y * 256 + x;
134 + int offset = y * GAMESCREEN_W + x;
135 uint8 *dst = _frontLayer + offset;
136 while (1) {
137 uint8 c = *str++;
138 @@ -401,7 +401,7 @@ const char *Video::drawString(const char
139 }
140 ++dst_char;
141 }
142 - dst_char += 256 - 8;
143 + dst_char += GAMESCREEN_W - 8;
144 }
145 dst += 8; // character width
146 ++len;