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))
15
typedef
Vec4f
EntryList
[];
16
18
typedef
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
38
typedef
s32(*
MapInit
)(void);
39
40
#define MAP_ID_MAX_LEN 7
41
typedef
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
54
typedef
struct
AreaConfig
{
55
/* 0x00 */
s32
mapCount
;
56
/* 0x04 */
MapConfig
*
maps
;
57
/* 0x08 */
char
*
id
;
58
/* 0x0C */
char
*
name
;
59
}
AreaConfig
;
// size = 0x10
60
61
MapSettings
*
get_current_map_settings
(
void
);
62
63
extern
char
wMapTexName
[];
64
extern
char
wMapHitName
[];
65
extern
char
wMapShapeName
[];
66
extern
char
wMapBgName
[];
67
69
extern
AreaConfig
gAreas
[29];
70
71
extern
EvtScript
EVS_NpcHitRecoil
;
72
extern
EvtScript
EVS_800936C0
;
73
74
#endif
common_structs.h
EvtScript
Bytecode EvtScript[]
Definition
common_structs.h:14
BackgroundHeader
Definition
common_structs.h:1959
Vec4f
Definition
common_structs.h:106
entrances.h
enums.h
ModelNode
Definition
model.h:51
npc.h
map.h
MapConfig::id
char * id
Definition
map.h:42
EntryList
Vec4f EntryList[]
Definition
map.h:15
MapConfig::sfxReverb
s8 sfxReverb
Definition
map.h:51
MapSettings::entryCount
s32 entryCount
Definition
map.h:25
MapSettings::modelNameList
char ** modelNameList
Definition
map.h:27
MapSettings::tattle
union MapSettings::@48 tattle
AreaConfig::id
char * id
"area_xxx"
Definition
map.h:57
get_current_map_settings
MapSettings * get_current_map_settings(void)
Definition
world.c:224
AreaConfig::mapCount
s32 mapCount
Definition
map.h:55
MapSettings::colliderNameList
char ** colliderNameList
Definition
map.h:28
MapConfig::songVariation
s8 songVariation
0 or 1.
Definition
map.h:50
wMapShapeName
char wMapShapeName[]
Definition
world.c:27
MapConfig::init
MapInit init
Return TRUE to skip normal asset (shape/hit/bg/tex) loading.
Definition
map.h:48
MapSettings::main
EvtScript * main
Definition
map.h:23
MapSettings::unk_34
char unk_34[4]
Definition
map.h:30
wMapHitName
char wMapHitName[]
Definition
world.c:26
gAreas
AreaConfig gAreas[29]
Zero-terminated.
Definition
world.c:868
MapSettings::zoneNameList
char ** zoneNameList
Definition
map.h:29
EVS_800936C0
EvtScript EVS_800936C0
Definition
38F00.c:7
MapConfig::settings
MapSettings * settings
Definition
map.h:43
MapSettings::hitAssetZoneOffset
s32 hitAssetZoneOffset
Definition
map.h:21
MapConfig::bgName
char * bgName
Definition
map.h:47
MapConfig::unk_1C
char unk_1C[0x2]
Definition
map.h:49
MapInit
s32(* MapInit)(void)
Definition
map.h:38
AreaConfig::name
char * name
JP debug name.
Definition
map.h:58
MapSettings::unk_1C
char unk_1C[12]
Definition
map.h:26
AreaConfig::maps
MapConfig * maps
Definition
map.h:56
wMapTexName
char wMapTexName[]
Definition
world.c:28
MapSettings::hitAssetCollisionOffset
s32 hitAssetCollisionOffset
Definition
map.h:20
MapSettings::entryList
EntryList * entryList
Definition
map.h:24
MapSettings::unk_0C
char unk_0C[4]
Definition
map.h:22
MapConfig::dmaEnd
void * dmaEnd
Definition
map.h:45
EVS_NpcHitRecoil
EvtScript EVS_NpcHitRecoil
Definition
38F00.c:13
MapConfig::dmaDest
void * dmaDest
Definition
map.h:46
MapSettings::background
BackgroundHeader * background
Definition
map.h:31
wMapBgName
char wMapBgName[]
Definition
world.c:29
MapConfig::dmaStart
void * dmaStart
Definition
map.h:44
MapSettings::modelTreeRoot
struct ModelNode * modelTreeRoot
Definition
map.h:19
AreaConfig
Definition
map.h:54
MapConfig
Definition
map.h:41
MapSettings
Fields other than main, entryList, entryCount, background, and tattle are initialised when the map lo...
Definition
map.h:18
include
map.h
Generated by
1.10.0