MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / SysEvent

Method SysEvent

src/SB/Game/zNPCTypeTiki.cpp:940–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940S32 zNPCTiki::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam,
941 xBase* toParamWidget, S32* handled)
942{
943 // TODO: Figure out event enum
944 switch (toEvent)
945 {
946 case 0x32:
947 if ((this->tikiFlag & 0x300) != 0x200 && this->explosion && this->explosion->initCB)
948 {
949 this->explosion->initCB(this->explosion, this->model, 0, 0);
950 }
951
952 this->RemoveFromFamily();
953 this->Reset();
954 if (this->SelfType() != NPC_TYPE_TIKI_LOVEY)
955 {
956 this->tikiFlag |= 5;
957 this->tikiFlag &= ~8;
958 this->vel = 0.0f;
959 this->landHt = FLOAT_MIN;
960 }
961
962 *handled = TRUE;
963 break;
964
965 case 3:
966 case 0x1F7:
967 if ((this->tikiFlag & 0x300) != 0x200)
968 {
969 xEntShow(this);
970
971 if (toParam)
972 {
973 S32 code = (S32)(0.5f + toParam[0]);
974 if (code == 'M')
975 {
976 zFXPopOn(*this, toParam[1], toParam[2]);
977 }
978 }
979 }
980 *handled = TRUE;
981 break;
982
983 case 4:
984 case 0x1F8:
985 if (xEntIsVisible(this) && toParam)
986 {
987 S32 code = (S32)(0.5f + toParam[0]);
988 if (code == 'M')
989 {
990 zFXPopOff(*this, toParam[1], toParam[2]);
991 }
992 }
993 xEntHide(this);
994 *handled = TRUE;
995 break;
996 case 0x53:
997 if ((this->tikiFlag & 0x300) != 0x200)

Callers 1

hack_function_orderFunction · 0.45

Calls 10

RemoveFromFamilyMethod · 0.95
ResetMethod · 0.95
xEntShowFunction · 0.85
zFXPopOnFunction · 0.85
xEntIsVisibleFunction · 0.85
zFXPopOffFunction · 0.85
xEntHideFunction · 0.85
SelfTypeMethod · 0.80
RestoreColFlagsMethod · 0.80
SysEventFunction · 0.50

Tested by

no test coverage detected