Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
pause_map.c File Reference

Go to the source code of this file.

Macros

#define MAP_TITLE_X   56
 
#define MAP_TITLE_WIDTH   180
 

Functions

void pause_map_draw_contents (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_map_draw_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_map_init (MenuPanel *tab)
 
void pause_map_handle_input (MenuPanel *tab)
 
void pause_map_update (MenuPanel *tab)
 
void pause_map_cleanup (MenuPanel *tab)
 
void pause_map_calc_path_points (PauseMapSpace *space)
 
void pause_map_draw_border_arrows (s32 imageIndex, s32 x, s32 y)
 

Variables

Gfx PauseGfxWorldMap []
 
Gfx PauseGfxPathPoints []
 
Gfx PauseGfxArrows []
 
u8 pause_world_map_png []
 
HudScriptPauseMapHudScripts [] = { &HES_MapWalk0 }
 
s32 D_8024FA34 = -1
 
s32 PauseMapArrowWobble [] = { 0, 2, 3, 3, 4, 4, 4, 4, 3, 2, 1, 0 }
 
MenuWindowBP PauseMapWindowBPs []
 
MenuPanel gPausePanelMap
 

Macro Definition Documentation

◆ MAP_TITLE_X

#define MAP_TITLE_X   56

Definition at line 8 of file pause_map.c.

◆ MAP_TITLE_WIDTH

#define MAP_TITLE_WIDTH   180

Definition at line 9 of file pause_map.c.

Function Documentation

◆ pause_map_draw_contents()

void pause_map_draw_contents ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 133 of file pause_map.c.

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;
142 PauseMapSpace* mapSpace;
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;
149 Vec2b* path;
150 s32 pathLength;
151
152 gSPDisplayList(gMainGfxPos++, PauseGfxWorldMap);
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
161 gDPLoadTextureTile(gMainGfxPos++, pause_world_map_png, G_IM_FMT_CI, G_IM_SIZ_8b, 320, 320,
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);
166 gDPPipeSync(gMainGfxPos++);
167
168 if (4 * i + 4 >= 110) {
169 break;
170 }
171 }
172
173 gSPDisplayList(gMainGfxPos++, PauseGfxPathPoints);
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
187 if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
188 return;
189 }
190
191 if (x2 >= SCREEN_WIDTH - 1) {
192 x2 = SCREEN_WIDTH - 1;
193 }
194 if (y2 >= SCREEN_HEIGHT - 1) {
195 y2 = SCREEN_HEIGHT - 1;
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 if (evt_get_variable(NULL, GF_MAP_ToadTown + i) == 0) {
208 continue;
209 }
210
211 if (i != PauseMapCursorCurrentOption) {
212 gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 80, 30, 255);
213 } else {
214 gDPSetPrimColor(gMainGfxPos++, 0, 0, (gGameStatusPtr->frameCounter * 10) % 120 + 120,
215 (gGameStatusPtr->frameCounter * 10) % 120 + 120,
216 (gGameStatusPtr->frameCounter * 10) % 120, 255);
217 }
218
219 bigPointX = camX + 26 + posX;
220 bigPointY = camY + 22 + posY;
221 pause_draw_rect((bigPointX - 8) * 4, (bigPointY - 8) * 4, (bigPointX + 8) * 4, (bigPointY + 8) * 4, 0, 0, 0, 0x400, 0x400);
222 gDPPipeSync(gMainGfxPos++);
223 gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 190, 180, 255);
224
225 pathLength = mapSpace->pathLength;
226 path = mapSpace->path;
227 if (path) {
228 pathX = 0;
229 pathY = 0;
230 for (j = 0; j < pathLength; j++, path++) {
231 pathX += path->x;
232 pathY += path->y;
233 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);
234 }
235 }
236 }
237
238 mapULX = baseX + 26 + cameraX;
239 mapULY = baseY + 22 + cameraY;
240 hud_element_set_render_pos(PauseMapHIDs[0], mapULX + PauseMapMarioX, mapULY + PauseMapMarioY - 7);
241 hud_element_draw_without_clipping(PauseMapHIDs[0]);
242
243 currentTab = gPauseMenuCurrentTab;
244 if (currentTab == 6) {
245 pause_set_cursor_pos(WIN_PAUSE_MAP, mapULX + PauseMapTargetX - 8.0f, mapULY + PauseMapTargetY);
246
247 if (gPauseMenuCurrentTab == currentTab) {
249 offsetLeft = offset;
250 offsetRight = offset;
251 offsetUp = offset;
252 offsetDown = offset;
253
254 gSPDisplayList(gMainGfxPos++, PauseGfxArrows);
255
256 if (!(PauseMapCameraX < 0.0f)) {
257 offsetLeft = 0;
258 }
259 pause_map_draw_border_arrows(0, baseX + 26 - offsetLeft, baseY + height / 2 - 8);
260
261 if (!(PauseMapCameraX > -86.0f)) {
262 offsetRight = 0;
263 }
264 pause_map_draw_border_arrows(1, baseX + width - 50 + offsetRight, baseY + height / 2 - 8);
265
266 if (!(PauseMapCameraY < 0.0f)) {
267 offsetUp = 0;
268 }
269 pause_map_draw_border_arrows(2, baseX + width / 2 - 8, baseY + 24 - offsetUp);
270
271 if (!(PauseMapCameraY > -210.0f)) {
272 offsetDown = 0;
273 }
274 pause_map_draw_border_arrows(3, baseX + width / 2 - 8, baseY + height - 44 + offsetDown);
275 }
276 }
277 {
278 s32 x1, y1, x2, y2;
279
280 x1 = baseX + 18;
281 y1 = baseY + 14;
282 x2 = baseX + 268;
283 y2 = baseY + 140;
284
285 if (x1 <= 0) {
286 x1 = 1;
287 }
288 if (y1 <= 0) {
289 y1 = 1;
290 }
291
292 if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
293 return;
294 }
295
296 if (x2 >= SCREEN_WIDTH - 1) {
297 x2 = SCREEN_WIDTH - 1;
298 }
299 if (y2 >= SCREEN_HEIGHT - 1) {
300 y2 = SCREEN_HEIGHT - 1;
301 }
302
303 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
304 }
305 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);
306}
#define draw_box
@ WIN_PAUSE_MAP
Definition enums.h:5283
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1689
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
WindowStyleCustom gPauseWS_27
s8 gPauseMenuCurrentTab
Definition pause_main.c:28
void pause_set_cursor_pos(s32 windowID, s32 posX, s32 posY)
Definition pause_main.c:228
void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
Definition pause_main.c:841
void pause_map_draw_border_arrows(s32 imageIndex, s32 x, s32 y)
Definition pause_map.c:114
s32 PauseMapArrowWobble[]
Definition pause_map.c:40
Gfx PauseGfxArrows[]
Definition pause_gfx.c:246
Gfx PauseGfxPathPoints[]
Definition pause_gfx.c:226
Gfx PauseGfxWorldMap[]
Definition pause_gfx.c:208
u8 pause_world_map_png[]
@ GF_MAP_ToadTown
#define SCREEN_WIDTH
Definition macros.h:109
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define SCREEN_HEIGHT
Definition macros.h:110
GameStatus * gGameStatusPtr
Definition main_loop.c:32
Gfx * gMainGfxPos
Definition cam_main.c:15

