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
// temporary: some standard script names
11
#define EVS_MakeEntities EVS_MakeEntities
12
#define EVS_SetupMusic EVS_SetupMusic
13
#define EVS_SetupRooms EVS_SetupRooms
14
#define EVS_SetupFoliage EVS_SetupFoliage
15
#define EVS_BindExitTriggers EVS_BindExitTriggers
16
#define EVS_EnterMap EVS_EnterMap
17
18
#define CLONED_MODEL(idx) (10000+(idx))
19
20
// TODO: consider moving Npc here
21
22
#define ENTRY_COUNT(entryList) (sizeof(entryList) / sizeof(Vec4f))
23
typedef
Vec4f
EntryList
[];
24
26
typedef
struct
MapSettings
{
27
/* 0x00 */
struct
ModelNode
*
modelTreeRoot
;
28
/* 0x04 */
s32
hitAssetCollisionOffset
;
29
/* 0x08 */
s32
hitAssetZoneOffset
;
30
/* 0x0C */
char
unk_0C
[4];
31
/* 0x10 */
EvtScript
*
main
;
32
/* 0x14 */
EntryList
*
entryList
;
33
/* 0x18 */
s32
entryCount
;
34
/* 0x1C */
char
unk_1C
[12];
35
/* 0x28 */
char
**
modelNameList
;
36
/* 0x2C */
char
**
colliderNameList
;
37
/* 0x30 */
char
**
zoneNameList
;
38
/* 0x34 */
char
unk_34
[4];
39
/* 0x38 */
BackgroundHeader
*
background
;
40
/* 0x3C */
union
{
41
s32 msgID;
42
s32 (*get)(void);
43
}
tattle
;
44
}
MapSettings
;
// size = 0x40
45
46
typedef
s32(*
MapInit
)(void);
47
48
#define MAP_ID_MAX_LEN 7
49
typedef
struct
MapConfig
{
50
/* 0x00 */
char
*
id
;
51
/* 0x04 */
MapSettings
*
settings
;
52
/* 0x08 */
void
*
dmaStart
;
53
/* 0x0C */
void
*
dmaEnd
;
54
/* 0x10 */
void
*
dmaDest
;
55
/* 0x14 */
char
*
bgName
;
56
/* 0x18 */
MapInit
init
;
57
/* 0x1C */
char
unk_1C
[0x2];
58
/* 0x1E */
s8
songVariation
;
59
/* 0x1F */
s8
sfxReverb
;
60
}
MapConfig
;
// size = 0x20
61
62
typedef
struct
AreaConfig
{
63
/* 0x00 */
s32
mapCount
;
64
/* 0x04 */
MapConfig
*
maps
;
65
/* 0x08 */
char
*
id
;
66
/* 0x0C */
char
*
name
;
67
}
AreaConfig
;
// size = 0x10
68
69
MapSettings
*
get_current_map_settings
(
void
);
70
71
extern
char
wMapTexName
[];
72
extern
char
wMapHitName
[];
73
extern
char
wMapShapeName
[];
74
extern
char
wMapBgName
[];
75
77
extern
AreaConfig
gAreas
[29];
78
79
extern
EvtScript
EVS_NpcHitRecoil
;
80
extern
EvtScript
EVS_800936C0
;
81
82
#endif
common_structs.h
EvtScript
Bytecode EvtScript[]
Definition
common_structs.h:14
BackgroundHeader
Definition
common_structs.h:1958
Vec4f
Definition
common_structs.h:105
entrances.h
enums.h
ModelNode
Definition
model.h:51
npc.h
map.h
MapConfig::id
char * id
Definition
map.h:50
EntryList
Vec4f EntryList[]
Definition
map.h:23
MapConfig::sfxReverb
s8 sfxReverb
Definition
map.h:59
MapSettings::entryCount
s32 entryCount
Definition
map.h:33
MapSettings::modelNameList
char ** modelNameList
Definition
map.h:35
MapSettings::tattle
union MapSettings::@48 tattle
AreaConfig::id
char * id
"area_xxx"
Definition
map.h:65
get_current_map_settings
MapSettings * get_current_map_settings(void)
Definition
world.c:224
AreaConfig::mapCount
s32 mapCount
Definition
map.h:63
MapSettings::colliderNameList
char ** colliderNameList
Definition
map.h:36
MapConfig::songVariation
s8 songVariation
0 or 1.
Definition
map.h:58
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:56
MapSettings::main
EvtScript * main
Definition
map.h:31
MapSettings::unk_34
char unk_34[4]
Definition
map.h:38
wMapHitName
char wMapHitName[]
Definition
world.c:26
gAreas
AreaConfig gAreas[29]
Zero-terminated.
Definition
world.c:868
MapSettings::zoneNameList
char ** zoneNameList
Definition
map.h:37
EVS_800936C0
EvtScript EVS_800936C0
Definition
38F00.c:7
MapConfig::settings
MapSettings * settings
Definition
map.h:51
MapSettings::hitAssetZoneOffset
s32 hitAssetZoneOffset
Definition
map.h:29
MapConfig::bgName
char * bgName
Definition
map.h:55
MapConfig::unk_1C
char unk_1C[0x2]
Definition
map.h:57
MapInit
s32(* MapInit)(void)
Definition
map.h:46
AreaConfig::name
char * name
JP debug name.
Definition
map.h:66
MapSettings::unk_1C
char unk_1C[12]
Definition
map.h:34
AreaConfig::maps
MapConfig * maps
Definition
map.h:64
wMapTexName
char wMapTexName[]
Definition
world.c:28
MapSettings::hitAssetCollisionOffset
s32 hitAssetCollisionOffset
Definition
map.h:28
MapSettings::entryList
EntryList * entryList
Definition
map.h:32
MapSettings::unk_0C
char unk_0C[4]
Definition
map.h:30
MapConfig::dmaEnd
void * dmaEnd
Definition
map.h:53
EVS_NpcHitRecoil
EvtScript EVS_NpcHitRecoil
Definition
38F00.c:13
MapConfig::dmaDest
void * dmaDest
Definition
map.h:54
MapSettings::background
BackgroundHeader * background
Definition
map.h:39
wMapBgName
char wMapBgName[]
Definition
world.c:29
MapConfig::dmaStart
void * dmaStart
Definition
map.h:52
MapSettings::modelTreeRoot
struct ModelNode * modelTreeRoot
Definition
map.h:27
AreaConfig
Definition
map.h:62
MapConfig
Definition
map.h:49
MapSettings
Fields other than main, entryList, entryCount, background, and tattle are initialised when the map lo...
Definition
map.h:26
include
map.h
Generated by
1.10.0