DEADSOFTWARE

default smallmap aligh: bottom
[d2df-sdl.git] / src / shared / mapdef_tgc_impl.inc
1 // trigger cache loader
2 // set `TriggerType` in `tgt` before calling this
3 procedure trigUpdateCacheData (var tgt: TTrigger; tdata: TDynRecord);
4 begin
5 case tgt.TriggerType of
6 TRIGGER_EXIT:
7 begin
8 tgt.tgcMap := tdata.trigMap;
9 end;
10 TRIGGER_TELEPORT:
11 begin
12 tgt.tgcTarget := tdata.trigTarget;
13 tgt.tgcD2d := tdata.trigD2d;
14 tgt.tgcSilent := tdata.trigSilent;
15 tgt.tgcDirection := tdata.trigDirection;
16 end;
17 TRIGGER_OPENDOOR,
18 TRIGGER_CLOSEDOOR,
19 TRIGGER_DOOR,
20 TRIGGER_DOOR5,
21 TRIGGER_CLOSETRAP,
22 TRIGGER_TRAP,
23 TRIGGER_LIFTUP,
24 TRIGGER_LIFTDOWN,
25 TRIGGER_LIFT:
26 begin
27 tgt.tgcSilent := tdata.trigSilent;
28 tgt.tgcD2d := tdata.trigD2d;
29 end;
30 TRIGGER_PRESS,
31 TRIGGER_ON,
32 TRIGGER_OFF,
33 TRIGGER_ONOFF:
34 begin
35 tgt.tgcTX := tdata.trigTX;
36 tgt.tgcTY := tdata.trigTY;
37 tgt.tgcTWidth := tdata.trigTWidth;
38 tgt.tgcTHeight := tdata.trigTHeight;
39 tgt.tgcWait := tdata.trigWait;
40 tgt.tgcPressCount := tdata.trigPressCount;
41 tgt.tgcExtRandom := tdata.trigExtRandom;
42 tgt.tgcSilent := tdata.trigSilent;
43 tgt.tgcSound := tdata.trigSound;
44 end;
45 TRIGGER_SECRET:
46 begin
47 end;
48 TRIGGER_TEXTURE:
49 begin
50 tgt.tgcActivateOnce := tdata.trigActivateOnce;
51 tgt.tgcAnimateOnce := tdata.trigAnimateOnce;
52 end;
53 TRIGGER_SOUND:
54 begin
55 tgt.tgcSoundName := tdata.trigSoundName;
56 tgt.tgcVolume := tdata.trigVolume;
57 tgt.tgcPan := tdata.trigPan;
58 tgt.tgcLocal := tdata.trigLocal;
59 tgt.tgcPlayCount := tdata.trigPlayCount;
60 tgt.tgcSoundSwitch := tdata.trigSoundSwitch;
61 end;
62 TRIGGER_SPAWNMONSTER:
63 begin
64 tgt.tgcTX := tdata.trigTX;
65 tgt.tgcTY := tdata.trigTY;
66 tgt.tgcSpawnMonsType := tdata.trigSpawnMonsType;
67 tgt.tgcHealth := tdata.trigHealth;
68 tgt.tgcDirection := tdata.trigDirection;
69 tgt.tgcActive := tdata.trigActive;
70 tgt.tgcMonsCount := tdata.trigMonsCount;
71 tgt.tgcEffect := tdata.trigEffect;
72 tgt.tgcMax := tdata.trigMax;
73 tgt.tgcDelay := tdata.trigDelay;
74 tgt.tgcBehaviour := tdata.trigBehaviour;
75 end;
76 TRIGGER_SPAWNITEM:
77 begin
78 tgt.tgcTX := tdata.trigTX;
79 tgt.tgcTY := tdata.trigTY;
80 tgt.tgcSpawnItemType := tdata.trigSpawnItemType;
81 tgt.tgcGravity := tdata.trigGravity;
82 tgt.tgcDmonly := tdata.trigDmonly;
83 tgt.tgcItemCount := tdata.trigItemCount;
84 tgt.tgcEffect := tdata.trigEffect;
85 tgt.tgcMax := tdata.trigMax;
86 tgt.tgcDelay := tdata.trigDelay;
87 end;
88 TRIGGER_MUSIC:
89 begin
90 tgt.tgcMusicName := tdata.trigMusicName;
91 tgt.tgcMusicAction := tdata.trigMusicAction;
92 end;
93 TRIGGER_PUSH:
94 begin
95 tgt.tgcAngle := tdata.trigAngle;
96 tgt.tgcForce := tdata.trigForce;
97 tgt.tgcResetVelocity := tdata.trigResetVelocity;
98 end;
99 TRIGGER_SCORE:
100 begin
101 tgt.tgcScoreAction := tdata.trigScoreAction;
102 tgt.tgcScoreCount := tdata.trigScoreCount;
103 tgt.tgcScoreTeam := tdata.trigScoreTeam;
104 tgt.tgcScoreCon := tdata.trigScoreCon;
105 tgt.tgcScoreMsg := tdata.trigScoreMsg;
106 end;
107 TRIGGER_MESSAGE:
108 begin
109 tgt.tgcKind := tdata.trigKind;
110 tgt.tgcMsgDest := tdata.trigMsgDest;
111 tgt.tgcText := tdata.trigText;
112 tgt.tgcMsgTime := tdata.trigMsgTime;
113 end;
114 TRIGGER_DAMAGE:
115 begin
116 tgt.tgcAmount := tdata.trigAmount;
117 tgt.tgcInterval := tdata.trigInterval;
118 end;
119 TRIGGER_HEALTH:
120 begin
121 tgt.tgcAmount := tdata.trigAmount;
122 tgt.tgcInterval := tdata.trigInterval;
123 tgt.tgcHealMax := tdata.trigHealMax;
124 tgt.tgcSilent := tdata.trigSilent;
125 end;
126 TRIGGER_SHOT:
127 begin
128 tgt.tgcTX := tdata.trigTX;
129 tgt.tgcTY := tdata.trigTY;
130 tgt.tgcShotType := tdata.trigShotType;
131 tgt.tgcShotTarget := tdata.trigShotTarget;
132 tgt.tgcQuiet := tdata.trigQuiet;
133 tgt.tgcAim := tdata.trigAim;
134 tgt.tgcSight := tdata.trigSight;
135 tgt.tgcAngle := tdata.trigAngle;
136 tgt.tgcWait := tdata.trigWait;
137 tgt.tgcAccuracy := tdata.trigAccuracy;
138 tgt.tgcAmmo := tdata.trigAmmo;
139 tgt.tgcReload := tdata.trigReload;
140 end;
141 TRIGGER_EFFECT:
142 begin
143 tgt.tgcFXCount := tdata.trigFXCount;
144 tgt.tgcFXType := tdata.trigFXType;
145 tgt.tgcFXSubType := tdata.trigFXSubType;
146 tgt.tgcFXRed := tdata.trigFXRed;
147 tgt.tgcFXGreen := tdata.trigFXGreen;
148 tgt.tgcFXBlue := tdata.trigFXBlue;
149 tgt.tgcFXPos := tdata.trigFXPos;
150 tgt.tgcWait := tdata.trigWait;
151 tgt.tgcVelX := tdata.trigVelX;
152 tgt.tgcVelY := tdata.trigVelY;
153 tgt.tgcSpreadL := tdata.trigSpreadL;
154 tgt.tgcSpreadR := tdata.trigSpreadR;
155 tgt.tgcSpreadU := tdata.trigSpreadU;
156 tgt.tgcSpreadD := tdata.trigSpreadD;
157 end;
158 end;
159 end;