Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
world.c
Go to the documentation of this file.
1#include "common.h"
2#include "ld_addrs.h"
3#include "npc.h"
4#include "hud_element.h"
5#include "rumble.h"
6#include "sprite.h"
7#include "model.h"
8#include "gcc/string.h"
9#include "dx/debug_menu.h"
10#include "world/surfaces.h"
11
12#ifdef SHIFT
13#define ASSET_TABLE_ROM_START (s32) mapfs_ROM_START
14#elif VERSION_JP
15#define ASSET_TABLE_ROM_START 0x1E00000
16#else
17#define ASSET_TABLE_ROM_START 0x1E40000
18#endif
19
20#define ASSET_TABLE_HEADER_SIZE 0x20
21#define ASSET_TABLE_FIRST_ENTRY (ASSET_TABLE_ROM_START + ASSET_TABLE_HEADER_SIZE)
22
25
26char wMapHitName[0x18];
27char wMapShapeName[0x18];
28char wMapTexName[0x18];
29char wMapBgName[0x14];
30
31s32 WorldReverbModeMapping[] = { 0, 1, 2, 3 };
32
33typedef struct {
34 /* 0x00 */ char name[16];
35 /* 0x10 */ u32 offset;
36 /* 0x14 */ u32 compressedLength;
37 /* 0x18 */ u32 decompressedLength;
38} AssetHeader; // size = 0x1C
39
40void fio_deserialize_state(void);
41void load_map_hit_asset(void);
42
43#if defined(SHIFT) || VERSION_IQUE
44#define shim_general_heap_create_obfuscated general_heap_create
45#endif
46
48
50 DMA_COPY_SEGMENT(world_script_api);
51}
52
53void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) {
54 s32 skipLoadingAssets = 0;
55 MapConfig* mapConfig;
56 MapSettings* mapSettings;
57 char texStr[17];
58 s32 decompressedSize;
59
61 gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
62 gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_FLOOR_REFLECTION;
63
68
69#if !VERSION_IQUE
71#endif
73
74#if VERSION_JP
76#endif
80
81 switch (loadType) {
82 case LOAD_FROM_MAP:
85 break;
88 areaID = gGameStatusPtr->areaID;
89 mapID = gGameStatusPtr->mapID;
90 gGameStatusPtr->prevArea = areaID;
92 break;
93 }
94
95 gGameStatusPtr->mapShop = NULL;
96
97 ASSERT_MSG(areaID < ARRAY_COUNT(gAreas) - 1, "Invalid area ID %d", areaID);
98 ASSERT_MSG(mapID < gAreas[areaID].mapCount, "Invalid map ID %d in %s", mapID, gAreas[areaID].id);
99 mapConfig = &gAreas[areaID].maps[mapID];
100
101 #if DX_DEBUG_MENU
102 dx_debug_set_map_info(mapConfig->id, gGameStatus.entryID);
103 #endif
104
105 sprintf(wMapShapeName, "%s_shape", mapConfig->id);
106 sprintf(wMapHitName, "%s_hit", mapConfig->id);
107 strcpy(texStr, mapConfig->id);
108 texStr[3] = '\0';
109 sprintf(wMapTexName, "%s_tex", texStr);
110
111 gMapConfig = mapConfig;
112 if (mapConfig->bgName != NULL) {
113 strcpy(wMapBgName, mapConfig->bgName);
114 }
116
117 if (mapConfig->dmaStart != NULL) {
118 dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest);
119 }
120
121 gMapSettings = *mapConfig->settings;
122
123 mapSettings = &gMapSettings;
124 if (mapConfig->init != NULL) {
125 skipLoadingAssets = mapConfig->init();
126 }
127
128 if (!skipLoadingAssets) {
129 ShapeFile* shapeFile = &gMapShapeData;
130 void* yay0Asset = load_asset_by_name(wMapShapeName, &decompressedSize);
131
132 decode_yay0(yay0Asset, shapeFile);
133 general_heap_free(yay0Asset);
134
135 mapSettings->modelTreeRoot = shapeFile->header.root;
136 mapSettings->modelNameList = shapeFile->header.modelNames;
137 mapSettings->colliderNameList = shapeFile->header.colliderNames;
138 mapSettings->zoneNameList = shapeFile->header.zoneNames;
139 }
140
141 if (mapConfig->bgName != NULL) {
143 }
144
145#if !VERSION_IQUE
147#endif
149
157 clear_npcs();
163
166 }
167
168 if (!skipLoadingAssets) {
171 }
172
175 clear_entity_data(TRUE);
182
184
185 sfx_set_reverb_mode(WorldReverbModeMapping[*(s32*)mapConfig->unk_1C & 0x3]);
187
188 if (!skipLoadingAssets) {
189 s32 texturesOffset = get_asset_offset(wMapTexName, &decompressedSize);
190
191 if (mapSettings->modelTreeRoot != NULL) {
192 load_data_for_models(mapSettings->modelTreeRoot, texturesOffset, decompressedSize);
193 }
194 }
195
196 if (mapSettings->background != NULL) {
197 set_background(mapSettings->background);
198 } else {
199 set_background_size(296, 200, 12, 20);
200 }
201
207
209 set_cam_viewport(CAM_DEFAULT, 12, 20, 296, 200);
210 } else {
211 set_cam_viewport(CAM_DEFAULT, 29, 28, 262, 162);
212 }
213
215 gGameStatusPtr->unk_90 = 1000;
216 gGameStatusPtr->unk_92 = 1000;
218}
219
223
227
228NODISCARD s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID) {
229 s32 i;
230 s32 j;
231 MapConfig* maps;
232
233 // TODO: Potentially a fake match? Difficult to not set the temp in the for conditional.
234 for (i = 0; (maps = gAreas[i].maps) != NULL; i++) {
235 for (j = 0; j < gAreas[i].mapCount; j++) {
236 if (strcmp(maps[j].id, mapName) == 0) {
237 *areaID = i;
238 *mapID = j;
239 return TRUE;
240 }
241 }
242 }
243
244 return FALSE;
245}
246
247void get_map_IDs_by_name_checked(const char* mapName, s16* areaID, s16* mapID) {
248 ASSERT_MSG(get_map_IDs_by_name(mapName, areaID, mapID), "Map not found: %s", mapName);
249}
250
251void* load_asset_by_name(const char* assetName, u32* decompressedSize) {
252 AssetHeader firstHeader;
253 AssetHeader* assetTableBuffer;
254 AssetHeader* curAsset;
255 void* ret;
256
257 dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader);
258 assetTableBuffer = heap_malloc(firstHeader.offset);
259 curAsset = &assetTableBuffer[0];
260 dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer);
261 while (strcmp(curAsset->name, assetName) != 0) {
262 ASSERT_MSG(strcmp(curAsset->name, "end_data") != 0, "Asset not found: %s", assetName);
263 curAsset++;
264 }
265 *decompressedSize = curAsset->decompressedLength;
266 ret = general_heap_malloc(curAsset->compressedLength);
267 dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY + curAsset->offset,
268 (u8*) ASSET_TABLE_FIRST_ENTRY + curAsset->offset + curAsset->compressedLength, ret);
269 heap_free(assetTableBuffer);
270 return ret;
271}
272
273s32 get_asset_offset(char* assetName, s32* compressedSize) {
274 AssetHeader firstHeader;
275 AssetHeader* assetTableBuffer;
276 AssetHeader* curAsset;
277 s32 ret;
278
279 dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + sizeof(AssetHeader), &firstHeader);
280 assetTableBuffer = heap_malloc(firstHeader.offset);
281 curAsset = &assetTableBuffer[0];
282 dma_copy((u8*) ASSET_TABLE_FIRST_ENTRY, (u8*) ASSET_TABLE_FIRST_ENTRY + firstHeader.offset, assetTableBuffer);
283 while (strcmp(curAsset->name, assetName) != 0) {
284 ASSERT_MSG(strcmp(curAsset->name, "end_data") != 0, "Asset not found: %s", assetName);
285 curAsset++;
286 }
287 *compressedSize = curAsset->compressedLength;
288 ret = ASSET_TABLE_FIRST_ENTRY + curAsset->offset;
289 heap_free(assetTableBuffer);
290 return ret;
291}
292
293#define AREA(area, jp_name) { ARRAY_COUNT(area##_maps), area##_maps, "area_" #area, jp_name }
294
295#define MAP(map) \
296 .id = #map, \
297 .settings = &map##_settings, \
298 .dmaStart = map##_ROM_START, \
299 .dmaEnd = map##_ROM_END, \
300 .dmaDest = map##_VRAM \
301
302#define MAP_WITH_INIT(map) \
303 MAP(map), \
304 .init = &map##_map_init \
305
307#include "area_mac/mac.h"
309 { MAP(machi), .bgName = "nok_bg" },
310 { MAP(mac_00), .bgName = "nok_bg" },
311 { MAP(mac_01), .bgName = "nok_bg" },
312 { MAP(mac_02), .bgName = "nok_bg" },
313 { MAP(mac_03), .bgName = "nok_bg" },
314 { MAP_WITH_INIT(mac_04), .bgName = "nok_bg" },
315 { MAP(mac_05), .bgName = "nok_bg" },
316 { MAP(mac_06), .bgName = "nok_bg" },
317};
318
320#include "area_tik/tik.h"
322 { MAP(tik_01), .songVariation = 1, .sfxReverb = 2 },
323 { MAP(tik_02), .songVariation = 1, .sfxReverb = 2 },
324 { MAP(tik_03), .songVariation = 1, .sfxReverb = 2 },
325 { MAP(tik_04), .songVariation = 1, .sfxReverb = 2 },
326 { MAP(tik_05), .songVariation = 1, .sfxReverb = 2 },
327 { MAP(tik_06), .songVariation = 1, .sfxReverb = 2 },
328 { MAP(tik_07), .songVariation = 1, .sfxReverb = 2 },
329 { MAP(tik_08), .songVariation = 1, .sfxReverb = 2 },
330 { MAP(tik_09), .songVariation = 1, .sfxReverb = 2 },
331 { MAP(tik_10), .songVariation = 1, .sfxReverb = 2 },
332 { MAP(tik_12), .songVariation = 1, .sfxReverb = 2 },
333 { MAP(tik_14), .songVariation = 1, .sfxReverb = 2 },
334 { MAP(tik_15), .songVariation = 1, .sfxReverb = 2 },
335 { MAP(tik_17), .songVariation = 1, .sfxReverb = 2 },
336 { MAP(tik_18), .songVariation = 1, .sfxReverb = 2 },
337 { MAP(tik_19), .songVariation = 1, .sfxReverb = 2 },
338 { MAP(tik_20), .songVariation = 1, .sfxReverb = 2 },
339 { MAP(tik_21), .songVariation = 1, .sfxReverb = 2 },
340 { MAP(tik_22), .songVariation = 1, .sfxReverb = 2 },
341 { MAP(tik_23), .songVariation = 1, .sfxReverb = 2 },
342 { MAP_WITH_INIT(tik_24), .songVariation = 1, .sfxReverb = 2 },
343 { MAP(tik_25), .songVariation = 1, .sfxReverb = 2 },
344};
345
347#include "area_kgr/kgr.h"
349 { MAP(kgr_01), .sfxReverb = 1 },
350 { MAP(kgr_02), .sfxReverb = 1 },
351};
352
354#include "area_kmr/kmr.h"
356 { MAP(kmr_00), .bgName = "kmr_bg", .sfxReverb = 1 },
357 { MAP(kmr_02), .bgName = "kmr_bg" },
358 { MAP(kmr_03), .bgName = "kmr_bg" },
359 { MAP(kmr_04), .bgName = "kmr_bg" },
360 { MAP(kmr_05), .bgName = "kmr_bg" },
361 { MAP(kmr_06), .bgName = "kmr_bg" },
362 { MAP(kmr_07), .bgName = "kmr_bg" },
363 { MAP(kmr_09), .bgName = "kmr_bg" },
364 { MAP(kmr_10), .bgName = "kmr_bg" },
365 { MAP(kmr_11), .bgName = "kmr_bg" },
366 { MAP(kmr_12), .bgName = "kmr_bg" },
367 { MAP(kmr_20), .bgName = "kmr_bg" }, // Mario's House
368 { MAP_WITH_INIT(kmr_21) },
369 { MAP_WITH_INIT(kmr_22) },
370 { MAP_WITH_INIT(kmr_23) },
371 { MAP_WITH_INIT(kmr_24) },
372 { MAP(kmr_30) },
373};
374
376#include "area_iwa/iwa.h"
378 { MAP(iwa_00), .bgName = "iwa_bg" },
379 { MAP(iwa_01), .bgName = "iwa_bg" },
380 { MAP(iwa_02), .bgName = "iwa_bg" },
381 { MAP(iwa_03), .bgName = "iwa_bg" },
382 { MAP(iwa_04), .bgName = "iwa_bg" },
383 { MAP(iwa_10), .bgName = "iwa_bg" },
384 { MAP(iwa_11), .bgName = "iwa_bg" },
385};
386
388#include "area_dro/dro.h"
390 { MAP(dro_01), .bgName = "sbk_bg" },
391 { MAP(dro_02), .bgName = "sbk_bg" },
392};
393
395#include "area_sbk/sbk.h"
397 { MAP(sbk_00), .bgName = "sbk_bg" },
398 { MAP(sbk_01), .bgName = "sbk_bg" },
399 { MAP(sbk_02), .bgName = "sbk_bg" },
400 { MAP(sbk_03), .bgName = "sbk_bg" },
401 { MAP(sbk_04), .bgName = "sbk_bg" },
402 { MAP(sbk_05), .bgName = "sbk_bg" },
403 { MAP(sbk_06), .bgName = "sbk_bg" },
404 { MAP(sbk_10), .bgName = "sbk_bg" },
405 { MAP(sbk_11), .bgName = "sbk_bg" },
406 { MAP(sbk_12), .bgName = "sbk_bg" },
407 { MAP(sbk_13), .bgName = "sbk_bg" },
408 { MAP(sbk_14), .bgName = "sbk_bg" },
409 { MAP(sbk_15), .bgName = "sbk_bg" },
410 { MAP(sbk_16), .bgName = "sbk_bg" },
411 { MAP(sbk_20), .bgName = "sbk_bg" },
412 { MAP(sbk_21), .bgName = "sbk_bg" },
413 { MAP(sbk_22), .bgName = "sbk_bg" },
414 { MAP(sbk_23), .bgName = "sbk_bg" },
415 { MAP(sbk_24), .bgName = "sbk_bg" },
416 { MAP(sbk_25), .bgName = "sbk_bg" },
417 { MAP(sbk_26), .bgName = "sbk_bg" },
418 { MAP(sbk_30), .bgName = "sbk_bg" },
419 { MAP(sbk_31), .bgName = "sbk_bg" },
420 { MAP(sbk_32), .bgName = "sbk_bg" },
421 { MAP(sbk_33), .bgName = "sbk_bg" },
422 { MAP(sbk_34), .bgName = "sbk_bg" },
423 { MAP(sbk_35), .bgName = "sbk_bg" },
424 { MAP(sbk_36), .bgName = "sbk_bg" },
425 { MAP(sbk_40), .bgName = "sbk_bg" },
426 { MAP(sbk_41), .bgName = "sbk_bg" },
427 { MAP(sbk_42), .bgName = "sbk_bg" },
428 { MAP(sbk_43), .bgName = "sbk_bg" },
429 { MAP(sbk_44), .bgName = "sbk_bg" },
430 { MAP(sbk_45), .bgName = "sbk_bg" },
431 { MAP(sbk_46), .bgName = "sbk_bg" },
432 { MAP(sbk_50), .bgName = "sbk_bg" },
433 { MAP(sbk_51), .bgName = "sbk_bg" },
434 { MAP(sbk_52), .bgName = "sbk_bg" },
435 { MAP(sbk_53), .bgName = "sbk_bg" },
436 { MAP(sbk_54), .bgName = "sbk_bg" },
437 { MAP(sbk_55), .bgName = "sbk_bg" },
438 { MAP(sbk_56), .bgName = "sbk_bg" },
439 { MAP(sbk_60), .bgName = "sbk_bg" },
440 { MAP(sbk_61), .bgName = "sbk_bg" },
441 { MAP(sbk_62), .bgName = "sbk_bg" },
442 { MAP(sbk_63), .bgName = "sbk_bg" },
443 { MAP(sbk_64), .bgName = "sbk_bg" },
444 { MAP(sbk_65), .bgName = "sbk_bg" },
445 { MAP(sbk_66), .bgName = "sbk_bg" },
446 { MAP(sbk_99), .bgName = "sbk_bg" },
447};
448
450#include "area_isk/isk.h"
452 { MAP(isk_01), .bgName = "sbk3_bg", .songVariation = 1, .sfxReverb = 2 },
453 { MAP(isk_02), .bgName = "sbk3_bg", .songVariation = 1, .sfxReverb = 2 },
454 { MAP(isk_03), .songVariation = 1, .sfxReverb = 2 },
455 { MAP(isk_04), .bgName = "sbk3_bg", .songVariation = 1, .sfxReverb = 2 },
456 { MAP(isk_05), .songVariation = 1, .sfxReverb = 2 },
457 { MAP(isk_06), .songVariation = 1, .sfxReverb = 2 },
458 { MAP(isk_07), .songVariation = 1, .sfxReverb = 2 },
459 { MAP(isk_08), .songVariation = 1, .sfxReverb = 2 },
460 { MAP(isk_09), .songVariation = 1, .sfxReverb = 2 },
461 { MAP(isk_10), .songVariation = 1, .sfxReverb = 2 },
462 { MAP(isk_11), .songVariation = 1, .sfxReverb = 2 },
463 { MAP(isk_12), .songVariation = 1, .sfxReverb = 2 },
464 { MAP(isk_13), .songVariation = 1, .sfxReverb = 2 },
465 { MAP(isk_14), .songVariation = 1, .sfxReverb = 2 },
466 { MAP(isk_16), .songVariation = 1, .sfxReverb = 2 },
467 { MAP(isk_18), .songVariation = 1, .sfxReverb = 2 },
468 { MAP(isk_19), .songVariation = 1, .sfxReverb = 2 },
469};
470
472#include "area_trd/trd.h"
474 { MAP(trd_00), .bgName = "nok_bg" },
475 { MAP(trd_01), .songVariation = 1, .sfxReverb = 3 },
476 { MAP(trd_02), .songVariation = 1, .sfxReverb = 3 },
477 { MAP(trd_03), .songVariation = 1, .sfxReverb = 3 },
478 { MAP(trd_04), .songVariation = 1, .sfxReverb = 3 },
479 { MAP(trd_05), .songVariation = 1, .sfxReverb = 3 },
480 { MAP(trd_06), .songVariation = 1, .sfxReverb = 3 },
481 { MAP(trd_07), .songVariation = 1, .sfxReverb = 3 },
482 { MAP(trd_08), .songVariation = 1, .sfxReverb = 3 },
483 { MAP(trd_09), .bgName = "nok_bg" },
484 { MAP(trd_10), .songVariation = 1, .sfxReverb = 3 },
485};
486
488#include "area_nok/nok.h"
490 { MAP(nok_01), .bgName = "nok_bg" },
491 { MAP(nok_02), .bgName = "nok_bg" },
492 { MAP(nok_03), .bgName = "nok_bg" },
493 { MAP(nok_04), .bgName = "nok_bg" },
494 { MAP(nok_11), .bgName = "nok_bg" },
495 { MAP(nok_12), .bgName = "nok_bg" },
496 { MAP(nok_13), .bgName = "nok_bg" },
497 { MAP(nok_14), .bgName = "nok_bg" },
498 { MAP(nok_15), .bgName = "nok_bg" },
499};
500
502#include "area_hos/hos.h"
504 { MAP_WITH_INIT(hos_00), .bgName = "nok_bg" },
505 { MAP(hos_01), .bgName = "hos_bg" },
506 { MAP(hos_02), .bgName = "hos_bg" },
507 { MAP(hos_03), .bgName = "hos_bg" },
508 { MAP(hos_04), .bgName = "hos_bg" },
509 { MAP(hos_05), .bgName = "hos_bg", .songVariation = 1, .sfxReverb = 2 },
510 { MAP(hos_06), .bgName = "hos_bg" },
511 { MAP_WITH_INIT(hos_10), .bgName = "hos_bg" },
512 { MAP(hos_20), .bgName = "hos_bg" },
513};
514
516#include "area_kpa/kpa.h"
518 { MAP(kpa_01), .songVariation = 1, .sfxReverb = 3 },
519 { MAP(kpa_03), .songVariation = 1, .sfxReverb = 3 },
520 { MAP(kpa_04), .songVariation = 1, .sfxReverb = 2 },
521 { MAP(kpa_08), .songVariation = 1, .sfxReverb = 2 },
522 { MAP(kpa_09), .songVariation = 1, .sfxReverb = 2 },
523 { MAP(kpa_10), .songVariation = 1, .sfxReverb = 3 },
524 { MAP(kpa_11), .songVariation = 1, .sfxReverb = 3 },
525 { MAP(kpa_12), .songVariation = 1, .sfxReverb = 3 },
526 { MAP(kpa_13), .songVariation = 1, .sfxReverb = 3 },
527 { MAP(kpa_14), .songVariation = 1, .sfxReverb = 3 },
528 { MAP(kpa_15), .songVariation = 1, .sfxReverb = 3 },
529 { MAP(kpa_16), .songVariation = 1, .sfxReverb = 3 },
530 { MAP(kpa_17), .songVariation = 1, .sfxReverb = 2 },
531 { MAP(kpa_32), .bgName = "kpa_bg", .songVariation = 1, .sfxReverb = 3 },
532 { MAP(kpa_33), .bgName = "kpa_bg", .songVariation = 1, .sfxReverb = 3 },
533 { MAP(kpa_40), .songVariation = 1, .sfxReverb = 2 },
534 { MAP(kpa_41), .songVariation = 1, .sfxReverb = 2 },
535 { MAP(kpa_50), .songVariation = 1, .sfxReverb = 2 },
536 { MAP_WITH_INIT(kpa_51), .songVariation = 1, .sfxReverb = 2 },
537 { MAP(kpa_52), .songVariation = 1, .sfxReverb = 2 },
538 { MAP_WITH_INIT(kpa_53), .songVariation = 1, .sfxReverb = 2 },
539 { MAP(kpa_60), .bgName = "kpa_bg" },
540 { MAP(kpa_61), .bgName = "kpa_bg" },
541 { MAP(kpa_62), .bgName = "kpa_bg" },
542 { MAP(kpa_63), .songVariation = 1, .sfxReverb = 2 },
543 { MAP(kpa_70), .songVariation = 1, .sfxReverb = 3 },
544 { MAP_WITH_INIT(kpa_81), .songVariation = 1, .sfxReverb = 2 },
545 { MAP_WITH_INIT(kpa_82), .songVariation = 1, .sfxReverb = 2 },
546 { MAP_WITH_INIT(kpa_83), .songVariation = 1, .sfxReverb = 2 },
547 { MAP(kpa_90), .songVariation = 1, .sfxReverb = 2 },
548 { MAP(kpa_91), .songVariation = 1, .sfxReverb = 2 },
549 { MAP(kpa_94), .songVariation = 1, .sfxReverb = 2 },
550 { MAP(kpa_95), .songVariation = 1, .sfxReverb = 2 },
551 { MAP(kpa_96), .songVariation = 1, .sfxReverb = 1 },
552 { MAP_WITH_INIT(kpa_100), .songVariation = 1, .sfxReverb = 1 },
553 { MAP_WITH_INIT(kpa_101), .songVariation = 1, .sfxReverb = 1 },
554 { MAP(kpa_102), .songVariation = 1, .sfxReverb = 3 },
555 { MAP(kpa_111), .songVariation = 1, .sfxReverb = 3 },
556 { MAP(kpa_112), .songVariation = 1, .sfxReverb = 2 },
557 { MAP(kpa_113), .songVariation = 1, .sfxReverb = 3 },
558 { MAP_WITH_INIT(kpa_114), .songVariation = 1, .sfxReverb = 2 },
559 { MAP(kpa_115), .songVariation = 1, .sfxReverb = 3 },
560 { MAP(kpa_116), .songVariation = 1, .sfxReverb = 2 },
561 { MAP(kpa_117), .songVariation = 1, .sfxReverb = 1 },
562 { MAP(kpa_118), .songVariation = 1, .sfxReverb = 2 },
563 { MAP(kpa_119), .songVariation = 1, .sfxReverb = 1 },
564 { MAP(kpa_121), .songVariation = 1, .sfxReverb = 2 },
565 { MAP(kpa_130), .songVariation = 1, .sfxReverb = 3 },
566 { MAP(kpa_133), .songVariation = 1, .sfxReverb = 3 },
567 { MAP(kpa_134), .songVariation = 1, .sfxReverb = 3 },
568};
569
571#include "area_osr/osr.h"
573 { MAP(osr_00), .bgName = "nok_bg" },
574 { MAP_WITH_INIT(osr_01), .bgName = "nok_bg" },
575 { MAP_WITH_INIT(osr_02), .bgName = "kpa_bg" },
576 { MAP_WITH_INIT(osr_03), .bgName = "kpa_bg" },
577 { MAP_WITH_INIT(osr_04), .bgName = "nok_bg" },
578};
579
582#include "area_kkj/kkj.h"
584 { MAP_WITH_INIT(kkj_00), .bgName = "nok_bg", .songVariation = 1, .sfxReverb = 3 },
585 { MAP(kkj_01), .bgName = "nok_bg", .songVariation = 1, .sfxReverb = 3 },
586 { MAP(kkj_02), .bgName = "nok_bg", .sfxReverb = 2 },
587 { MAP_WITH_INIT(kkj_03), .bgName = "nok_bg", .sfxReverb = 3 },
588 { MAP(kkj_10), .songVariation = 1, .sfxReverb = 3 },
589 { MAP(kkj_11), .songVariation = 1, .sfxReverb = 3 },
590 { MAP(kkj_12), .songVariation = 1, .sfxReverb = 2 },
591 { MAP_WITH_INIT(kkj_13), .bgName = "kpa_bg", .songVariation = 1, .sfxReverb = 3},
592 { MAP_WITH_INIT(kkj_14), .bgName = "kpa_bg" },
593 { MAP(kkj_15) },
594 { MAP(kkj_16), .sfxReverb = 1 },
595 { MAP(kkj_17) },
596 { MAP(kkj_18), .bgName = "kpa_bg" },
597 { MAP(kkj_19) },
598 { MAP(kkj_20) },
599 { MAP(kkj_21), .sfxReverb = 1 },
600 { MAP(kkj_22), .bgName = "kpa_bg", .songVariation = 1, .sfxReverb = 2 },
601 { MAP_WITH_INIT(kkj_23), .bgName = "kpa_bg" },
602 { MAP(kkj_24), .bgName = "kpa_bg", .songVariation = 1, .sfxReverb = 2 },
603 { MAP_WITH_INIT(kkj_25), .bgName = "kpa_bg" },
604 { MAP(kkj_26), .bgName = "kpa_bg" },
605 { MAP(kkj_26), .sfxReverb = 2 },
606 { MAP(kkj_27), .sfxReverb = 1 },
607 { MAP(kkj_28), .sfxReverb = 1 },
608 { MAP(kkj_29), .sfxReverb = 1 },
609};
610
612#include "area_jan/jan.h"
614 { MAP(jan_00), .bgName = "yos_bg" },
615 { MAP(jan_01), .bgName = "yos_bg" },
616 { MAP(jan_02), .bgName = "yos_bg" },
617 { MAP(jan_03), .bgName = "yos_bg" },
618 { MAP(jan_04), .bgName = "yos_bg" },
619 { MAP(jan_05), .bgName = "yos_bg" },
620 { MAP(jan_06), .bgName = "jan_bg" },
621 { MAP(jan_07), .bgName = "yos_bg" },
622 { MAP(jan_08), .bgName = "yos_bg" },
623 { MAP(jan_09), .bgName = "yos_bg" },
624 { MAP(jan_10), .bgName = "yos_bg" },
625 { MAP(jan_11), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 2 },
626 { MAP(jan_12), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
627 { MAP(jan_13), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
628 { MAP(jan_14), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
629 { MAP(jan_15), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
630 { MAP(jan_16), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
631 { MAP(jan_17), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 2 },
632 { MAP(jan_18), .bgName = "yos_bg" },
633 { MAP(jan_19), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 2 },
634 { MAP(jan_22), .bgName = "jan_bg", .songVariation = 1, .sfxReverb = 1 },
635 { MAP(jan_23), .bgName = "yos_bg" },
636};
637
639#include "area_mim/mim.h"
641 { MAP(mim_01), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
642 { MAP(mim_02), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
643 { MAP(mim_03), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
644 { MAP(mim_04), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
645 { MAP(mim_05), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
646 { MAP(mim_06), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
647 { MAP(mim_07), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
648 { MAP(mim_08), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
649 { MAP(mim_09), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
650 { MAP(mim_10), .bgName = "nok_bg" },
651 { MAP(mim_11), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 2 },
652 { MAP(mim_12), .bgName = "arn_bg", .songVariation = 1, .sfxReverb = 2 },
653};
654
656#include "area_obk/obk.h"
658 { MAP(obk_01), .songVariation = 1, .sfxReverb = 2 },
659 { MAP(obk_02), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 1 },
660 { MAP(obk_03), .songVariation = 1, .sfxReverb = 1 },
661 { MAP(obk_04), .songVariation = 1, .sfxReverb = 1 },
662 { MAP(obk_05), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 1 },
663 { MAP(obk_06), .songVariation = 1, .sfxReverb = 1 },
664 { MAP(obk_07), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 1 },
665 { MAP(obk_08), .bgName = "obk_bg", .songVariation = 1, .sfxReverb = 1 },
666 { MAP(obk_09), .songVariation = 1, .sfxReverb = 2 },
667};
668
670#include "area_arn/arn.h"
672 { MAP(arn_02), .bgName = "arn_bg" },
673 { MAP(arn_03), .bgName = "arn_bg" },
674 { MAP(arn_04), .bgName = "arn_bg" },
675 { MAP(arn_05), .bgName = "arn_bg" },
676 { MAP(arn_07), .bgName = "arn_bg" },
677 { MAP(arn_08), .songVariation = 1, .sfxReverb = 1 },
678 { MAP(arn_09), .songVariation = 1, .sfxReverb = 1 },
679 { MAP(arn_10), .songVariation = 1, .sfxReverb = 1 },
680 { MAP(arn_11), .songVariation = 1, .sfxReverb = 1 },
681 { MAP(arn_12), .songVariation = 1, .sfxReverb = 1 },
682 { MAP(arn_13), .songVariation = 1, .sfxReverb = 1 },
683};
684
686#include "area_dgb/dgb.h"
688 { MAP_WITH_INIT(dgb_00), .bgName = "arn_bg" },
689 { MAP(dgb_01), .songVariation = 1, .sfxReverb = 2 },
690 { MAP(dgb_02), .songVariation = 1, .sfxReverb = 2 },
691 { MAP(dgb_03), .songVariation = 1, .sfxReverb = 2 },
692 { MAP(dgb_04), .songVariation = 1, .sfxReverb = 2 },
693 { MAP(dgb_05), .songVariation = 1, .sfxReverb = 2 },
694 { MAP(dgb_06), .songVariation = 1, .sfxReverb = 2 },
695 { MAP(dgb_07), .songVariation = 1, .sfxReverb = 2 },
696 { MAP(dgb_08), .songVariation = 1, .sfxReverb = 2 },
697 { MAP(dgb_09), .songVariation = 1, .sfxReverb = 2 },
698 { MAP(dgb_10), .songVariation = 1, .sfxReverb = 2 },
699 { MAP(dgb_11), .songVariation = 1, .sfxReverb = 2 },
700 { MAP(dgb_12), .songVariation = 1, .sfxReverb = 2 },
701 { MAP(dgb_13), .songVariation = 1, .sfxReverb = 2 },
702 { MAP(dgb_14), .songVariation = 1, .sfxReverb = 2 },
703 { MAP(dgb_15), .songVariation = 1, .sfxReverb = 2 },
704 { MAP(dgb_16), .songVariation = 1, .sfxReverb = 2 },
705 { MAP(dgb_17), .songVariation = 1, .sfxReverb = 2 },
706 { MAP(dgb_18), .songVariation = 1, .sfxReverb = 2 },
707};
708
710#include "area_kzn/kzn.h"
712 { MAP(kzn_01), .songVariation = 1, .sfxReverb = 2 },
713 { MAP(kzn_02), .songVariation = 1, .sfxReverb = 2 },
714 { MAP(kzn_03), .songVariation = 1, .sfxReverb = 2 },
715 { MAP(kzn_04), .songVariation = 1, .sfxReverb = 2 },
716 { MAP(kzn_05), .songVariation = 1, .sfxReverb = 2 },
717 { MAP(kzn_06), .songVariation = 1, .sfxReverb = 2 },
718 { MAP(kzn_07), .songVariation = 1, .sfxReverb = 2 },
719 { MAP(kzn_08), .songVariation = 1, .sfxReverb = 2 },
720 { MAP(kzn_09), .songVariation = 1, .sfxReverb = 2 },
721 { MAP(kzn_10), .songVariation = 1, .sfxReverb = 2 },
722 { MAP(kzn_11), .songVariation = 1, .sfxReverb = 2 },
723 { MAP(kzn_17), .songVariation = 1, .sfxReverb = 2 },
724 { MAP(kzn_18), .songVariation = 1, .sfxReverb = 2 },
725 { MAP(kzn_19), .songVariation = 1, .sfxReverb = 2 },
726 { MAP(kzn_20), .songVariation = 1, .sfxReverb = 2 },
727 { MAP(kzn_22), .songVariation = 1, .sfxReverb = 2 },
728 { MAP(kzn_23), .bgName = "yos_bg", .songVariation = 1, .sfxReverb = 2 },
729};
730
732#include "area_flo/flo.h"
734 { MAP(flo_00), .bgName = "fla_bg" },
735 { MAP(flo_03), .bgName = "fla_bg" },
736 { MAP(flo_07), .bgName = "fla_bg" },
737 { MAP(flo_08), .bgName = "fla_bg" },
738 { MAP(flo_09), .bgName = "fla_bg" },
739 { MAP(flo_10), .bgName = "fla_bg" },
740 { MAP(flo_11), .bgName = "fla_bg" },
741 { MAP(flo_12), .bgName = "fla_bg" },
742 { MAP(flo_13), .bgName = "fla_bg" },
743 { MAP(flo_14), .bgName = "fla_bg" },
744 { MAP(flo_15), .bgName = "fla_bg" },
745 { MAP(flo_16), .bgName = "fla_bg" },
746 { MAP(flo_17), .bgName = "fla_bg" },
747 { MAP(flo_18), .bgName = "fla_bg" },
748 { MAP(flo_19), .bgName = "sra_bg" },
749 { MAP(flo_21), .bgName = "sra_bg" },
750 { MAP(flo_22), .bgName = "fla_bg" },
751 { MAP(flo_23), .bgName = "fla_bg" },
752 { MAP(flo_24), .bgName = "fla_bg" },
753 { MAP(flo_25), .bgName = "fla_bg" },
754};
755
757#include "area_sam/sam.h"
759 { MAP(sam_01), .bgName = "yki_bg" },
760 { MAP(sam_02), .bgName = "yki_bg" },
761 { MAP(sam_03), .bgName = "yki_bg" },
762 { MAP(sam_04), .bgName = "yki_bg" },
763 { MAP(sam_05), .bgName = "sam_bg" },
764 { MAP(sam_06), .bgName = "sam_bg" },
765 { MAP(sam_07), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
766 { MAP(sam_08), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
767 { MAP(sam_09), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
768 { MAP(sam_10), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
769 { MAP(sam_11), .bgName = "yki_bg" },
770 { MAP(sam_12), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
771};
772
774#include "area_pra/pra.h"
776 { MAP_WITH_INIT(pra_01), .bgName = "yki_bg", .sfxReverb = 1 },
777 { MAP_WITH_INIT(pra_02), .songVariation = 1, .sfxReverb = 2 },
778 { MAP_WITH_INIT(pra_03), .songVariation = 1, .sfxReverb = 2 },
779 { MAP_WITH_INIT(pra_04), .songVariation = 1, .sfxReverb = 2 },
780 { MAP_WITH_INIT(pra_05), .songVariation = 1, .sfxReverb = 1 },
781 { MAP_WITH_INIT(pra_06), .songVariation = 1, .sfxReverb = 1 },
782 { MAP_WITH_INIT(pra_09), .songVariation = 1, .sfxReverb = 2 },
783 { MAP_WITH_INIT(pra_10), .songVariation = 1, .sfxReverb = 2 },
784 { MAP_WITH_INIT(pra_11), .songVariation = 1, .sfxReverb = 1 },
785 { MAP_WITH_INIT(pra_12), .songVariation = 1, .sfxReverb = 1 },
786 { MAP_WITH_INIT(pra_13), .songVariation = 1, .sfxReverb = 2 },
787 { MAP_WITH_INIT(pra_14), .songVariation = 1, .sfxReverb = 2 },
788 { MAP_WITH_INIT(pra_15), .bgName = "yki_bg", .songVariation = 1, .sfxReverb = 1 },
789 { MAP_WITH_INIT(pra_16), .songVariation = 1, .sfxReverb = 2 },
790 { MAP_WITH_INIT(pra_18), .songVariation = 1, .sfxReverb = 2 },
791 { MAP_WITH_INIT(pra_19), .songVariation = 1, .sfxReverb = 2 },
792 { MAP_WITH_INIT(pra_20), .songVariation = 1, .sfxReverb = 1 },
793 { MAP_WITH_INIT(pra_21), .songVariation = 1, .sfxReverb = 2 },
794 { MAP_WITH_INIT(pra_22), .songVariation = 1, .sfxReverb = 2 },
795 { MAP_WITH_INIT(pra_27), .songVariation = 1, .sfxReverb = 1 },
796 { MAP_WITH_INIT(pra_28), .songVariation = 1, .sfxReverb = 1 },
797 { MAP_WITH_INIT(pra_29), .songVariation = 1, .sfxReverb = 2 },
798 { MAP_WITH_INIT(pra_31), .songVariation = 1, .sfxReverb = 2 },
799 { MAP_WITH_INIT(pra_32), .bgName = "sam_bg", .songVariation = 1, .sfxReverb = 1 },
800 { MAP_WITH_INIT(pra_33), .songVariation = 1, .sfxReverb = 2 },
801 { MAP_WITH_INIT(pra_34), .songVariation = 1, .sfxReverb = 1 },
802 { MAP_WITH_INIT(pra_35), .songVariation = 1, .sfxReverb = 2 },
803 { MAP_WITH_INIT(pra_36), .songVariation = 1, .sfxReverb = 2 },
804 { MAP_WITH_INIT(pra_37), .songVariation = 1, .sfxReverb = 2 },
805 { MAP_WITH_INIT(pra_38), .songVariation = 1, .sfxReverb = 2 },
806 { MAP_WITH_INIT(pra_39), .songVariation = 1, .sfxReverb = 2 },
807 { MAP_WITH_INIT(pra_40), .songVariation = 1, .sfxReverb = 1 },
808};
809
811#include "area_omo/omo.h"
813 { MAP(omo_01), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
814 { MAP(omo_02), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
815 { MAP(omo_03), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
816 { MAP(omo_04), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
817 { MAP(omo_05), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
818 { MAP(omo_06), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
819 { MAP(omo_07), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
820 { MAP(omo_08), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
821 { MAP(omo_09), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
822 { MAP(omo_10), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
823 { MAP(omo_11), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
824 { MAP(omo_12), .songVariation = 1, .sfxReverb = 2 },
825 { MAP(omo_13), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
826 { MAP(omo_14), .songVariation = 1, .sfxReverb = 2 },
827 { MAP(omo_15), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
828 { MAP(omo_16), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
829 { MAP(omo_17), .bgName = "omo_bg", .songVariation = 1, .sfxReverb = 2 },
830};
831
833#include "area_tst/tst.h"
835 { MAP(tst_01), .bgName = "nok_bg" },
836 { MAP(tst_02), .bgName = "nok_bg" },
837 { MAP(tst_03), .bgName = "nok_bg" },
838 { MAP(tst_04), .bgName = "nok_bg" },
839 { MAP(tst_10), .bgName = "nok_bg" },
840 { MAP(tst_11), .bgName = "nok_bg" },
841 { MAP(tst_12), .bgName = "nok_bg" },
842 { MAP(tst_13), .bgName = "nok_bg" },
843 { MAP(tst_20), .bgName = "nok_bg" },
844};
845
847#include "area_end/end.h"
849 { MAP_WITH_INIT(end_00) },
850 { MAP_WITH_INIT(end_01) },
851};
852
854#include "area_mgm/mgm.h"
856 { MAP(mgm_00) },
857 { MAP(mgm_01) },
858 { MAP(mgm_02) },
859 { MAP(mgm_03) },
860};
861
863#include "area_gv/gv.h"
865 { MAP(gv_01) },
866};
867
869 AREA(kmr, "クリむら"), // kuri mura [kuribou village, Goomba Village]
870 AREA(mac, "まち"), // machi [town, Toad Town]
871 AREA(tik, "まちのちか"), // machi no chika [under the town, Toad Town Tunnels]
872 AREA(kgr, "くじらのなか"), // kujira no naka [inside the whale]
873 AREA(kkj, "きのこ城"), // kinoko shiro [mushroom castle, Princess Peach's Castle]
874 AREA(hos, "星ふる丘"), // hoshi furu oka [star fall hill, Shooting Star Summit]
875 AREA(nok, "ノコノコむら"), // nokonoko mura [nokonoko village, Koopa Village]
876 AREA(trd, "とりで"), // toride [fortress, Koopa Bros. Fortress]
877 AREA(iwa, "岩山"), // iwayama [rock mountain, Mt. Rugged]
878 AREA(dro, "カラカラタウン"), // karakara taun [dried up town, Dry Dry Outpost]
879 AREA(sbk, "カラカラ砂漠"), // karakara sabaku [dried up desert, Dry Dry Desert]
880 AREA(isk, "カラカラいせき"), // karakara iseki [dried up ruins, Dry Dry Ruins]
881 AREA(mim, "迷いの森"), // mayoi no mori [lost forest, Forever Forest]
882 AREA(obk, "テレサハウス"), // teresa hausu [teresa house, Boo's Mansion]
883 AREA(arn, "あれの"), // areno [wasteland, Gusty Gulch]
884 AREA(dgb, "ドガボンの城"), // dogabon no shiro [dogabon's castle, Tubba Blubba's Castle]
885 AREA(omo, "ヘイホーのおもちゃばこ"), // heiho no omochabako [heiho's toy box, Shy Guy's Toy Box]
886 AREA(jan, "ジャングル"), // janguru [jungle, Jade Jungle]
887 AREA(kzn, "火山"), // kazan [volcano, Mt. Lavalava]
888 AREA(flo, "フラワーランド"), // furawaa rando [flower land, Flower Fields]
889 AREA(sam, "さむいさむい村"), // samui samui mura [cold cold village, Shiver City]
890 AREA(pra, "パラレルきゅうでん"), // parareru kyuuden [parallel palace, Crystal Palace]
891 AREA(kpa, "クッパ城"), // kuppa shiro [koopa's castle, Bowser's Castle]
892 AREA(osr, "きのこ城そと"), // kinoko shiro soto [outside mushroom castle, Outside Peach's Castle]
893 AREA(end, "エンディング"), // endingu [Ending]
894 AREA(mgm, "ミニゲーム"), // minige-mu [Minigames]
895 AREA(gv, "ゲームオーバー"), // ge-mu o-ba- [Game Over]
896 AREA(tst, "テストマップ"), // tesuto mappu [Test map]
897 {},
898};
struct Shop * mapShop
#define general_heap_malloc
@ CAMERA_FLAG_DISABLED
Definition enums.h:4721
@ LOAD_FROM_MAP
Definition enums.h:3560
@ LOAD_FROM_FILE_SELECT
Definition enums.h:3561
@ INTRO_PART_NONE
Definition enums.h:3556
@ PLAYER_SPRITES_MARIO_WORLD
Definition enums.h:6346
@ CAM_TATTLE
Definition enums.h:1802
@ CAM_DEFAULT
Definition enums.h:1800
@ CAM_HUD
Definition enums.h:1803
@ CAM_BATTLE
Definition enums.h:1801
@ EVT_PRIORITY_0
Definition evt.h:151
@ EVT_GROUP_NEVER_PAUSE
Definition evt.h:142
void clear_script_list(void)
void clear_item_entity_data(void)
void create_cameras(void)
Definition cam_main.c:255
void clear_animator_list(void)
Definition animator.c:222
void partner_reset_data(void)
Definition partners.c:1000
void clear_render_tasks(void)
Definition model.c:4536
void clear_model_data(void)
Definition model.c:2364
void clear_trigger_data(void)
Definition trigger.c:13
void set_background(BackgroundHeader *)
Definition background.c:40
void clear_sprite_shading_data(void)
void clear_entity_data(b32)
Definition entity.c:787
void load_data_for_models(struct ModelNode *model, s32 romOffset, s32 size)
Definition model.c:3319
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:444
void load_map_bg(char *optAssetName)
Definition background.c:14
void phys_set_player_sliding_check(b32(*funcPtr)(void))
Definition 7BB60.c:846
void clear_printers(void)
Definition msg.c:196
void initialize_collision(void)
Definition collision.c:111
void load_obfuscation_shims(void)
void player_reset_data(void)
Definition 77480.c:811
void reset_battle_status(void)
Definition battle.c:99
void clear_player_status(void)
Definition 77480.c:807
void clear_effect_data(void)
Definition effects.c:37
s32 heap_free(void *ptr)
Definition heap.c:42
void clear_worker_list(void)
Definition worker.c:10
void set_background_size(s16, s16, s16, s16)
Definition background.c:50
void shim_general_heap_create_obfuscated(void)
s32 general_heap_free(void *data)
Definition heap.c:18
void decode_yay0(void *src, void *dst)
void clear_area_flags(void)
Definition vars_access.c:26
void func_80138188(void)
Evt * start_script_in_group(EvtScript *source, u8 priority, u8 initialState, u8 groupFlags)
void clear_entity_models(void)
void reset_background_settings(void)
Definition background.c:33
void initialize_status_bar(void)
Definition inventory.c:477
void * heap_malloc(s32 size)
Definition heap.c:34
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height)
Definition cam_main.c:373
void phys_set_landing_adjust_cam_check(s32(*funcPtr)(void))
Definition 7E9D0.c:42
void hud_element_clear_cache(void)
ModelNode * root
Definition model.h:174
char ** modelNames
Definition model.h:176
ShapeFileHeader header
Definition model.h:183
char ** colliderNames
Definition model.h:177
char ** zoneNames
Definition model.h:178
void clear_npcs(void)
Definition npc.c:60
void clear_encounter_status(void)
Definition npc.c:2224
void sfx_clear_env_sounds(s16 playSounds)
Definition sfx.c:313
void sfx_stop_env_sounds(void)
Definition sfx.c:361
void sfx_set_reverb_mode(s32 arg0)
Definition sfx.c:352
void sfx_reset_door_sounds(void)
Definition sfx.c:299
void reset_max_rumble_duration(void)
Definition rumble.c:45
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:525
#define BSS
Definition macros.h:7
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define ASSERT_MSG(condition, msg, args...)
Definition macros.h:66
#define NODISCARD
Definition macros.h:530
char * id
Definition map.h:50
s8 sfxReverb
Definition map.h:59
char ** modelNameList
Definition map.h:35
s32 mapCount
Definition map.h:63
char ** colliderNameList
Definition map.h:36
s8 songVariation
0 or 1.
Definition map.h:58
MapInit init
Return TRUE to skip normal asset (shape/hit/bg/tex) loading.
Definition map.h:56
EvtScript * main
Definition map.h:31
char ** zoneNameList
Definition map.h:37
MapSettings * settings
Definition map.h:51
char * bgName
Definition map.h:55
char unk_1C[0x2]
Definition map.h:57
MapConfig * maps
Definition map.h:64
void * dmaEnd
Definition map.h:53
void * dmaDest
Definition map.h:54
BackgroundHeader * background
Definition map.h:39
void * dmaStart
Definition map.h:52
struct ModelNode * modelTreeRoot
Definition map.h:27
Fields other than main, entryList, entryCount, background, and tattle are initialised when the map lo...
Definition map.h:26
void spr_init_sprites(s32 playerSpriteSet)
Definition sprite.c:764
void surface_set_walk_effect(s32 effect)
Select the type of surface effect spawned by the player while moving The effect is reset between maps...
Definition surfaces.c:18
@ SURFACE_WALK_FX_STANDARD
Definition surfaces.h:7
s32 gOverrideFlags
Definition main_loop.c:11
GameStatus gGameStatus
Definition main_loop.c:21
GameStatus * gGameStatusPtr
Definition main_loop.c:32
Camera gCameras[4]
Definition cam_main.c:17
PlayerStatus gPlayerStatus
Definition 77480.c:39
s32 gCurrentCameraID
Definition cam_math.c:4
MapConfig kpa_maps[]
Bowser's Castle.
Definition world.c:517
void load_map_hit_asset(void)
Definition collision.c:117
char name[16]
Definition world.c:34
u32 decompressedLength
Definition world.c:37
MapConfig kmr_maps[]
Goomba Region.
Definition world.c:355
void fio_deserialize_state(void)
Load game data from gCurrentSaveFile Performs version checking and supports potential migration betwe...
Definition versioning.c:36
void get_map_IDs_by_name_checked(const char *mapName, s16 *areaID, s16 *mapID)
Same as get_map_IDs_by_name, but will panic if the map doesn't exist.
Definition world.c:247
#define MAP(map)
Definition world.c:295
BSS MapConfig * gMapConfig
Definition world.c:23
MapConfig end_maps[]
Credits.
Definition world.c:848
void * load_asset_by_name(const char *assetName, u32 *decompressedSize)
Definition world.c:251
MapConfig dgb_maps[]
Tubba Blubba's Castle.
Definition world.c:687
MapConfig mgm_maps[]
Toad Town Playroom.
Definition world.c:855
MapConfig jan_maps[]
Jade Jungle.
Definition world.c:613
MapConfig mac_maps[]
Toad Town.
Definition world.c:308
#define AREA(area, jp_name)
Definition world.c:293
AreaConfig gAreas[]
Zero-terminated.
Definition world.c:868
MapSettings * get_current_map_settings(void)
Definition world.c:224
#define MAP_WITH_INIT(map)
Definition world.c:302
MapConfig * get_current_map_config(void)
Definition world.c:220
MapConfig trd_maps[]
Koopa Bros. Fortress.
Definition world.c:473
MapConfig tst_maps[]
Debug.
Definition world.c:834
MapConfig pra_maps[]
Crystal Palace.
Definition world.c:775
MapConfig sam_maps[]
Shiver Region.
Definition world.c:758
MapConfig isk_maps[]
Dry Dry Ruins.
Definition world.c:451
ShapeFile gMapShapeData
Definition heaps.c:16
s32 WorldReverbModeMapping[]
Definition world.c:31
void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType)
Definition world.c:53
MapConfig arn_maps[]
Gusty Gulch.
Definition world.c:671
MapConfig nok_maps[]
Koopa Region.
Definition world.c:489
void load_map_script_lib(void)
Definition world.c:49
MapConfig obk_maps[]
Boo's Mansion.
Definition world.c:657
MapConfig osr_maps[]
Peach's Castle Grounds.
Definition world.c:572
MapConfig hos_maps[]
Star Region.
Definition world.c:503
MapConfig flo_maps[]
Flower Fields.
Definition world.c:733
char wMapHitName[0x18]
Definition world.c:26
MapConfig tik_maps[]
Toad Town Tunnels.
Definition world.c:321
u32 offset
Definition world.c:35
MapConfig kgr_maps[]
Inside the Whale.
Definition world.c:348
MapConfig mim_maps[]
Forever Forest.
Definition world.c:640
MapConfig sbk_maps[]
Dry Dry Desert.
Definition world.c:396
MapConfig kkj_maps[]
Peach's Castle.
Definition world.c:583
BSS MapSettings gMapSettings
Definition world.c:24
MapConfig omo_maps[]
Shy Guy's Toy Box.
Definition world.c:812
NODISCARD s32 get_map_IDs_by_name(const char *mapName, s16 *areaID, s16 *mapID)
Definition world.c:228
#define ASSET_TABLE_FIRST_ENTRY
Definition world.c:21
char wMapTexName[0x18]
Definition world.c:28
MapConfig gv_maps[]
Game Over.
Definition world.c:864
MapConfig kzn_maps[]
Mt. Lavalava.
Definition world.c:711
s32 get_asset_offset(char *assetName, s32 *compressedSize)
Definition world.c:273
char wMapBgName[0x14]
Definition world.c:29
char wMapShapeName[0x18]
Definition world.c:27
MapConfig iwa_maps[]
Mt. Rugged.
Definition world.c:377
MapConfig dro_maps[]
Dry Dry Outpost.
Definition world.c:389
u32 compressedLength
Definition world.c:36