◆ pause_map_draw_title()

void pause_map_draw_title ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 308 of file pause_map.c.

308 {
309 s32 msgWidth;
310 s32 msgID;
311
312 if (gPauseMenuCurrentTab == 6) {
313 if (PauseMapCursorCurrentOption != -1) {
314 msgWidth = get_msg_width(MSG_Menus_00F2 + (PauseMapCursorCurrentOption * 3), 0);
315 msgID = MSG_Menus_00F2 + (PauseMapCursorCurrentOption * 3);
316 draw_msg(msgID, baseX + ((width - msgWidth) >> 1), baseY + 1, 255, MSG_PAL_WHITE, 0);
317 }
318 }
319}
#define get_msg_width
#define draw_msg
@ MSG_PAL_WHITE
Definition enums.h:5404

◆ pause_map_init()

void pause_map_init ( MenuPanel * tab)

Definition at line 321 of file pause_map.c.

321 {
322 s32 currentLocation;
323 s32 i;
324
325 for (i = 0; i < ARRAY_COUNT(PauseMapHudScripts); i++) {
326 PauseMapHIDs[i] = hud_element_create(PauseMapHudScripts[i]);
328 }
329
330 for (i = 0; i < ARRAY_COUNT(PauseMapWindowBPs); i++) {
331 PauseMapWindowBPs[i].tab = tab;
332 }
333
335 PauseMapCursorCurrentOption = -1;
336 PauseMapSpacesInSnapRange = 0;
337 PauseMapCursorCurrentOptionCopy = -1;
338 currentLocation = evt_get_variable(0, GB_WorldLocation);
339
340 for (i = 0; i < ARRAY_COUNT(PauseMapSpaces); i++) {
341 if (PauseMapSpaces[i].id == currentLocation) {
342 break;
343 }
344 }
345
346 if (i < ARRAY_COUNT(PauseMapSpaces)) {
347 PauseMapMarioX = PauseMapSpaces[i].pos.x;
348 PauseMapMarioY = PauseMapSpaces[i].pos.y;
349 } else {
350 PauseMapMarioX = 0;
351 PauseMapMarioY = 0;
352 }
353 PauseMapTargetX = PauseMapMarioX;
354 PauseMapTargetY = PauseMapMarioY;
355
356 PauseMapCameraX = 0.0f;
357 PauseMapCameraY = 0.0f;
358 PauseMapCameraX -= (s32)(PauseMapTargetX + PauseMapCameraX - 117.0);
359 PauseMapCameraY -= (s32)(PauseMapTargetY + PauseMapCameraY - 55.0);
360
361 if (PauseMapCameraX > 0) {
362 PauseMapCameraX = 0;
363 }
364 if (PauseMapCameraY > 0) {
365 PauseMapCameraY = 0;
366 }
367
368 if (PauseMapCameraX <= -86.0f) {
369 PauseMapCameraX = -85.0f;
370 }
371 if (PauseMapCameraY <= -210.0f) {
372 PauseMapCameraY = -209.0f;
373 }
374
375 tab->initialized = TRUE;
376}
void setup_pause_menu_tab(MenuWindowBP *bpArray, s32 arraySize)
Definition windows.c:461
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:78
HudScript * PauseMapHudScripts[]
Definition pause_map.c:35
MenuWindowBP PauseMapWindowBPs[]
Definition pause_map.c:41
@ GB_WorldLocation
MenuPanel * tab

