Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_a_tag_kmsg.h
Go to the documentation of this file.
1#ifndef D_A_TAG_KMSG_H
2#define D_A_TAG_KMSG_H
3
4#include "dolphin/types.h"
5#include "f_op/f_op_actor.h"
7#include "d/d_msg_flow.h"
8#include "d/d_com_inf_game.h"
9
10struct daTag_KMsg_c : public fopAc_ac_c {
11public:
20
22 /* 0x570 */ dMsgFlow_c mMsgFlow;
23 /* 0x5BC */ u32 mFlowNodeNo;
24 /* 0x5C0 */ s16 mEventIdx;
25 /* 0x5C2 */ u8 field_0x5c2;
26 /* 0x5C3 */ u8 field_0x5c3;
27 /* 0x5C4 */ bool field_0x5c4;
28
29 /* 8048DE78 */ int create();
30 /* 8048DFDC */ int Delete();
31 /* 8048E010 */ int Execute();
32 /* 8048E8B8 */ int Draw();
33 /* 8048E8C0 */ int isDelete();
34 /* 8048EA30 */ virtual ~daTag_KMsg_c() {
35 if (getType() == KMSG_TYPE_3) {
36 dComIfG_resDelete(&mPhase, "Lv6Gate");
37 }
38 }
39
41
42 int getType() {
43 int param = fopAcM_GetParam(this) >> 0x18;
44 int type;
45
46 if (param == 0xFF) {
47 type = 0;
48 } else {
49 type = param;
50 }
51
52 return type;
53 }
54
56 u16 rv = home.angle.z;
57 if (rv == 0xffff) {
58 return -1;
59 }
60 return rv;
61 }
62
64 return home.angle.x;
65 }
66
68 u32 talkAngle = (fopAcM_GetParam(this) & 0xe0) >> 5;
69 if (talkAngle == 7) {
70 return 0;
71 } else {
72 return talkAngle > 6 ? 6 : talkAngle;
73 }
74 }
75
77 u32 talkDis = fopAcM_GetParam(this) & 0x1f;
78 if (talkDis == 0x1f) {
79 return 0;
80 } else {
81 return talkDis > 0x13 ? 0x13 : talkDis;
82 }
83 }
84
86 u32 attnPosOffset = (fopAcM_GetParam(this) & 0xff0000) >> 0x10;
87 if (attnPosOffset == 0xff) {
88 return 1000000000.0f;
89 } else {
90 return attnPosOffset;
91 }
92 }
93
95 return home.angle.x & 0x8000;
96 }
97
99 u32 eyeOffset = (fopAcM_GetParam(this) & 0xff00) >> 8;
100 return (eyeOffset == 0xff) ? 0 : eyeOffset;
101 }
102};
103
104#endif /* D_A_TAG_KMSG_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static u8 eyeOffset[12]
Definition d_a_npc_gra.cpp:1807
int dComIfG_resDelete(request_of_phase_process_class *i_phase, char const *i_resName)
Definition d_com_inf_game.cpp:1096
u32 fopAcM_GetParam(const void *pActor)
Definition f_op_actor_mng.h:224
s16 x
Definition vec.h:19
s16 z
Definition vec.h:19
csXyz angle
Definition f_op_actor.h:171
Definition d_a_obj_sekizoa.cpp:318
Definition d_a_tag_kmsg.h:10
u8 field_0x5c3
Definition d_a_tag_kmsg.h:26
bool field_0x5c4
Definition d_a_tag_kmsg.h:27
u32 getTalkAngle()
Definition d_a_tag_kmsg.h:67
u8 field_0x5c2
Definition d_a_tag_kmsg.h:25
int Execute()
Definition d_a_tag_kmsg.cpp:66
u32 getFlowNodeNo()
Definition d_a_tag_kmsg.h:55
dMsgFlow_c mMsgFlow
Definition d_a_tag_kmsg.h:22
int getType()
Definition d_a_tag_kmsg.h:42
int Draw()
Definition d_a_tag_kmsg.cpp:213
int isDelete()
Definition d_a_tag_kmsg.cpp:218
u8 getBitSW()
Definition d_a_tag_kmsg.h:63
void stabMasterSword()
Definition d_a_tag_kmsg.h:40
int create()
Definition d_a_tag_kmsg.cpp:32
u32 mFlowNodeNo
Definition d_a_tag_kmsg.h:23
request_of_phase_process_class mPhase
Definition d_a_tag_kmsg.h:21
s16 mEventIdx
Definition d_a_tag_kmsg.h:24
f32 getEyePosOffset()
Definition d_a_tag_kmsg.h:98
u32 getTalkDis()
Definition d_a_tag_kmsg.h:76
u32 getChkType()
Definition d_a_tag_kmsg.h:94
int Delete()
Definition d_a_tag_kmsg.cpp:57
KMsg_Type
Definition d_a_tag_kmsg.h:12
@ KMSG_TYPE_1
Definition d_a_tag_kmsg.h:14
@ KMSG_TYPE_2
Definition d_a_tag_kmsg.h:15
@ KMSG_TYPE_5
Definition d_a_tag_kmsg.h:18
@ KMSG_TYPE_0
Definition d_a_tag_kmsg.h:13
@ KMSG_TYPE_4
Definition d_a_tag_kmsg.h:17
@ KMSG_TYPE_3
Definition d_a_tag_kmsg.h:16
virtual ~daTag_KMsg_c()
Definition d_a_tag_kmsg.h:34
f32 getAttnPosOffset()
Definition d_a_tag_kmsg.h:85
Definition d_a_ep.cpp:19
actor_place home
Definition f_op_actor.h:213
Definition d_a_hozelda.cpp:14
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8