DEADSOFTWARE

do not show message box in headless mode
[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 tgt.tgcKind := tdata.trigKind;
119 end;
120 TRIGGER_HEALTH:
121 begin
122 tgt.tgcAmount := tdata.trigAmount;
123 tgt.tgcInterval := tdata.trigInterval;
124 tgt.tgcHealMax := tdata.trigHealMax;
125 tgt.tgcSilent := tdata.trigSilent;
126 end;
127 TRIGGER_SHOT:
128 begin
129 tgt.tgcTX := tdata.trigTX;
130 tgt.tgcTY := tdata.trigTY;
131 tgt.tgcShotType := tdata.trigShotType;
132 tgt.tgcShotTarget := tdata.trigShotTarget;
133 tgt.tgcShotSound := tdata.trigShotSound;
134 tgt.tgcAim := tdata.trigAim;
135 tgt.tgcSight := tdata.trigSight;
136 tgt.tgcAngle := tdata.trigAngle;
137 tgt.tgcWait := tdata.trigWait;
138 tgt.tgcAccuracy := tdata.trigAccuracy;
139 tgt.tgcAmmo := tdata.trigAmmo;
140 tgt.tgcReload := tdata.trigReload;
141 end;
142 TRIGGER_EFFECT:
143 begin
144 tgt.tgcFXCount := tdata.trigFXCount;
145 tgt.tgcFXType := tdata.trigFXType;
146 tgt.tgcFXSubType := tdata.trigFXSubType;
147 tgt.tgcFXRed := tdata.trigFXRed;
148 tgt.tgcFXGreen := tdata.trigFXGreen;
149 tgt.tgcFXBlue := tdata.trigFXBlue;
150 tgt.tgcFXPos := tdata.trigFXPos;
151 tgt.tgcWait := tdata.trigWait;
152 tgt.tgcVelX := tdata.trigVelX;
153 tgt.tgcVelY := tdata.trigVelY;
154 tgt.tgcSpreadL := tdata.trigSpreadL;
155 tgt.tgcSpreadR := tdata.trigSpreadR;
156 tgt.tgcSpreadU := tdata.trigSpreadU;
157 tgt.tgcSpreadD := tdata.trigSpreadD;
158 end;
159 end;
160 end;