◆ pause_map_handle_input()

void pause_map_handle_input ( MenuPanel * tab)

Definition at line 378 of file pause_map.c.

378 {
379 f32 xMovement = gGameStatusPtr->stickX[0] * 0.05f;
380 f32 yMovement = -gGameStatusPtr->stickY[0] * 0.05f;
381 f32 PauseMapTargetYPosTemp = PauseMapTargetY;
382 f32 PauseMapTargetXPosTemp = PauseMapTargetX;
383 s32 xTemp;
384 s32 yTemp;
385
386 if (xMovement == 0.0f && yMovement == 0.0f && PauseMapCursorCurrentOption != -1) {
387 PauseMapSpace* mapSpace = &PauseMapSpaces[PauseMapCursorCurrentOption];
388
389 xMovement = mapSpace->pos.x - PauseMapTargetXPosTemp;
390 yMovement = mapSpace->pos.y - PauseMapTargetYPosTemp;
391
392 xMovement *= 0.32;
393 yMovement *= 0.32;
394 }
395
396 PauseMapTargetX += xMovement;
397 PauseMapTargetY += yMovement;
398
399 if (PauseMapTargetX < 16.0f) {
400 PauseMapTargetX = 16.0f;
401 }
402
403 if (PauseMapTargetY < 8.0f) {
404 PauseMapTargetY = 8.0f;
405 }
406
407 if (PauseMapTargetX >= 316.0f) {
408 PauseMapTargetX = 315.0f;
409 }
410
411 if (PauseMapTargetY >= 308.0f) {
412 PauseMapTargetY = 307.0f;
413 }
414
415 xTemp = PauseMapTargetX + PauseMapCameraX - 117.0;
416 yTemp = PauseMapTargetY + PauseMapCameraY - 55.0;
417
418 if (xTemp >= 53.0) {
419 PauseMapCameraX -= xTemp - 53.0;
420 }
421
422 if (xTemp <= -37.0) {
423 PauseMapCameraX -= xTemp + 37.0;
424 }
425
426 if (yTemp >= 15.0) {
427 PauseMapCameraY -= yTemp - 15.0;
428 }
429
430 if (yTemp <= -15.0) {
431 PauseMapCameraY -= yTemp + 15.0;
432 }
433
434 if (PauseMapCameraX > 0.0f) {
435 PauseMapCameraX = 0.0f;
436 }
437
438 if (PauseMapCameraY > 0.0f) {
439 PauseMapCameraY = 0.0f;
440 }
441
442 if (PauseMapCameraX < -86.0f) {
443 PauseMapCameraX = -86.0f;
444 }
445
446 if (PauseMapCameraY < -210.0f) {
447 PauseMapCameraY = -210.0f;
448 }
449
453 return;
454 }
455
457 if (PauseMapCursorCurrentOption == -1) {
458 gPauseCurrentDescMsg = MSG_NONE;
459 return;
460 }
461
462 gPauseCurrentDescMsg = MSG_Menus_00F3 + (PauseMapCursorCurrentOption * 3);
463
464 // If the story has progressed enough, show the "after" description
465 if (evt_get_variable(0, GB_StoryProgress) >= PauseMapSpaces[PauseMapCursorCurrentOption].afterRequirement) {
467 }
468}
@ BUTTON_B
Definition enums.h:2789
@ SOUND_MENU_BACK
Definition enums.h:701
s32 gPausePressedButtons
Definition pause_main.c:24
HudScript * gPauseCurrentDescIconScript
Definition pause_main.c:26
s32 gPauseCurrentDescMsg
Definition pause_main.c:25
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
@ GB_StoryProgress

