133 {
134 s32 cameraX = PauseMapCameraX;
135 s32 cameraY = PauseMapCameraY;
136 s32 i, j;
137 s32 tileHeight;
138 s32 x1, y1, x2, y2;
139 s32 x1a, y1a, x2a, y2a;
140 s32 posX, posY;
141 s32 ult;
143 s32 camX, camY;
144 s32 pathX, pathY;
145 s32 currentTab;
146 s32 offset, offsetLeft, offsetRight, offsetUp, offsetDown;
147 s32 mapULX, mapULY;
148 s32 bigPointX, bigPointY;
150 s32 pathLength;
151
153 ult = -cameraX * 32;
154 for (i = 0; i < 60; i++) {
155 if (4 * i + 4 < 111) {
156 tileHeight = 4;
157 } else {
158 tileHeight = 111 - 4 * i;
159 }
160
162 0, i * 4 - cameraY, 319, i * 4 + tileHeight - 1 - cameraY, 0,
163 G_TX_CLAMP, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
164 pause_draw_rect((baseX + 26) * 4, (baseY + 22 + 4 * i) * 4, (baseX + 260) * 4,
165 (baseY + 22 + i * 4 + tileHeight) * 4, 0, ult, (-cameraY + i * 4) * 32, 0x400, 0x400);
167
168 if (4 * i + 4 >= 110) {
169 break;
170 }
171 }
172
174
175 x1 = baseX + 26;
176 y1 = baseY + 22;
177 x2 = baseX + 260;
178 y2 = baseY + 132;
179
180 if (x1 <= 0) {
181 x1 = 1;
182 }
183 if (y1 <= 0) {
184 y1 = 1;
185 }
186
188 return;
189 }
190
193 }
196 }
197
198 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
199
200 mapSpace = PauseMapSpaces;
201 camX = cameraX + baseX;
202 camY = cameraY + baseY;
203 for (i = 0; i <
ARRAY_COUNT(PauseMapSpaces); i++, mapSpace++) {
204 posX = mapSpace->
pos.
x;
205 posY = mapSpace->
pos.
y;
206
207
209 continue;
210 }
211
212 if (i != PauseMapCursorCurrentOption) {
213 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 220, 80, 30, 255);
214 } else {
218 }
219
220 bigPointX = camX + 26 + posX;
221 bigPointY = camY + 22 + posY;
222 pause_draw_rect((bigPointX - 8) * 4, (bigPointY - 8) * 4, (bigPointX + 8) * 4, (bigPointY + 8) * 4, 0, 0, 0, 0x400, 0x400);
224 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 230, 190, 180, 255);
225
227 path = mapSpace->
path;
228 if (path) {
229 pathX = 0;
230 pathY = 0;
231 for (j = 0; j < pathLength; j++, path++) {
234 pause_draw_rect((camX + 26 + posX + pathX - 8) * 4, (camY + 22 + posY + pathY - 8) * 4, (camX + 26 + posX + pathX + 8) * 4, (camY + 22 + posY + pathY + 8) * 4, 1, 0, 0, 0x400, 0x400);
235 }
236 }
237 }
238
239 mapULX = baseX + 26 + cameraX;
240 mapULY = baseY + 22 + cameraY;
243
245 if (currentTab == 6) {
247
250 offsetLeft = offset;
251 offsetRight = offset;
252 offsetUp = offset;
253 offsetDown = offset;
254
256
257 if (!(PauseMapCameraX < 0.0f)) {
258 offsetLeft = 0;
259 }
261
262 if (!(PauseMapCameraX > -86.0f)) {
263 offsetRight = 0;
264 }
266
267 if (!(PauseMapCameraY < 0.0f)) {
268 offsetUp = 0;
269 }
271
272 if (!(PauseMapCameraY > -210.0f)) {
273 offsetDown = 0;
274 }
276 }
277 }
278 {
279 s32 x1, y1, x2, y2;
280
281 x1 = baseX + 18;
282 y1 = baseY + 14;
283 x2 = baseX + 268;
284 y2 = baseY + 140;
285
286 if (x1 <= 0) {
287 x1 = 1;
288 }
289 if (y1 <= 0) {
290 y1 = 1;
291 }
292
294 return;
295 }
296
299 }
302 }
303
304 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
305 }
306 draw_box(0, &
gPauseWS_27, baseX + 18, baseY + 14, 0, 250, 126, opacity, darkening, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0, width, height, 0);
307}
s32 evt_get_variable(Evt *script, Bytecode var)
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
WindowStyleCustom gPauseWS_27
void pause_set_cursor_pos(s32 windowID, s32 posX, s32 posY)
void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
void pause_map_draw_border_arrows(s32 imageIndex, s32 x, s32 y)
s32 PauseMapArrowWobble[]
GameStatus * gGameStatusPtr