Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_figure_functions.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
5
26
27typedef enum
28{
184} FigureJobs;
185
186// Declare the function pointers for the FigureFunctions group
187DECLARE_FUNCTION(bool, isAlive, SF_CGdFigure *figure, uint16_t target);
188DECLARE_FUNCTION(bool, setWalkSpeed, SF_CGdFigure *figure, uint16_t target,
189 uint16_t value);
190DECLARE_FUNCTION(bool, addAction, SF_CGdFigure *figure, uint16_t target,
191 void *maybe_action);
193 StatisticDataKey key, uint16_t target, int8_t value);
194DECLARE_FUNCTION(uint8_t, addBonusMult, FigureStatistic *statistic,
195 uint8_t value);
196DECLARE_FUNCTION(uint16_t, getCurrentHealth, SF_CGdFigure *figure,
197 uint16_t figure_id);
198DECLARE_FUNCTION(void, decreaseHealth, SF_CGdFigure *figure, uint16_t figure_id,
199 uint16_t amount);
200DECLARE_FUNCTION(uint16_t, getCurrentMaxMana, SF_CGdFigure *figure,
201 uint16_t figure_id);
202DECLARE_FUNCTION(uint16_t, getCurrentMaxHealth, SF_CGdFigure *figure,
203 uint16_t figure_id);
204DECLARE_FUNCTION(void, setJobToDoCount, SF_CGdFigure *figure,
205 uint16_t target_index, uint16_t value);
206DECLARE_FUNCTION(uint16_t, getCurrentHealthPercent, SF_CGdFigure *figure,
207 uint16_t figure_id);
208DECLARE_FUNCTION(void, rescaleMana, SF_CGdFigure *figure, uint16_t figure_id,
209 uint16_t max_mana);
210DECLARE_FUNCTION(void, rescaleHealth, SF_CGdFigure *figure, uint16_t figure_id,
211 uint16_t max_health);
212DECLARE_FUNCTION(uint16_t, getJob, SF_CGdFigure *figure, uint16_t figure_id);
213DECLARE_FUNCTION(uint16_t, getAggroValue, SF_CGdFigure * _this,
214 uint16_t figure_id, uint16_t target_index);
215DECLARE_FUNCTION(void, setAggroValue, SF_CGdFigure * _this, uint16_t figure_id,
216 uint16_t target_index, uint16_t aggroValue, uint32_t unkn);
217DECLARE_FUNCTION(void *, getHealersList, SF_CGdFigure * _this, void *autoclass9,
218 uint16_t figure_id);
219DECLARE_FUNCTION(bool, isFlagSet, SF_CGdFigure *figure, uint16_t figure_index,
221DECLARE_FUNCTION(uint16_t, getSpellJobStartNode, SF_CGdFigure *figure,
222 uint16_t figure_index);
223DECLARE_FUNCTION(void, subMana, SF_CGdFigure *_this, uint16_t param_1,
224 uint32_t param_2);
225DECLARE_FUNCTION(uint16_t, getCurrentMana, SF_CGdFigure *figure,
226 uint16_t figure_id);
227DECLARE_FUNCTION(SF_Coord, getPosition, SF_CGdFigure *figure,
228 SF_Coord *position, uint16_t figure_id);
230 SF_CGdFigure *figure, SF_CGdFigureWeaponStats *stats_in,
231 uint16_t figure_id);
232DECLARE_FUNCTION(bool, isWarrior, SF_CGdFigure *figure, uint16_t figure_id);
233DECLARE_FUNCTION(void, setTask, SF_CGdFigure *_figure, uint16_t figure_index,
234 CGdFigureTask figureTask);
235// Unknown Functons
236DECLARE_FUNCTION(bool, FUN_006e3a90, uint32_t *CGdFigureJobs,
237 uint16_t figure_id);
238DECLARE_FUNCTION(void, disposeHealerList, void *healer_list);
void __thiscall addBonusMultToStatistic(SF_CGdFigure *figure, StatisticDataKey key, uint16_t target, int8_t value)
uint16_t(__thiscall * getCurrentHealth_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
void(__thiscall * subMana_ptr)(SF_CGdFigure *_this, uint16_t param_1, uint32_t param_2)
bool(__thiscall * addAction_ptr)(SF_CGdFigure *figure, uint16_t target, void *maybe_action)
void(__thiscall * rescaleHealth_ptr)(SF_CGdFigure *figure, uint16_t figure_id, uint16_t max_health)
bool(__thiscall * FUN_006e3a90_ptr)(uint32_t *CGdFigureJobs, uint16_t figure_id)
void(__thiscall * setTask_ptr)(SF_CGdFigure *_figure, uint16_t figure_index, CGdFigureTask figureTask)
StatisticDataKey
@ DEXTERITY
@ MANA_STUFF
@ AGILITY
@ RESISTANCE_ICE
@ CAST_SPEED
@ INTELLIGENCE
@ RESISTANCE_FIRE
@ RESISTANCE_MENTAL
@ RESISTANCE_BLACK
@ FIGHT_SPEED
@ WALK_SPEED
uint16_t(__thiscall * getCurrentMana_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
@ kGdJobAnimalIdle
@ kGdJobHitTarget
@ kGdJobWalkToNPC
@ kGdJobGathererCheckResource
@ kGdJobStrafeLeft
@ kGdJobFarmerWalkToHarvest
@ kGdJobCarrierCheckDrop
@ kGdJobFarmerCheckDrop
@ kGdJobStandup
@ kGdJobMinerSearchResource
@ kGdJobGathererWalkToDeliverGood
@ kGdJobCattleBreederCheckDrop
@ kGdJobStrike
@ kGdJobPriestWork
@ kGdJobHitTargetRange2
@ kGdJobShrineWorkerWalkToMana
@ kGdJobPetIdle
@ kGdJobFisherSearchForWork
@ kGdJobCorpseCollectorWalkToDeliverGood
@ kGdJobFarmerWalkToDeliverGood
@ kGdJobMinerWalkHome
@ kGdJobCorpseRot
@ kGdJobWoodCutterWalkToTree
@ kGdJobMinerCheckResource
@ kGdJobCorpseCollectorCheckDrop
@ kGdJobShrineWorkerCheckMana
@ kGdJobOfferMe
@ kGdJobCattleBreederWalkToDeliverGood
@ kGdJobFisherWalkHome
@ kGdJobStartWorkAtBuilding
@ kGdJobSmithSearchForWork
@ kGdJobMinerWalkToWork
@ kGdJobFarmerWaitForWork
@ kGdJobNothing
@ kGdJobGathererWork
@ kGdJobEnterBuilding
@ kGdJobHunterCheckCorpse
@ kGdJobSmelterSearchForWork
@ kGdJobStrafeRight
@ kGdJobMinerStoopToDropGood
@ kGdJobCorpseRotWithLoot
@ kGdJobStoneMinerCheckDrop
@ kGdJobWoodCutterWalkHome
@ kGdJobHunterHitTarget
@ kGdJobWalkToPortal
@ kGdJobWalkToObject
@ kGdJobForesterPlant
@ kGdJobShrineWorkerTakeMana
@ kGdJobGathererCheckDrop
@ kGdJobCattleBreederFeed
@ kGdJobWarriorNothing
@ kGdJobCastPreResolve
@ kGdJobMinerCheckDrop
@ kGdJobHunterCutCorpse
@ kGdJobHunterSearchForWork
@ kGdJobGroupWalk
@ kGdJobStoneMinerWalkHome
@ kGdJobFisherWalkToDeliverGood
@ kGdJobFoodWorkerWork
@ kGdJobCast
@ kGdJobBuilderBuild
@ kGdJobWalkToMaster
@ kGdJobFisherCheckResource
@ kGdJobCattleBreederWalkHome
@ kGdJobHunterCheckTarget
@ kGdJobExitBuilding
@ kGdJobWoodCutterWalkToDeliverGood
@ kGdJobCorpseCollectorWalkToCorpse
@ kGdJobClubMakerSearchForWork
@ kGdJobFisherWork
@ kGdJobCarpenterWork
@ kGdJobPunch
@ kGdJobHunterWalkToTarget
@ kGdJobFarmerHarvest
@ kGdJobNone
@ kGdJobCorpseCollectorCutCorpse
@ kGdJobFarmerWalkHomeHarvest
@ kGdJobWoodCutterCheckDrop
@ kGdJobHunterWalkToDeliverGood
@ kGdJobFarmerSow
@ kGdJobFarmerCheckHarvest
@ kGdJobCarpenterSearchForWork
@ kGdJobShrineWorkerCheckDrop
@ kGdJobWalkBack
@ kGdJobCheckBattleSleep
@ kGdJobBuilderSearchForWork
@ kGdJobShrineWorkerWalkHome
@ kGdJobGoto
@ kGdJobFoodWorkerSearchForWork
@ kGdJobStoneMinerWalkToDeliverGood
@ kGdJobGathererWalkHome
@ kGdJobFisherCheckDrop
@ kGdJobStoneMinerCheckStone
@ kGdJobGathererWalkToResource
@ kGdJobAnimalWalkToNewPlace
@ kGdJobHitTargetRange1
@ kGdJobWoodCutterCutTree
@ kGdJobStoneMinerSearchStone
@ kGdJobForesterWalkHome
@ kGdJobDefault
@ kGdJobWoodCutterStoopToDropLog
@ kGdJobCorpseCollectorSearchForWork
@ kGdJobReleaseDelay
@ kGdJobWarTowerIdle
@ kGdJobCriticalHit
@ kGdJobStepAside
@ kGdJobFeignDeath
@ kGdJobStoneMinerWalkToStone
@ kGdJobHunterCheckDrop
@ kGdJobDie
@ kGdJobSmithWork
@ kGdJobOrcRegenerate
@ kGdJobWalkToBasePoint
@ kGdJobCastResolve
@ kGdJobPriestSearchForWork
@ kGdJobSmelterWork
@ kGdJobForesterCheckPlant
@ kGdJobMinerWork
@ kGdJobFarmerWalkHomeSow
@ kGdJobBuilderWalkToBuildPos
@ kGdJobCorpseCollectorWalkHome
@ kGdJobWalkToAttackMonument
@ kGdJobClubMakerWork
@ kGdJobGotHit
@ kGdJobGroupNothing
@ kGdJobStoneMinerStoopToDropStone
@ kGdJobMeleeAbility
@ kGdJobWalkToAttackBuilding
@ kGdJobGathererSearchResource
@ kGdJobManualWalkToTarget
@ kGdJobCattleBreederSearchForWork
@ kGdJobForesterSearchForWork
@ kGdJobPreCast
@ kGdJobWalkToTarget
@ kGdJobMinerWalkToDeliverGood
@ kGdJobShrineWorkerSearchForWork
@ kGdJobPetWalkToMaster
@ kGdJobHunterWalkToCorpse
@ kGdJobFarmerWalkToSow
@ kGdJobStoneMinerCrushStone
@ kGdJobWoodCutterCheckTree
@ kGdJobFisherWalkToWork
@ kGdJobWoodCutterSearchTree
@ kGdJobForesterWalkToWork
@ kGdJobCorpseCollectorCheckCorpse
@ kGdJobGotoBuildingForWork
@ kGdJobHunterWalkHome
@ kGdJobStoop
uint16_t(__thiscall * getAggroValue_ptr)(SF_CGdFigure *_this, uint16_t figure_id, uint16_t target_index)
void *(__thiscall * getHealersList_ptr)(SF_CGdFigure *_this, void *autoclass9, uint16_t figure_id)
uint16_t(__thiscall * getSpellJobStartNode_ptr)(SF_CGdFigure *figure, uint16_t figure_index)
void(__thiscall * decreaseHealth_ptr)(SF_CGdFigure *figure, uint16_t figure_id, uint16_t amount)
bool(__thiscall * isAlive_ptr)(SF_CGdFigure *figure, uint16_t target)
bool(__thiscall * setWalkSpeed_ptr)(SF_CGdFigure *figure, uint16_t target, uint16_t value)
uint16_t(__thiscall * getJob_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
SF_CGdFigureWeaponStats *(__thiscall * getWeaponStats_ptr)(SF_CGdFigure *figure, SF_CGdFigureWeaponStats *stats_in, uint16_t figure_id)
void(__thiscall * rescaleMana_ptr)(SF_CGdFigure *figure, uint16_t figure_id, uint16_t max_mana)
void(__thiscall * disposeHealerList_ptr)(void *healer_list)
bool(__thiscall * isWarrior_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
SF_Coord(__thiscall * getPosition_ptr)(SF_CGdFigure *figure, SF_Coord *position, uint16_t figure_id)
uint16_t(__thiscall * getCurrentMaxMana_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
bool(__thiscall * isFlagSet_ptr)(SF_CGdFigure *figure, uint16_t figure_index, GdFigureFlags flag)
void(__thiscall * setAggroValue_ptr)(SF_CGdFigure *_this, uint16_t figure_id, uint16_t target_index, uint16_t aggroValue, uint32_t unkn)
uint16_t(__thiscall * getCurrentMaxHealth_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
uint16_t(__thiscall * getCurrentHealthPercent_ptr)(SF_CGdFigure *figure, uint16_t figure_id)
void(__thiscall * addBonusMultToStatistic_ptr)(SF_CGdFigure *figure, StatisticDataKey key, uint16_t target, int8_t value)
void(__thiscall * setJobToDoCount_ptr)(SF_CGdFigure *figure, uint16_t target_index, uint16_t value)
uint8_t(__thiscall * addBonusMult_ptr)(FigureStatistic *statistic, uint8_t value)
Group of Structures and Enums used throught SFSF.
#define DECLARE_FUNCTION(type, name,...)
Declares a function with the specified return type, name, and arguments.
Group of functions to manipulate the behavior and statistics of the game figures (units)
isWarrior_ptr isWarrior
rescaleHealth_ptr rescaleHealth
disposeHealerList_ptr disposeHealerList
getPosition_ptr getPosition
addBonusMult_ptr addBonusMult
setJobToDoCount_ptr setJobToDoCount
setWalkSpeed_ptr setWalkSpeed
getCurrentMaxMana_ptr getCurrentMaxMana
getCurrentMaxHealth_ptr getCurrentMaxHealth
addAction_ptr addAction
FUN_006e3a90_ptr FUN_006e3a90
decreaseHealth_ptr decreaseHealth
getCurrentHealth_ptr getCurrentHealth
isFlagSet_ptr isFlagSet
getWeaponStats_ptr getWeaponStats
getHealersList_ptr getHealersList
setAggroValue_ptr setAggroValue
getAggroValue_ptr getAggroValue
rescaleMana_ptr rescaleMana
getSpellJobStartNode_ptr getSpellJobStartNode
getCurrentHealthPercent_ptr getCurrentHealthPercent
getCurrentMana_ptr getCurrentMana
addBonusMultToStatistic_ptr addBonusMultToStatistic
A structure for the global list of figures and related statistics for them.