Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
include_asset.h File Reference

Go to the source code of this file.

Macros

#define ASTRINGIFY_(x)   #x
 
#define ASTRINGIFY(x)   ASTRINGIFY_(x)
 
#define PUSHSECTION(SECTION)   SECTION "\n"
 
#define POPSECTION
 
#define _INCLUDE_IMG(FILENAME, SYMBOLNAME)
 
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)    _INCLUDE_IMG(FILENAME, SYMBOLNAME)
 
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
 
#define INCLUDE_RAW(FILENAME, SYMBOLNAME)
 

Macro Definition Documentation

◆ ASTRINGIFY_

#define ASTRINGIFY_ ( x)    #x

Definition at line 3 of file include_asset.h.

◆ ASTRINGIFY

#define ASTRINGIFY ( x)    ASTRINGIFY_(x)

Definition at line 4 of file include_asset.h.

◆ PUSHSECTION

#define PUSHSECTION ( SECTION)    SECTION "\n"

Definition at line 10 of file include_asset.h.

◆ POPSECTION

#define POPSECTION

Definition at line 11 of file include_asset.h.

◆ _INCLUDE_IMG

#define _INCLUDE_IMG ( FILENAME,
SYMBOLNAME )
Value:
extern unsigned char SYMBOLNAME[]; \
__asm__( \
".globl " #SYMBOLNAME"\n" \
PUSHSECTION(".data") \
".align 3\n" \
".type " #SYMBOLNAME", @object\n" \
#SYMBOLNAME":\n" \
".incbin \"ver/"ASTRINGIFY(VERSION)"/build/" FILENAME ".bin\"\n" \
)
#define PUSHSECTION(SECTION)
#define POPSECTION
#define ASTRINGIFY(x)

Definition at line 14 of file include_asset.h.

14#define _INCLUDE_IMG(FILENAME, SYMBOLNAME) \
15 extern unsigned char SYMBOLNAME[]; \
16 __asm__( \
17 ".globl " #SYMBOLNAME"\n" \
18 PUSHSECTION(".data") \
19 ".align 3\n" \
20 ".type " #SYMBOLNAME", @object\n" \
21 #SYMBOLNAME":\n" \
22 ".incbin \"ver/"ASTRINGIFY(VERSION)"/build/" FILENAME ".bin\"\n" \
23 POPSECTION \
24 )

◆ INCLUDE_IMG

#define INCLUDE_IMG ( FILENAME,
SYMBOLNAME )    _INCLUDE_IMG(FILENAME, SYMBOLNAME)

Definition at line 27 of file include_asset.h.

27#define INCLUDE_IMG(FILENAME, SYMBOLNAME) \
28 _INCLUDE_IMG(FILENAME, SYMBOLNAME)

◆ INCLUDE_PAL

#define INCLUDE_PAL ( FILENAME,
SYMBOLNAME )
Value:
extern unsigned short SYMBOLNAME[]; \
__asm__( \
".globl " #SYMBOLNAME"\n" \
PUSHSECTION(".data") \
".align 3\n" \
".type " #SYMBOLNAME", @object\n" \
#SYMBOLNAME":\n" \
".incbin \"ver/"ASTRINGIFY(VERSION)"/build/" FILENAME ".bin\"\n" \
)

Definition at line 30 of file include_asset.h.

30#define INCLUDE_PAL(FILENAME, SYMBOLNAME) \
31 extern unsigned short SYMBOLNAME[]; \
32 __asm__( \
33 ".globl " #SYMBOLNAME"\n" \
34 PUSHSECTION(".data") \
35 ".align 3\n" \
36 ".type " #SYMBOLNAME", @object\n" \
37 #SYMBOLNAME":\n" \
38 ".incbin \"ver/"ASTRINGIFY(VERSION)"/build/" FILENAME ".bin\"\n" \
39 POPSECTION \
40 )

◆ INCLUDE_RAW

#define INCLUDE_RAW ( FILENAME,
SYMBOLNAME )
Value:
extern unsigned char SYMBOLNAME[]; \
__asm__( \
".globl " #SYMBOLNAME"\n" \
PUSHSECTION(".data") \
".align 3\n" \
".type " #SYMBOLNAME", @object\n" \
#SYMBOLNAME":\n" \
".incbin \"ver/"ASTRINGIFY(VERSION)"/build/assets/"ASTRINGIFY(VERSION)"/" FILENAME "\"\n" \
)

Definition at line 42 of file include_asset.h.

42#define INCLUDE_RAW(FILENAME, SYMBOLNAME) \
43 extern unsigned char SYMBOLNAME[]; \
44 __asm__( \
45 ".globl " #SYMBOLNAME"\n" \
46 PUSHSECTION(".data") \
47 ".align 3\n" \
48 ".type " #SYMBOLNAME", @object\n" \
49 #SYMBOLNAME":\n" \
50 ".incbin \"ver/"ASTRINGIFY(VERSION)"/build/assets/"ASTRINGIFY(VERSION)"/" FILENAME "\"\n" \
51 POPSECTION \
52 )