Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
map.h
Go to the documentation of this file.
1#ifndef _MAP_H_
2#define _MAP_H_
3
4#include "common_structs.h"
5#include "enums.h"
6#include "world/entrances.h"
7#include "script_api/map.h"
8#include "npc.h"
9
10#define CLONED_MODEL(idx) (10000+(idx))
11
12// TODO: consider moving Npc here
13
14#define ENTRY_COUNT(entryList) (sizeof(entryList) / sizeof(Vec4f))
15typedef Vec4f EntryList[];
16
18typedef struct MapSettings {
19 /* 0x00 */ struct ModelNode* modelTreeRoot;
20 /* 0x04 */ s32 hitAssetCollisionOffset;
21 /* 0x08 */ s32 hitAssetZoneOffset;
22 /* 0x0C */ char unk_0C[4];
23 /* 0x10 */ EvtScript* main;
24 /* 0x14 */ EntryList* entryList;
25 /* 0x18 */ s32 entryCount;
26 /* 0x1C */ char unk_1C[12];
27 /* 0x28 */ char** modelNameList;
28 /* 0x2C */ char** colliderNameList;
29 /* 0x30 */ char** zoneNameList;
30 /* 0x34 */ char unk_34[4];
31 /* 0x38 */ BackgroundHeader* background;
32 /* 0x3C */ union {
33 s32 msgID;
34 s32 (*get)(void);
35 } tattle;
36} MapSettings; // size = 0x40
37
38typedef s32(*MapInit)(void);
39
40#define MAP_ID_MAX_LEN 7
41typedef struct MapConfig {
42 /* 0x00 */ char* id;
43 /* 0x04 */ MapSettings* settings;
44 /* 0x08 */ void* dmaStart;
45 /* 0x0C */ void* dmaEnd;
46 /* 0x10 */ void* dmaDest;
47 /* 0x14 */ char* bgName;
48 /* 0x18 */ MapInit init;
49 /* 0x1C */ char unk_1C[0x2];
50 /* 0x1E */ s8 songVariation;
51 /* 0x1F */ s8 sfxReverb;
52} MapConfig; // size = 0x20
53
54typedef struct AreaConfig {
55 /* 0x00 */ s32 mapCount;
56 /* 0x04 */ MapConfig* maps;
57 /* 0x08 */ char* id;
58 /* 0x0C */ char* name;
59} AreaConfig; // size = 0x10
60
62
63extern char wMapTexName[];
64extern char wMapHitName[];
65extern char wMapShapeName[];
66extern char wMapBgName[];
67
69extern AreaConfig gAreas[29];
70
73
74#endif
Bytecode EvtScript[]
char * id
Definition map.h:42
Vec4f EntryList[]
Definition map.h:15
s8 sfxReverb
Definition map.h:51
s32 entryCount
Definition map.h:25
char ** modelNameList
Definition map.h:27
union MapSettings::@48 tattle
char * id
"area_xxx"
Definition map.h:57
MapSettings * get_current_map_settings(void)
Definition world.c:224
s32 mapCount
Definition map.h:55
char ** colliderNameList
Definition map.h:28
s8 songVariation
0 or 1.
Definition map.h:50
char wMapShapeName[]
Definition world.c:27
MapInit init
Return TRUE to skip normal asset (shape/hit/bg/tex) loading.
Definition map.h:48
EvtScript * main
Definition map.h:23
char unk_34[4]
Definition map.h:30
char wMapHitName[]
Definition world.c:26
AreaConfig gAreas[29]
Zero-terminated.
Definition world.c:868
char ** zoneNameList
Definition map.h:29
EvtScript EVS_800936C0
Definition 38F00.c:7
MapSettings * settings
Definition map.h:43
s32 hitAssetZoneOffset
Definition map.h:21
char * bgName
Definition map.h:47
char unk_1C[0x2]
Definition map.h:49
s32(* MapInit)(void)
Definition map.h:38
char * name
JP debug name.
Definition map.h:58
char unk_1C[12]
Definition map.h:26
MapConfig * maps
Definition map.h:56
char wMapTexName[]
Definition world.c:28
s32 hitAssetCollisionOffset
Definition map.h:20
EntryList * entryList
Definition map.h:24
char unk_0C[4]
Definition map.h:22
void * dmaEnd
Definition map.h:45
EvtScript EVS_NpcHitRecoil
Definition 38F00.c:13
void * dmaDest
Definition map.h:46
BackgroundHeader * background
Definition map.h:31
char wMapBgName[]
Definition world.c:29
void * dmaStart
Definition map.h:44
struct ModelNode * modelTreeRoot
Definition map.h:19
Fields other than main, entryList, entryCount, background, and tattle are initialised when the map lo...
Definition map.h:18