◆ pause_map_update()

void pause_map_update ( MenuPanel * tab)

Definition at line 470 of file pause_map.c.

470 {
471 PauseMapSpace* mapSpace = &PauseMapSpaces[0];
472 f32 lowestSqSum = 10000.0f;
473 f32 cursorOption = -1.0f;
474 s32 i;
475
476 PauseMapCursorCurrentOption = -1;
477 PauseMapSpacesInSnapRange = 0;
478
479 for (i = 0; i < ARRAY_COUNT(PauseMapSpaces); i++, mapSpace++) {
480 if (evt_get_variable(0, GF_MAP_ToadTown + i) != 0) {
481 f32 deltaX = PauseMapTargetX - mapSpace->pos.x;
482 f32 deltaY = PauseMapTargetY - mapSpace->pos.y;
483 f32 sqSum = SQ(deltaX) + SQ(deltaY);
484
485 if (sqSum < 400.0f) {
486 PauseMapSpacesInSnapRange++;
487 }
488
489 if (sqSum < lowestSqSum && sqSum < 200.0f) {
490 lowestSqSum = sqSum;
491 cursorOption = i;
492 }
493 }
494 }
495
496 PauseMapCursorCurrentOption = cursorOption;
497 PauseMapCursorCurrentOptionCopy = cursorOption;
498}
#define SQ(x)
Definition macros.h:170

◆ pause_map_cleanup()

void pause_map_cleanup ( MenuPanel * tab)

Definition at line 500 of file pause_map.c.

500 {
501 s32 i;
502
503 for (i = 0; i < ARRAY_COUNT(PauseMapHIDs); i++) {
504 hud_element_free(PauseMapHIDs[i]);
505 }
506}
void hud_element_free(s32 id)

◆ pause_map_calc_path_points()

void pause_map_calc_path_points ( PauseMapSpace * space)

Definition at line 92 of file pause_map.c.

92 {
93 Vec2b* path = space->path;
94 s32 pathLength = space->pathLength;
95 s32 x1 = PauseMapSpaces[space->parent].pos.x;
96 s32 y1 = PauseMapSpaces[space->parent].pos.y;
97 s32 x2 = space->pos.x;
98 s32 y2 = space->pos.y;
99 s32 xThingPrev = 0;
100 s32 yThingPrev = 0;
101 s32 i;
102
103 for (i = 0; i < pathLength; i++) {
104 s32 xThing = ((x1 - x2) * (i + 1)) / (pathLength + 1);
105 s32 yThing = ((y1 - y2) * (i + 1)) / (pathLength + 1);
106
107 path[i].x = xThing - xThingPrev;
108 path[i].y = yThing - yThingPrev;
109 xThingPrev = xThing;
110 yThingPrev = yThing;
111 }
112}

◆ pause_map_draw_border_arrows()

void pause_map_draw_border_arrows ( s32 imageIndex,
s32 x,
s32 y )

Definition at line 114 of file pause_map.c.

