Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_iterator_functions.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
5
6typedef struct __attribute__((packed))
7{
8 uint32_t offset_0x0;
9 uint32_t offset_0x4;
10 uint16_t offset_0x8;
11 uint16_t offset_0xa;
12 uint16_t offset_0xc;
13 uint16_t offset_0xe;
14 uint16_t offset_0x10;
15 uint16_t offset_0x12;
16 uint16_t offset_0x14;
17 uint16_t offset_0x16;
18 uint16_t offset_0x18;
19 uint16_t offset_0x1a;
20 uint32_t offset_0x1c;
21 uint16_t offset_0x20;
22 uint32_t offset_0x22;
23 uint8_t offset_0x26;
24 uint8_t offset_0x27;
25 uint32_t offset_0x28;
26 uint16_t offset_0x2c;
27 uint8_t offset_0x2e;
28 uint8_t offset_0x2f;
31
32typedef struct __attribute__((packed))
33{
34 uint32_t ftable_ptr;
37
38typedef struct __attribute__((packed))
39{
40 uint32_t btable_ptr;
43
44// Declare the function pointers for IteratorFunctions group
45DECLARE_FUNCTION(void, figureIteratorInit, CGdFigureIterator *iterator,
46 uint16_t x_start, uint16_t y_start, uint16_t x_end,
47 uint16_t y_end);
48DECLARE_FUNCTION(void, figureIteratorSetPointers, CGdFigureIterator *iterator,
49 SF_CGdFigure *figure, void *AutoClass22, void *CGdWorld);
50DECLARE_FUNCTION(void, iteratorSetArea, CGdFigureIterator *iterator,
51 SF_Coord *position, uint16_t radius);
52DECLARE_FUNCTION(uint16_t, getNextFigure, CGdFigureIterator *iterator);
54 SF_CGdSpell *spell);
56
57DECLARE_FUNCTION(void, buildingIteratorInit, CGdBuildingIterator *iterator,
58 uint16_t x_start, uint16_t y_start, uint16_t x_end,
59 uint16_t y_end);
60DECLARE_FUNCTION(void, buildingIteratorSetPointers,
61 CGdBuildingIterator *iterator, void *SF_CGdBuilding,
62 void *AutoClass22, void *CGdWorld);
63
64DECLARE_FUNCTION(uint16_t, getNextBuilding, CGdBuildingIterator *_this);
65
void __thiscall setupFigureIterator(CGdFigureIterator *iterator, SF_CGdSpell *spell)
void __thiscall disposeFigureIterator(CGdFigureIterator *iterator)
Group of Structures and Enums used throught SFSF.
#define DECLARE_FUNCTION(type, name,...)
Declares a function with the specified return type, name, and arguments.
void(__thiscall * buildingIteratorSetPointers_ptr)(CGdBuildingIterator *iterator, void *SF_CGdBuilding, void *AutoClass22, void *CGdWorld)
void(__thiscall * figureIteratorSetPointers_ptr)(CGdFigureIterator *iterator, SF_CGdFigure *figure, void *AutoClass22, void *CGdWorld)
uint16_t(__thiscall * getNextBuilding_ptr)(CGdBuildingIterator *_this)
void(__thiscall * figureIteratorInit_ptr)(CGdFigureIterator *iterator, uint16_t x_start, uint16_t y_start, uint16_t x_end, uint16_t y_end)
void(__thiscall * disposeFigureIterator_ptr)(CGdFigureIterator *iterator)
void(__thiscall * iteratorSetArea_ptr)(CGdFigureIterator *iterator, SF_Coord *position, uint16_t radius)
void(__thiscall * setupFigureIterator_ptr)(CGdFigureIterator *iterator, SF_CGdSpell *spell)
void(__thiscall * buildingIteratorInit_ptr)(CGdBuildingIterator *iterator, uint16_t x_start, uint16_t y_start, uint16_t x_end, uint16_t y_end)
uint16_t(__thiscall * getNextFigure_ptr)(CGdFigureIterator *iterator)
CGdTileIterator_data data
CGdTileIterator_data data
Group of functions related to Iteration, Often used for AOE or Chain Like Spells.
buildingIteratorSetPointers_ptr buildingIteratorSetPointers
setupFigureIterator_ptr setupFigureIterator
getNextBuilding_ptr getNextBuilding
disposeFigureIterator_ptr disposeFigureIterator
getNextFigure_ptr getNextFigure
figureIteratorSetPointers_ptr figureIteratorSetPointers
iteratorSetArea_ptr iteratorSetArea
figureIteratorInit_ptr figureIteratorInit
buildingIteratorInit_ptr buildingIteratorInit
A structure for the global list of figures and related statistics for them.