Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_worker_logic_hook.c File Reference
#include "sf_worker_logic_hook.h"
#include "../sf_hooks.h"
#include "sf_endspell_hook.h"
#include "../sf_wrappers.h"
Include dependency graph for sf_worker_logic_hook.c:

Go to the source code of this file.

Typedefs

typedef void(__thiscall * startWalkingTo_ptr) (SF_CGdFigureJobs *_this, uint16_t figure_id, SF_CGdTargetData *target, SF_Coord *ranges, uint8_t walk_mode, uint32_t param5)
typedef uint32_t *(__thiscall * getObjectQueue_ptr) (void *CGdObject, uint16_t object_index)
typedef void(__thiscall * addToObjectQueue_ptr) (uint32_t *_this, uint16_t figure_index)
typedef void(__thiscall * doArtisanAnimation_ptr) (SF_CGdFigureJobs *_this, uint16_t figure_id)
typedef uint32_t(__thiscall * addResource_ptr) (SF_CGdPlayer *_this, uint16_t player_id, bool isLight, uint8_t resource_type, uint32_t amount)
typedef void(__thiscall * AC65_FUN_0074caf0_ptr) (void *autoclass65, uint16_t owner, uint16_t resource, uint16_t amount)
typedef void(__thiscall * AC30_FUN_006c3880_ptr) (void *autoclass30, uint16_t figure_id, uint8_t resource, uint16_t amount)
typedef uint32_t *(* getGlobalAC65_ptr) (void)

Functions

void terminate_job_spells (SF_CGdFigureJobs *_this, uint16_t figure_id)
void initialize_worker_logic_data_hooks ()
bool __thiscall onWoodcutterFinishJob (SF_CGdFigureJobs *_this, uint16_t figure_id)
bool __thiscall onMinerFinishJob (SF_CGdFigureJobs *_this, uint16_t figure_id)
bool __thiscall onStoneMinerFinishJob (SF_CGdFigureJobs *_this, uint16_t figure_id)
void __thiscall update_owner_resources (SF_CGdFigureJobs *_this, uint16_t owner, uint16_t figure_id, uint8_t resource_type, uint8_t amount)
void __thiscall onCarpenterFinishJob (SF_CGdFigureJobs *_this, uint16_t figure_id)

Variables

SpellFunctions spellAPI
EffectFunctions effectAPI
ToolboxFunctions toolboxAPI
BuildingFunctions buildingAPI
FigureFunctions figureAPI
IteratorFunctions iteratorAPI
AiFunctions aiAPI
RegistrationFunctions registrationAPI
startWalkingTo_ptr startWalkingTo
getObjectQueue_ptr getObjectQueue
addToObjectQueue_ptr addToObjectQueue
doArtisanAnimation_ptr doArtisanAnimation
addResource_ptr addResource
getGlobalAC65_ptr getGlobalAC65
AC65_FUN_0074caf0_ptr AC65_FUN_0074caf0
AC30_FUN_006c3880_ptr AC30_FUN_006c3880

Typedef Documentation

◆ AC30_FUN_006c3880_ptr

typedef void(__thiscall * AC30_FUN_006c3880_ptr) (void *autoclass30, uint16_t figure_id, uint8_t resource, uint16_t amount)

Definition at line 71 of file sf_worker_logic_hook.c.

◆ AC65_FUN_0074caf0_ptr

typedef void(__thiscall * AC65_FUN_0074caf0_ptr) (void *autoclass65, uint16_t owner, uint16_t resource, uint16_t amount)

Definition at line 70 of file sf_worker_logic_hook.c.

◆ addResource_ptr

typedef uint32_t(__thiscall * addResource_ptr) (SF_CGdPlayer *_this, uint16_t player_id, bool isLight, uint8_t resource_type, uint32_t amount)

Definition at line 66 of file sf_worker_logic_hook.c.

◆ addToObjectQueue_ptr

typedef void(__thiscall * addToObjectQueue_ptr) (uint32_t *_this, uint16_t figure_index)

Definition at line 63 of file sf_worker_logic_hook.c.

◆ doArtisanAnimation_ptr

typedef void(__thiscall * doArtisanAnimation_ptr) (SF_CGdFigureJobs *_this, uint16_t figure_id)

