117 switch (imageIndex) {
119 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0, 0x400, 0x400);
122 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x200, 0x400, 0x400);
125 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x400, 0x400, 0x400);
128 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x600, 0x400, 0x400);
134 s32 cameraX = PauseMapCameraX;
135 s32 cameraY = PauseMapCameraY;
139 s32 x1a, y1a, x2a, y2a;
146 s32 offset, offsetLeft, offsetRight, offsetUp, offsetDown;
148 s32 bigPointX, bigPointY;
154 for (i = 0; i < 60; i++) {
155 if (4 * i + 4 < 111) {
158 tileHeight = 111 - 4 * i;
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);
168 if (4 * i + 4 >= 110) {
198 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
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;
212 if (i != PauseMapCursorCurrentOption) {
213 gDPSetPrimColor(
gMainGfxPos++, 0, 0, 220, 80, 30, 255);
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);
227 path = mapSpace->
path;
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);
239 mapULX = baseX + 26 + cameraX;
240 mapULY = baseY + 22 + cameraY;
245 if (currentTab == 6) {
251 offsetRight = offset;
257 if (!(PauseMapCameraX < 0.0f)) {
262 if (!(PauseMapCameraX > -86.0f)) {
267 if (!(PauseMapCameraY < 0.0f)) {
272 if (!(PauseMapCameraY > -210.0f)) {
304 gDPSetScissor(
gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
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);
382 f32 PauseMapTargetYPosTemp = PauseMapTargetY;
383 f32 PauseMapTargetXPosTemp = PauseMapTargetX;
387 if (xMovement == 0.0f && yMovement == 0.0f && PauseMapCursorCurrentOption != -1) {
388 PauseMapSpace* mapSpace = &PauseMapSpaces[PauseMapCursorCurrentOption];
390 xMovement = mapSpace->
pos.
x - PauseMapTargetXPosTemp;
391 yMovement = mapSpace->
pos.
y - PauseMapTargetYPosTemp;
397 PauseMapTargetX += xMovement;
398 PauseMapTargetY += yMovement;
400 if (PauseMapTargetX < 16.0f) {
401 PauseMapTargetX = 16.0f;
404 if (PauseMapTargetY < 8.0f) {
405 PauseMapTargetY = 8.0f;
408 if (PauseMapTargetX >= 316.0f) {
409 PauseMapTargetX = 315.0f;
412 if (PauseMapTargetY >= 308.0f) {
413 PauseMapTargetY = 307.0f;
416 xTemp = PauseMapTargetX + PauseMapCameraX - 117.0;
417 yTemp = PauseMapTargetY + PauseMapCameraY - 55.0;
420 PauseMapCameraX -= xTemp - 53.0;
423 if (xTemp <= -37.0) {
424 PauseMapCameraX -= xTemp + 37.0;
428 PauseMapCameraY -= yTemp - 15.0;
431 if (yTemp <= -15.0) {
432 PauseMapCameraY -= yTemp + 15.0;
435 if (PauseMapCameraX > 0.0f) {
436 PauseMapCameraX = 0.0f;
439 if (PauseMapCameraY > 0.0f) {
440 PauseMapCameraY = 0.0f;
443 if (PauseMapCameraX < -86.0f) {
444 PauseMapCameraX = -86.0f;
447 if (PauseMapCameraY < -210.0f) {
448 PauseMapCameraY = -210.0f;
458 if (PauseMapCursorCurrentOption == -1) {
473 f32 lowestSqSum = 10000.0f;
474 f32 cursorOption = -1.0f;
477 PauseMapCursorCurrentOption = -1;
478 PauseMapSpacesInSnapRange = 0;
480 for (i = 0; i <
ARRAY_COUNT(PauseMapSpaces); i++, mapSpace++) {
482 f32 deltaX = PauseMapTargetX - mapSpace->
pos.
x;
483 f32 deltaY = PauseMapTargetY - mapSpace->
pos.
y;
484 f32 sqSum =
SQ(deltaX) +
SQ(deltaY);
486 if (sqSum < 400.0f) {
487 PauseMapSpacesInSnapRange++;
490 if (sqSum < lowestSqSum && sqSum < 200.0f) {
497 PauseMapCursorCurrentOption = cursorOption;
498 PauseMapCursorCurrentOptionCopy = cursorOption;