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 []
 
HudScriptPauseMapIconScripts [] = { &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
208 if (evt_get_variable(NULL, GF_MAP_ToadTown + i) == 0) {
209 continue;
210 }
211
212 if (i != PauseMapCursorCurrentOption) {
213 gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 80, 30, 255);
214 } else {
215 gDPSetPrimColor(gMainGfxPos++, 0, 0, (gGameStatusPtr->frameCounter * 10) % 120 + 120,
216 (gGameStatusPtr->frameCounter * 10) % 120 + 120,
217 (gGameStatusPtr->frameCounter * 10) % 120, 255);
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);
223 gDPPipeSync(gMainGfxPos++);
224 gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 190, 180, 255);
225
226 pathLength = mapSpace->pathLength;
227 path = mapSpace->path;
228 if (path) {
229 pathX = 0;
230 pathY = 0;
231 for (j = 0; j < pathLength; j++, path++) {
232 pathX += path->x;
233 pathY += path->y;
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;
241 hud_element_set_render_pos(PauseMapIconIDs[0], mapULX + PauseMapMarioX, mapULY + PauseMapMarioY - 7);
242 hud_element_draw_without_clipping(PauseMapIconIDs[0]);
243
244 currentTab = gPauseMenuCurrentTab;
245 if (currentTab == 6) {
246 pause_set_cursor_pos(WIN_PAUSE_MAP, mapULX + PauseMapTargetX - 8.0f, mapULY + PauseMapTargetY);
247
248 if (gPauseMenuCurrentTab == currentTab) {
250 offsetLeft = offset;
251 offsetRight = offset;
252 offsetUp = offset;
253 offsetDown = offset;
254
255 gSPDisplayList(gMainGfxPos++, PauseGfxArrows);
256
257 if (!(PauseMapCameraX < 0.0f)) {
258 offsetLeft = 0;
259 }
260 pause_map_draw_border_arrows(0, baseX + 26 - offsetLeft, baseY + height / 2 - 8);
261
262 if (!(PauseMapCameraX > -86.0f)) {
263 offsetRight = 0;
264 }
265 pause_map_draw_border_arrows(1, baseX + width - 50 + offsetRight, baseY + height / 2 - 8);
266
267 if (!(PauseMapCameraY < 0.0f)) {
268 offsetUp = 0;
269 }
270 pause_map_draw_border_arrows(2, baseX + width / 2 - 8, baseY + 24 - offsetUp);
271
272 if (!(PauseMapCameraY > -210.0f)) {
273 offsetDown = 0;
274 }
275 pause_map_draw_border_arrows(3, baseX + width / 2 - 8, baseY + height - 44 + offsetDown);
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
293 if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) {
294 return;
295 }
296
297 if (x2 >= SCREEN_WIDTH - 1) {
298 x2 = SCREEN_WIDTH - 1;
299 }
300 if (y2 >= SCREEN_HEIGHT - 1) {
301 y2 = SCREEN_HEIGHT - 1;
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}
#define draw_box
@ WIN_PAUSE_MAP
Definition enums.h:5284
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
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:105
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define SCREEN_HEIGHT
Definition macros.h:106
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 309 of file pause_map.c.

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

◆ pause_map_init()

void pause_map_init ( MenuPanel * tab)

Definition at line 322 of file pause_map.c.

322 {
323 s32 currentLocation;
324 s32 i;
325
326 for (i = 0; i < ARRAY_COUNT(PauseMapIconScripts); i++) {
327 PauseMapIconIDs[i] = hud_element_create(PauseMapIconScripts[i]);
328 hud_element_set_flags(PauseMapIconIDs[i], HUD_ELEMENT_FLAG_80);
329 }
330
331 for (i = 0; i < ARRAY_COUNT(PauseMapWindowBPs); i++) {
332 PauseMapWindowBPs[i].tab = tab;
333 }
334
336 PauseMapCursorCurrentOption = -1;
337 PauseMapSpacesInSnapRange = 0;
338 PauseMapCursorCurrentOptionCopy = -1;
339 currentLocation = evt_get_variable(0, GB_WorldLocation);
340
341 for (i = 0; i < ARRAY_COUNT(PauseMapSpaces); i++) {
342 if (PauseMapSpaces[i].id == currentLocation) {
343 break;
344 }
345 }
346
347 if (i < ARRAY_COUNT(PauseMapSpaces)) {
348 PauseMapMarioX = PauseMapSpaces[i].pos.x;
349 PauseMapMarioY = PauseMapSpaces[i].pos.y;
350 } else {
351 PauseMapMarioX = 0;
352 PauseMapMarioY = 0;
353 }
354 PauseMapTargetX = PauseMapMarioX;
355 PauseMapTargetY = PauseMapMarioY;
356
357 PauseMapCameraX = 0.0f;
358 PauseMapCameraY = 0.0f;
359 PauseMapCameraX -= (s32)(PauseMapTargetX + PauseMapCameraX - 117.0);
360 PauseMapCameraY -= (s32)(PauseMapTargetY + PauseMapCameraY - 55.0);
361
362 if (PauseMapCameraX > 0) {
363 PauseMapCameraX = 0;
364 }
365 if (PauseMapCameraY > 0) {
366 PauseMapCameraY = 0;
367 }
368
369 if (PauseMapCameraX <= -86.0f) {
370 PauseMapCameraX = -85.0f;
371 }
372 if (PauseMapCameraY <= -210.0f) {
373 PauseMapCameraY = -209.0f;
374 }
375
376 tab->initialized = TRUE;
377}
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:80
HudScript * PauseMapIconScripts[]
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 379 of file pause_map.c.

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

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

◆ pause_map_cleanup()

void pause_map_cleanup ( MenuPanel * tab)

Definition at line 501 of file pause_map.c.

501 {
502 s32 i;
503
504 for (i = 0; i < ARRAY_COUNT(PauseMapIconIDs); i++) {
505 hud_element_free(PauseMapIconIDs[i]);
506 }
507}
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:384

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().

◆ PauseMapIconScripts

HudScript* PauseMapIconScripts[] = { &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:5311
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ WIN_PAUSE_MAP_TITLE
Definition enums.h:5285
@ WIN_PAUSE_MAIN
Definition enums.h:5263
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:309
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:471
void pause_map_handle_input(MenuPanel *tab)
Definition pause_map.c:379
void pause_map_init(MenuPanel *tab)
Definition pause_map.c:322
void pause_map_cleanup(MenuPanel *tab)
Definition pause_map.c:501

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};