File size: 3,008 Bytes
7e9dc27 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | --[[
Project: SA Memory (Available from https://blast.hk/)
Developers: LUCHARE, FYP
Special thanks:
plugin-sdk (https://github.com/DK22Pac/plugin-sdk) for the structures and addresses.
Copyright (c) 2018 BlastHack.
]]
local shared = require 'SAMemory.shared'
shared.require 'RenderWare'
shared.require 'vector2d'
shared.require 'vector3d'
shared.ffi.cdef[[
typedef enum e2dEffectType
{
EFFECT_LIGHT,
EFFECT_PARTICLE,
EFFECT_ATTRACTOR = 3,
EFFECT_SUN_GLARE,
EFFECT_FURNITUR,
EFFECT_ENEX,
EFFECT_ROADSIGN,
EFFECT_SLOTMACHINE_WHEEL,
EFFECT_COVER_POINT,
EFFECT_ESCALATOR,
} e2dEffectType;
typedef enum ePedAttractorType
{
PED_ATTRACTOR_ATM = 0,
PED_ATTRACTOR_SEAT = 1,
PED_ATTRACTOR_STOP = 2,
PED_ATTRACTOR_PIZZA = 3,
PED_ATTRACTOR_SHELTER = 4,
PED_ATTRACTOR_TRIGGER_SCRIPT = 5,
PED_ATTRACTOR_LOOK_AT = 6,
PED_ATTRACTOR_SCRIPTED = 7,
PED_ATTRACTOR_PARK = 8,
PED_ATTRACTOR_STEP = 9
} ePedAttractorType;
typedef struct tEffectLight
{
RwColor color;
float fCoronaFarClip;
float fPointlightRange;
float fCoronaSize;
float fShadowSize;
unsigned short nFlags;
unsigned char nCoronaFlashType;
bool bCoronaEnableReflection;
unsigned char nCoronaFlareType;
unsigned char nShadowColorMultiplier;
char nShadowZDistance;
char offsetX;
char offsetY;
char offsetZ;
char _pad2E[2];
RwTexture *pCoronaTex;
RwTexture *pShadowTex;
int field_38;
int field_3C;
} tEffectLight;
typedef struct tEffectParticle
{
char szName[24];
} tEffectParticle;
typedef struct tEffectPedAttractor
{
vector3d vecQueueDir;
vector3d vecUseDir;
vector3d vecForwardDir;
unsigned char nAttractorType;
unsigned char nPedExistingProbability;
char field_36;
unsigned char nFlags;
char szScriptName[8];
} tEffectPedAttractor;
typedef struct tEffectEnEx
{
float fEnterAngle;
vector3d vecSize;
vector3d vecExitPosn;
float fExitAngle;
short nInteriorId;
unsigned char nFlags1;
unsigned char nSkyColor;
char szInteriorName[8];
unsigned char nTimeOn;
unsigned char nTimeOff;
unsigned char nFlags2;
} tEffectEnEx;
typedef struct tEffectRoadsign
{
vector2d vecSize;
float afRotation[3];
unsigned short nFlags;
char _pad26[2];
char *pText;
RpAtomic *pAtomic;
} tEffectRoadsign;
typedef struct tEffectCoverPoint
{
vector2d vecDirection;
unsigned char nType;
char _pad19[3];
} tEffectCoverPoint;
typedef struct tEffectEscalator
{
vector3d vecBottom;
vector3d vecTop;
vector3d vecEnd;
unsigned char nDirection;
char _pad35[3];
} tEffectEscalator;
typedef struct C2dEffect
{
vector3d vecPosn;
unsigned int nType;
union
{
tEffectLight light;
tEffectParticle particle;
tEffectPedAttractor pedAttractor;
tEffectEnEx enEx;
tEffectRoadsign roadsign;
tEffectCoverPoint coverPoint;
tEffectEscalator escalator;
};
} C2dEffect;
]]
shared.validate_size('C2dEffect', 0x40)
|