Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Quizmo.inc.c File Reference

Go to the source code of this file.

Macros

#define QUIZMO_ANIMS
 

Enumerations

enum  {
  QUIZ_ARRAY_SAVED_FOV = ArrayVar(0) , QUIZ_ARRAY_ORIGIN_X = ArrayVar(1) , QUIZ_ARRAY_ORIGIN_Y = ArrayVar(2) , QUIZ_ARRAY_ORIGIN_Z = ArrayVar(3) ,
  QUIZ_ARRAY_ANSWER_RESULT = ArrayVar(4)
}
 
enum  {
  QUIZ_ARRAY_INDEX_SAVED_FOV = 0 , QUIZ_ARRAY_INDEX_ORIGIN_X = 1 , QUIZ_ARRAY_INDEX_ORIGIN_Y = 2 , QUIZ_ARRAY_INDEX_ORIGIN_Z = 3 ,
  QUIZ_ARRAY_INDEX_ANSWER_RESULT = 4
}
 
enum  {
  QUIZ_AREA_KMR = 0 , QUIZ_AREA_MAC = 1 , QUIZ_AREA_NOK = 2 , QUIZ_AREA_DRO = 3 ,
  QUIZ_AREA_JAN = 4 , QUIZ_AREA_SAM = 5 , QUIZ_AREA_HOS = 6
}
 
enum  {
  QUIZ_MAP_KMR_02 = 0 , QUIZ_COUNT_KMR = 1 , QUIZ_MAP_MAC_00 = 0 , QUIZ_MAP_MAC_01 = 1 ,
  QUIZ_MAP_MAC_02 = 2 , QUIZ_MAP_MAC_03 = 3 , QUIZ_MAP_MAC_04 = 4 , QUIZ_MAP_MAC_05 = 5 ,
  QUIZ_COUNT_MAC = 6 , QUIZ_MAP_NOK_01 = 0 , QUIZ_MAP_NOK_02 = 1 , QUIZ_COUNT_NOK = 2 ,
  QUIZ_MAP_DRO_01 = 0 , QUIZ_MAP_DRO_02 = 1 , QUIZ_COUNT_DRO = 2 , QUIZ_MAP_JAN_02 = 0 ,
  QUIZ_MAP_JAN_03 = 1 , QUIZ_COUNT_JAN = 2 , QUIZ_MAP_SAM_01 = 0 , QUIZ_MAP_SAM_02 = 1 ,
  QUIZ_MAP_SAM_11 = 2 , QUIZ_COUNT_SAM = 3 , QUIZ_MAP_HOS_03 = 0 , QUIZ_COUNT_HOS = 1
}
 

Functions

void N Quizmo_NPC_OnRender (Npc *npc)
 
void N Quizmo_CreateReactionEffect (void)
 

Variables

s16 MessagePlural
 
s16 MessageSingular
 

Macro Definition Documentation

◆ QUIZMO_ANIMS

#define QUIZMO_ANIMS
Value:
{ \
.idle = ANIM_ChuckQuizmo_Idle, \
.walk = ANIM_ChuckQuizmo_Walk, \
.run = ANIM_ChuckQuizmo_Run, \
.chase = ANIM_ChuckQuizmo_Run, \
.anim_4 = ANIM_ChuckQuizmo_Idle, \
.anim_5 = ANIM_ChuckQuizmo_Idle, \
.death = ANIM_ChuckQuizmo_Still, \
.hit = ANIM_ChuckQuizmo_Still, \
.anim_8 = ANIM_ChuckQuizmo_Run, \
.anim_9 = ANIM_ChuckQuizmo_Run, \
.anim_A = ANIM_ChuckQuizmo_Run, \
.anim_B = ANIM_ChuckQuizmo_Run, \
.anim_C = ANIM_ChuckQuizmo_Run, \
.anim_D = ANIM_ChuckQuizmo_Run, \
.anim_E = ANIM_ChuckQuizmo_Run, \
.anim_F = ANIM_ChuckQuizmo_Run, \
}

Definition at line 12 of file Quizmo.inc.c.