Definition at line 65 of file sf_worker_logic_hook.c.

◆ getGlobalAC65_ptr

typedef uint32_t *(* getGlobalAC65_ptr) (void)

Definition at line 73 of file sf_worker_logic_hook.c.

◆ getObjectQueue_ptr

typedef uint32_t *(__thiscall * getObjectQueue_ptr) (void *CGdObject, uint16_t object_index)

Definition at line 62 of file sf_worker_logic_hook.c.

◆ startWalkingTo_ptr

typedef void(__thiscall * startWalkingTo_ptr) (SF_CGdFigureJobs *_this, uint16_t figure_id, SF_CGdTargetData *target, SF_Coord *ranges, uint8_t walk_mode, uint32_t param5)

Definition at line 60 of file sf_worker_logic_hook.c.

Function Documentation

◆ initialize_worker_logic_data_hooks()

void initialize_worker_logic_data_hooks ( )

Definition at line 87 of file sf_worker_logic_hook.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCarpenterFinishJob()

void __thiscall onCarpenterFinishJob ( SF_CGdFigureJobs * _this,
uint16_t figure_id )

Definition at line 354 of file sf_worker_logic_hook.c.

Here is the call graph for this function:

◆ onMinerFinishJob()

bool __thiscall onMinerFinishJob ( SF_CGdFigureJobs * _this,
uint16_t figure_id )

Definition at line 188 of file sf_worker_logic_hook.c.

Here is the call graph for this function:

◆ onStoneMinerFinishJob()

bool __thiscall onStoneMinerFinishJob ( SF_CGdFigureJobs * _this,
uint16_t figure_id )

Definition at line 272 of file sf_worker_logic_hook.c.

Here is the call graph for this function:

◆ onWoodcutterFinishJob()

bool __thiscall onWoodcutterFinishJob ( SF_CGdFigureJobs * _this,
uint16_t figure_id )

Definition at line 114 of file sf_worker_logic_hook.c.

Here is the call graph for this function:

◆ terminate_job_spells()

void terminate_job_spells ( SF_CGdFigureJobs * _this,
uint16_t figure_id )

Definition at line 15 of file sf_worker_logic_hook.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_owner_resources()

void __thiscall update_owner_resources ( SF_CGdFigureJobs * _this,
uint16_t owner,
uint16_t figure_id,
uint8_t resource_type,
uint8_t amount )

Definition at line 346 of file sf_worker_logic_hook.c.

Here is the caller graph for this function:

Variable Documentation

◆ AC30_FUN_006c3880

AC30_FUN_006c3880_ptr AC30_FUN_006c3880

Definition at line 84 of file sf_worker_logic_hook.c.

◆ AC65_FUN_0074caf0

AC65_FUN_0074caf0_ptr AC65_FUN_0074caf0

Definition at line 83 of file sf_worker_logic_hook.c.

◆ addResource

addResource_ptr addResource

Definition at line 81 of file sf_worker_logic_hook.c.

◆ addToObjectQueue

addToObjectQueue_ptr addToObjectQueue

Definition at line 79 of file sf_worker_logic_hook.c.

◆ doArtisanAnimation

doArtisanAnimation_ptr doArtisanAnimation

Definition at line 80 of file sf_worker_logic_hook.c.

◆ figureAPI

FigureFunctions figureAPI
extern

Definition at line 13 of file TestMod.cpp.

◆ getGlobalAC65

getGlobalAC65_ptr getGlobalAC65
extern

Definition at line 21 of file sf_building_done_hook.c.

◆ getObjectQueue

getObjectQueue_ptr getObjectQueue

Definition at line 78 of file sf_worker_logic_hook.c.

◆ registrationAPI

RegistrationFunctions registrationAPI
extern

Definition at line 14 of file TestMod.cpp.

◆ spellAPI

SpellFunctions spellAPI
extern

Definition at line 11 of file TestMod.cpp.

◆ startWalkingTo

startWalkingTo_ptr startWalkingTo

Definition at line 77 of file sf_worker_logic_hook.c.

◆ toolboxAPI

ToolboxFunctions toolboxAPI
extern

Definition at line 12 of file TestMod.cpp.