114 {
115 s32 size = 16;
116
117 switch (imageIndex) {
118 case 0:
119 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0, 0x400, 0x400);
120 break;
121 case 1:
122 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x200, 0x400, 0x400);
123 break;
124 case 2:
125 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x400, 0x400, 0x400);
126 break;
127 default:
128 pause_draw_rect(x * 4, y * 4, (x + size) * 4, (y + size) * 4, 0, 0, 0x600, 0x400, 0x400);
129 break;
130 }
131}

Referenced by pause_map_draw_contents().

Variable Documentation

◆ PauseGfxWorldMap

Gfx PauseGfxWorldMap[]
extern

Definition at line 208 of file pause_gfx.c.

208 {
209 gsDPPipeSync(),
210 gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
211 gsDPSetCycleType(G_CYC_1CYCLE),
212 gsDPSetTexturePersp(G_TP_NONE),
213 gsDPSetTextureDetail(G_TD_CLAMP),
214 gsDPSetTextureLOD(G_TL_TILE),
215 gsDPSetTextureLUT(G_TT_RGBA16),
216 gsDPSetTextureFilter(G_TF_POINT),
217 gsDPSetTextureConvert(G_TC_FILT),
218 gsDPLoadTLUT_pal256(pause_world_map_pal),
219 gsDPSetRenderMode(G_RM_OPA_SURF, G_RM_OPA_SURF2),
220 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
221 gsSPClearGeometryMode(G_CULL_BOTH | G_LIGHTING),
222 gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
223 gsSPEndDisplayList(),
224};

Referenced by pause_map_draw_contents().

◆ PauseGfxPathPoints

Gfx PauseGfxPathPoints[]
extern

Definition at line 226 of file pause_gfx.c.

226 {
227 gsDPPipeSync(),
228 gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
229 gsDPSetCycleType(G_CYC_1CYCLE),
230 gsDPSetTexturePersp(G_TP_NONE),
231 gsDPSetTextureDetail(G_TD_CLAMP),
232 gsDPSetTextureLOD(G_TL_TILE),
233 gsDPSetTextureFilter(G_TF_POINT),
234 gsDPSetTextureConvert(G_TC_FILT),
235 gsDPSetRenderMode(G_RM_CLD_SURF, G_RM_CLD_SURF2),
236 gsDPSetCombineMode(PM_CC_2F, PM_CC_2F),
237 gsDPSetTextureLUT(G_TT_NONE),
238 gsDPLoadTextureTile(pause_map_location_png, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, 0, 15, 15, 0, G_TX_CLAMP, G_TX_CLAMP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
239 gsDPSetTextureLUT(G_TT_NONE),
240 gsDPLoadMultiTile(pause_map_path_marker_png, 0x100, 1, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, 0, 15, 15, 0, G_TX_CLAMP, G_TX_CLAMP, 4, 4, G_TX_NOLOD, G_TX_NOLOD),
241 gsSPClearGeometryMode(G_LIGHTING),
242 gsSPSetGeometryMode(G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH),
243 gsSPEndDisplayList(),
244};
#define PM_CC_2F
Definition macros.h:388

Referenced by pause_map_draw_contents().

◆ PauseGfxArrows

Gfx PauseGfxArrows[]
extern

Definition at line 246 of file pause_gfx.c.

246 {
247 gsDPPipeSync(),
248 gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
249 gsDPSetCycleType(G_CYC_1CYCLE),
250 gsDPSetTexturePersp(G_TP_NONE),
251 gsDPSetTextureDetail(G_TD_CLAMP),
252 gsDPSetTextureLOD(G_TL_TILE),
253 gsDPSetTextureFilter(G_TF_POINT),
254 gsDPSetTextureConvert(G_TC_FILT),
255 gsDPSetTextureLUT(G_TT_NONE),
256 gsDPLoadTextureTile_4b(pause_arrows_png, G_IM_FMT_IA, pause_arrows_png_width, pause_arrows_png_height, 0, 0, pause_arrows_png_width - 1, pause_arrows_png_height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 4, 6, G_TX_NOLOD, G_TX_NOLOD),
257 gsDPSetRenderMode(AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)),
258 gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
259 gsSPClearGeometryMode(G_LIGHTING),
260 gsSPSetGeometryMode(G_SHADE | G_CULL_BACK | G_SHADING_SMOOTH),
261 gsSPEndDisplayList(),
262};

Referenced by pause_map_draw_contents().

◆ pause_world_map_png