12#define QUIZMO_ANIMS \
13{ \
14 .idle = ANIM_ChuckQuizmo_Idle, \
15 .walk = ANIM_ChuckQuizmo_Walk, \
16 .run = ANIM_ChuckQuizmo_Run, \
17 .chase = ANIM_ChuckQuizmo_Run, \
18 .anim_4 = ANIM_ChuckQuizmo_Idle, \
19 .anim_5 = ANIM_ChuckQuizmo_Idle, \
20 .death = ANIM_ChuckQuizmo_Still, \
21 .hit = ANIM_ChuckQuizmo_Still, \
22 .anim_8 = ANIM_ChuckQuizmo_Run, \
23 .anim_9 = ANIM_ChuckQuizmo_Run, \
24 .anim_A = ANIM_ChuckQuizmo_Run, \
25 .anim_B = ANIM_ChuckQuizmo_Run, \
26 .anim_C = ANIM_ChuckQuizmo_Run, \
27 .anim_D = ANIM_ChuckQuizmo_Run, \
28 .anim_E = ANIM_ChuckQuizmo_Run, \
29 .anim_F = ANIM_ChuckQuizmo_Run, \
30}

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
QUIZ_ARRAY_SAVED_FOV 
QUIZ_ARRAY_ORIGIN_X 
QUIZ_ARRAY_ORIGIN_Y 
QUIZ_ARRAY_ORIGIN_Z 
QUIZ_ARRAY_ANSWER_RESULT 

Definition at line 45 of file Quizmo.inc.c.

45 {
51};
@ QUIZ_ARRAY_ORIGIN_Y
Definition Quizmo.inc.c:48
@ QUIZ_ARRAY_ORIGIN_Z
Definition Quizmo.inc.c:49
@ QUIZ_ARRAY_ANSWER_RESULT
Definition Quizmo.inc.c:50
@ QUIZ_ARRAY_SAVED_FOV
Definition Quizmo.inc.c:46
@ QUIZ_ARRAY_ORIGIN_X
Definition Quizmo.inc.c:47
#define ArrayVar(INDEX)
User Word.
Definition macros.h:122

◆ anonymous enum

anonymous enum
Enumerator
QUIZ_ARRAY_INDEX_SAVED_FOV 
QUIZ_ARRAY_INDEX_ORIGIN_X 
QUIZ_ARRAY_INDEX_ORIGIN_Y 
QUIZ_ARRAY_INDEX_ORIGIN_Z 
QUIZ_ARRAY_INDEX_ANSWER_RESULT 

Definition at line 53 of file Quizmo.inc.c.

53 {
59};
@ QUIZ_ARRAY_INDEX_ORIGIN_Z
Definition Quizmo.inc.c:57
@ QUIZ_ARRAY_INDEX_ORIGIN_Y
Definition Quizmo.inc.c:56
@ QUIZ_ARRAY_INDEX_ORIGIN_X
Definition Quizmo.inc.c:55
@ QUIZ_ARRAY_INDEX_ANSWER_RESULT
Definition Quizmo.inc.c:58
@ QUIZ_ARRAY_INDEX_SAVED_FOV
Definition Quizmo.inc.c:54

◆ anonymous enum

anonymous enum
Enumerator
QUIZ_AREA_KMR 
QUIZ_AREA_MAC 
QUIZ_AREA_NOK 
QUIZ_AREA_DRO 
QUIZ_AREA_JAN 
QUIZ_AREA_SAM 
QUIZ_AREA_HOS 

Definition at line 64 of file Quizmo.inc.c.

64 {
65 QUIZ_AREA_KMR = 0,
66 QUIZ_AREA_MAC = 1,
67 QUIZ_AREA_NOK = 2,
68 QUIZ_AREA_DRO = 3,
69 QUIZ_AREA_JAN = 4,
70 QUIZ_AREA_SAM = 5,
71 QUIZ_AREA_HOS = 6,
72};
@ QUIZ_AREA_JAN
Definition Quizmo.inc.c:69
@ QUIZ_AREA_MAC
Definition Quizmo.inc.c:66
@ QUIZ_AREA_HOS
Definition Quizmo.inc.c:71
@ QUIZ_AREA_KMR
Definition Quizmo.inc.c:65
@ QUIZ_AREA_DRO
Definition Quizmo.inc.c:68
@ QUIZ_AREA_NOK
Definition Quizmo.inc.c:67
@ QUIZ_AREA_SAM
Definition Quizmo.inc.c:70

◆ anonymous enum

anonymous enum
Enumerator
QUIZ_MAP_KMR_02 
QUIZ_COUNT_KMR 
QUIZ_MAP_MAC_00 
QUIZ_MAP_MAC_01 
QUIZ_MAP_MAC_02 
QUIZ_MAP_MAC_03 
QUIZ_MAP_MAC_04 
QUIZ_MAP_MAC_05 
QUIZ_COUNT_MAC 
QUIZ_MAP_NOK_01 
QUIZ_MAP_NOK_02 
QUIZ_COUNT_NOK 
QUIZ_MAP_DRO_01 
QUIZ_MAP_DRO_02 
QUIZ_COUNT_DRO 
QUIZ_MAP_JAN_02 
QUIZ_MAP_JAN_03 
QUIZ_COUNT_JAN 
QUIZ_MAP_SAM_01 
QUIZ_MAP_SAM_02 
QUIZ_MAP_SAM_11 
QUIZ_COUNT_SAM 
QUIZ_MAP_HOS_03 
QUIZ_COUNT_HOS 

