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

Method ParseSysEvent

src/SB/Game/zNPCTypeVillager.cpp:2039–2091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2037}
2038
2039S32 zNPCBalloonBoy::ParseSysEvent(NPCSysEvent* sed)
2040{
2041 zPlatform* plat;
2042 S32 handled = 1;
2043
2044 switch (sed->toEvent)
2045 {
2046 case eEventNPCSpecial_PlatformSnap:
2047 this->plat_balloons = NULL;
2048 plat = (zPlatform*)sed->toParamWidget;
2049 if (plat != NULL && plat->baseType == eBaseTypePlatform)
2050 {
2051 this->plat_balloons = plat;
2052 }
2053 if (this->plat_balloons == NULL)
2054 {
2055 plat = (zPlatform*)sed->from;
2056 if (plat != NULL && plat->baseType == eBaseTypePlatform)
2057 {
2058 this->plat_balloons = plat;
2059 }
2060 }
2061 if (this->plat_balloons != NULL)
2062 {
2063 this->psy_instinct->GoalSet(NPC_GOAL_BALLOON, 1);
2064 }
2065 else
2066 {
2067 this->psy_instinct->GoalSet(NPC_GOAL_IDLE, 1);
2068 }
2069 break;
2070
2071 case eEventNPCSetActiveOn:
2072 case eEventNPCSetActiveOff:
2073 handled = 0;
2074 break;
2075
2076 case eEventNPCSpecial_PlatformFall:
2077 break;
2078 default:
2079 if (this->IAmBallooning())
2080 {
2081 handled = 1;
2082 }
2083 else
2084 {
2085 handled = 0;
2086 }
2087 break;
2088 }
2089
2090 return handled;
2091}
2092
2093void zNPCBalloonBoy::PlatAnimSet(en_BBOY_PLATANIM platanim)
2094{

Callers 1

FolkHandleMailMethod · 0.95

Calls 2

IAmBallooningMethod · 0.95
GoalSetMethod · 0.80

Tested by

no test coverage detected