u8 pause_world_map_png[]
extern

Referenced by pause_map_draw_contents().

◆ PauseMapHudScripts

HudScript* PauseMapHudScripts[] = { &HES_MapWalk0 }

Definition at line 35 of file pause_map.c.

35{ &HES_MapWalk0 };
HudScript HES_MapWalk0

Referenced by pause_map_init().

◆ D_8024FA34

s32 D_8024FA34 = -1

Definition at line 36 of file pause_map.c.

◆ PauseMapArrowWobble

s32 PauseMapArrowWobble[] = { 0, 2, 3, 3, 4, 4, 4, 4, 3, 2, 1, 0 }

Definition at line 40 of file pause_map.c.

40{ 0, 2, 3, 3, 4, 4, 4, 4, 3, 2, 1, 0 };

Referenced by pause_map_draw_contents().

◆ PauseMapWindowBPs

MenuWindowBP PauseMapWindowBPs[]

Definition at line 41 of file pause_map.c.

41 {
42 {
43 .windowID = WIN_PAUSE_MAP,
44 .unk_01 = 0,
45 .pos = { .x = 3, .y = 16 },
46 .width = 289,
47 .height = 154,
48 .priority = WINDOW_PRIORITY_1,
49 .fpDrawContents = &pause_map_draw_contents,
50 .tab = NULL,
51 .parentID = WIN_PAUSE_MAIN,
52 .fpUpdate = { WINDOW_UPDATE_HIDE },
53 .extraFlags = 0,
54 .style = { .customStyle = &gPauseWS_26 }
55 },
56 {
57 .windowID = WIN_PAUSE_MAP_TITLE,
58 .unk_01 = 0,
59 .pos = { .x = MAP_TITLE_X, .y = 124 },
60 .width = MAP_TITLE_WIDTH,
61 .height = 20,
62 .priority = WINDOW_PRIORITY_0,
63 .fpDrawContents = &pause_map_draw_title,
64 .tab = NULL,
65 .parentID = WIN_PAUSE_MAP,
66 .fpUpdate = { WINDOW_UPDATE_SHOW },
67 .extraFlags = 0,
68 .style = { .customStyle = &gPauseWS_28 }
69 },
70 {},
71 {},
72 {},
73 {},
74 {}
75};
@ WINDOW_PRIORITY_1
Definition enums.h:3183
@ WINDOW_PRIORITY_0
Definition enums.h:3182
@ WINDOW_UPDATE_SHOW
Definition enums.h:5310
@ WINDOW_UPDATE_HIDE
Definition enums.h:5311
@ WIN_PAUSE_MAP_TITLE
Definition enums.h:5284
@ WIN_PAUSE_MAIN
Definition enums.h:5262
WindowStyleCustom gPauseWS_26
WindowStyleCustom gPauseWS_28
#define MAP_TITLE_WIDTH
Definition pause_map.c:9
#define MAP_TITLE_X
Definition pause_map.c:8
void pause_map_draw_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_map.c:308
void pause_map_draw_contents(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_map.c:133

Referenced by pause_map_init().

◆ gPausePanelMap

MenuPanel gPausePanelMap
Initial value:
= {
.initialized = FALSE,
.col = 0,
.row = 0,
.selected = 0,
.state = 0,
.numCols = 0,
.numRows = 0,
.numPages = 0,
.gridData = NULL,
.fpInit = &pause_map_init,
.fpHandleInput = &pause_map_handle_input,
.fpUpdate = &pause_map_update,
.fpCleanup = &pause_map_cleanup
}
void pause_map_update(MenuPanel *tab)
Definition pause_map.c:470
void pause_map_handle_input(MenuPanel *tab)
Definition pause_map.c:378
void pause_map_init(MenuPanel *tab)
Definition pause_map.c:321
void pause_map_cleanup(MenuPanel *tab)
Definition pause_map.c:500

Definition at line 76 of file pause_map.c.

76 {
77 .initialized = FALSE,
78 .col = 0,
79 .row = 0,
80 .selected = 0,
81 .state = 0,
82 .numCols = 0,
83 .numRows = 0,
84 .numPages = 0,
85 .gridData = NULL,
86 .fpInit = &pause_map_init,
87 .fpHandleInput = &pause_map_handle_input,
88 .fpUpdate = &pause_map_update,
89 .fpCleanup = &pause_map_cleanup
90};