Definition at line 74 of file Quizmo.inc.c.

74 {
75 // area_kmr
78 // area_mac
81 QUIZ_MAP_MAC_02 = 2, // unused
82 QUIZ_MAP_MAC_03 = 3, // unused
86 // area_nok
90 // area_dro
94 // area_jan
98 // area_sam
100 QUIZ_MAP_SAM_02 = 1,
101 QUIZ_MAP_SAM_11 = 2,
102 QUIZ_COUNT_SAM = 3,
103 // area_hos
104 QUIZ_MAP_HOS_03 = 0,
105 QUIZ_COUNT_HOS = 1,
106};
@ QUIZ_MAP_KMR_02
Definition Quizmo.inc.c:76
@ QUIZ_COUNT_HOS
Definition Quizmo.inc.c:105
@ QUIZ_MAP_JAN_02
Definition Quizmo.inc.c:95
@ QUIZ_MAP_HOS_03
Definition Quizmo.inc.c:104
@ QUIZ_COUNT_DRO
Definition Quizmo.inc.c:93
@ QUIZ_MAP_DRO_02
Definition Quizmo.inc.c:92
@ QUIZ_MAP_NOK_01
Definition Quizmo.inc.c:87
@ QUIZ_MAP_SAM_02
Definition Quizmo.inc.c:100
@ QUIZ_MAP_JAN_03
Definition Quizmo.inc.c:96
@ QUIZ_MAP_MAC_05
Definition Quizmo.inc.c:84
@ QUIZ_COUNT_JAN
Definition Quizmo.inc.c:97
@ QUIZ_MAP_MAC_00
Definition Quizmo.inc.c:79
@ QUIZ_MAP_MAC_03
Definition Quizmo.inc.c:82
@ QUIZ_COUNT_NOK
Definition Quizmo.inc.c:89
@ QUIZ_MAP_MAC_04
Definition Quizmo.inc.c:83
@ QUIZ_COUNT_KMR
Definition Quizmo.inc.c:77
@ QUIZ_MAP_SAM_01
Definition Quizmo.inc.c:99
@ QUIZ_COUNT_SAM
Definition Quizmo.inc.c:102
@ QUIZ_MAP_SAM_11
Definition Quizmo.inc.c:101
@ QUIZ_MAP_DRO_01
Definition Quizmo.inc.c:91
@ QUIZ_COUNT_MAC
Definition Quizmo.inc.c:85
@ QUIZ_MAP_NOK_02
Definition Quizmo.inc.c:88
@ QUIZ_MAP_MAC_02
Definition Quizmo.inc.c:81
@ QUIZ_MAP_MAC_01
Definition Quizmo.inc.c:80

Function Documentation

◆ Quizmo_NPC_OnRender()

void N Quizmo_NPC_OnRender ( Npc * npc)

Definition at line 219 of file Quizmo.inc.c.

219 {
220 Camera* camera = &gCameras[gCurrentCamID];
221
222 if (npc->blur.quizmo->flags & 1) {
223 clamp_angle(-camera->curYaw);
224 }
225}
#define clamp_angle
s32 flags
union Npc::@0 blur
Camera gCameras[4]
Definition cam_main.c:17
s16 gCurrentCamID
Definition cam_main.c:13

◆ Quizmo_CreateReactionEffect()

void N Quizmo_CreateReactionEffect ( void )

Definition at line 545 of file Quizmo.inc.c.

545 {
546 s32 result = evt_get_variable(NULL, N(Quizmo_ScriptArray[QUIZ_ARRAY_INDEX_ANSWER_RESULT]));
547
548 if (result == 1) {
549 fx_quizmo_answer(0, 0, 0, 0);
550 } else if (result == 2) {
551 fx_quizmo_answer(1, 0, 0, 0);
552 }
553}
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690

Variable Documentation

◆ MessagePlural

s16 MessagePlural
extern

Definition at line 42 of file msg.c.

@ MSG_CHAR_LOWER_S
Definition enums.h:5939
@ MSG_CHAR_READ_END
Definition enums.h:6056

◆ MessageSingular

s16 MessageSingular
extern

Definition at line 48 of file msg.c.