Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
debug_menu.h
Go to the documentation of this file.
1#ifndef _DX_DEBUG_MENU_H
2#define _DX_DEBUG_MENU_H
3
4#include "common.h"
5#include "dx/config.h"
6#if DX_DEBUG_MENU || defined(DX_QUICK_LAUNCH_BATTLE)
7
8#ifdef _LANGUAGE_C_PLUS_PLUS
9extern "C" {
10#endif
11
12#define DX_DEBUG_DUMMY_ID 0xDEAD
13
14typedef enum DebugCheat {
21
25
29
30void dx_debug_set_map_info(char* mapName, s32 entryID);
31void dx_debug_set_battle_info(s32 battleID, char* stageName);
32
34
37
38enum DebugEvtStep {
42};
43
44void dx_hashed_debug_printf(const char* filename, s32 line, const char* fmt, ...);
45
46#define debug_print(text) dx_hashed_debug_printf(__FILE__,__LINE__,text)
47#define debug_printf(fmt, args...) dx_hashed_debug_printf(__FILE__,__LINE__,fmt,##args)
48
49#define DebugPrint(text) Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), 0)
50#define DebugPrintf(args...) VFUNC(DebugPrintf, args)
51#define DebugFloatPrintf(args...) VFUNC(DebugFloatPrintf, args)
52
53API_CALLABLE(_dxDebugIntPrintf);
54#define DebugPrintf1(text) \
55 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), 0, 0, 0, 0, 0, 0, 0)
56#define DebugPrintf2(text, a) \
57 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, 0, 0, 0, 0, 0, 0)
58#define DebugPrintf3(text, a, b) \
59 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, 0, 0, 0, 0, 0)
60#define DebugPrintf4(text, a, b, c) \
61 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, 0, 0, 0, 0)
62#define DebugPrintf5(text, a, b, c, d) \
63 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, 0, 0, 0)
64#define DebugPrintf6(text, a, b, c, d, e) \
65 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, 0, 0)
66#define DebugPrintf7(text, a, b, c, d, e, f) \
67 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, f, 0)
68#define DebugPrintf8(text, a, b, c, d, e, f, g) \
69 Call(_dxDebugIntPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, f, g)
70
71API_CALLABLE(_dxDebugFloatPrintf);
72#define DebugFloatPrintf1(text) \
73 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), 0, 0, 0, 0, 0, 0, 0)
74#define DebugFloatPrintf2(text, a) \
75 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, 0, 0, 0, 0, 0, 0)
76#define DebugFloatPrintf3(text, a, b) \
77 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, 0, 0, 0, 0, 0)
78#define DebugFloatPrintf4(text, a, b, c) \
79 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, 0, 0, 0, 0)
80#define DebugFloatPrintf5(text, a, b, c, d) \
81 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, 0, 0, 0)
82#define DebugFloatPrintf6(text, a, b, c, d, e) \
83 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, 0, 0)
84#define DebugFloatPrintf7(text, a, b, c, d, e, f) \
85 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, f, 0)
86#define DebugFloatPrintf8(text, a, b, c, d, e, f, g) \
87 Call(_dxDebugFloatPrintf, Ref(__FILE__), __LINE__, Ref(text), a, b, c, d, e, f, g)
88
89#ifdef _LANGUAGE_C_PLUS_PLUS
90} // extern "C"
91#endif
92
93#else
94
95#define debug_print(text)
96#define debug_printf(fmt, args...)
97
98#endif
99#endif // _DX_DEBUG_MENU_H
BSS s32 PopupMenu_SelectedIndex
s32 b32