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
44typedef struct __attribute__((packed))
45{
46 uint32_t btable_ptr;
49
50
51// Declare the function pointers for IteratorFunctions group
52DECLARE_FUNCTION(void, figureIteratorInit, CGdFigureIterator *iterator,
53 uint16_t x_start, uint16_t y_start, uint16_t x_end,
54 uint16_t y_end);
55DECLARE_FUNCTION(void, figureIteratorSetPointers, CGdFigureIterator *iterator,
56 SF_CGdFigure *figure, void *AutoClass22, void *CGdWorld);
57DECLARE_FUNCTION(void, iteratorSetArea, CGdFigureIterator *iterator,
58 SF_Coord *position, uint16_t radius);
59DECLARE_FUNCTION(uint16_t, getNextFigure, CGdFigureIterator *iterator);
61 SF_CGdSpell *spell);
63
64DECLARE_FUNCTION(void, buildingIteratorInit, CGdBuildingIterator *iterator,
65 uint16_t x_start, uint16_t y_start, uint16_t x_end,
66 uint16_t y_end);
67DECLARE_FUNCTION(void, buildingIteratorSetPointers,
68 CGdBuildingIterator *iterator, void *SF_CGdBuilding,
69 void *AutoClass22, void *CGdWorld);
70DECLARE_FUNCTION(uint16_t, getNextBuilding, CGdBuildingIterator *_this);
71
72DECLARE_FUNCTION(void, objectIteratorInit, CGdObjectIterator *iterator,
73 uint16_t x_start, uint16_t y_start, uint16_t x_end,
74 uint16_t y_end);
75DECLARE_FUNCTION(void, objectIteratorSetPointers,
76 CGdObjectIterator *iterator, void *SF_CGdBuilding,
77 void *AutoClass22, void *CGdWorld);
78DECLARE_FUNCTION(uint16_t, getNextObject, CGdObjectIterator *_this);
79
85typedef struct
86{
87 figureIteratorInit_ptr figureIteratorInit;
88 figureIteratorSetPointers_ptr figureIteratorSetPointers;
89 iteratorSetArea_ptr iteratorSetArea;
90 getNextFigure_ptr getNextFigure;
91 setupFigureIterator_ptr setupFigureIterator;
92 disposeFigureIterator_ptr disposeFigureIterator;
93 getNextBuilding_ptr getNextBuilding;
94 buildingIteratorInit_ptr buildingIteratorInit;
95 buildingIteratorSetPointers_ptr buildingIteratorSetPointers;
96 getNextObject_ptr getNextObject;
97 objectIteratorInit_ptr objectIteratorInit;
98 objectIteratorSetPointers_ptr objectIteratorSetPointers;
void __thiscall setupFigureIterator(CGdFigureIterator *iterator, SF_CGdSpell *spell)
void __thiscall disposeFigureIterator(CGdFigureIterator *iterator)
#define DECLARE_FUNCTION(type, name,...)
Declares a function with the specified return type, name, and arguments.
CGdTileIterator_data data
CGdTileIterator_data data
CGdTileIterator_data data
Group of functions related to Iteration, Often used for AOE or Chain Like Spells.
buildingIteratorSetPointers_ptr buildingIteratorSetPointers
objectIteratorSetPointers_ptr objectIteratorSetPointers
objectIteratorInit_ptr objectIteratorInit
setupFigureIterator_ptr setupFigureIterator
getNextBuilding_ptr getNextBuilding
getNextObject_ptr getNextObject
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.