Mercurial > touhou
comparison src/th06/ecl_vm.rs @ 659:53786d834444
Yet more ecl.
author | Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com> |
---|---|
date | Fri, 09 Aug 2019 04:25:43 +0200 |
parents | 6b4d2b405442 |
children | 31fc0d881105 |
comparison
equal
deleted
inserted
replaced
658:3a9d82a02c88 | 659:53786d834444 |
---|---|
211 Instruction::CallIfInferiorOrEqual(sub, param1, param2, a, b) { | 211 Instruction::CallIfInferiorOrEqual(sub, param1, param2, a, b) { |
212 if(self._getval(a) <= self._getval(b)) { | 212 if(self._getval(a) <= self._getval(b)) { |
213 Instruction::Call(sub, param1, param2); | 213 Instruction::Call(sub, param1, param2); |
214 } | 214 } |
215 } | 215 } |
216 | 216 // 43 |
217 | 217 Instruction::SetPos(x, y, z) { |
218 | 218 self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z)); |
219 | 219 } |
220 | 220 // 44 |
221 | 221 Instruction::SetPosInterlacing(x, y, z) { |
222 | 222 //TODO: almost the same as setpos, except with 3 different values and sets the |
223 | 223 //interlacing, should double check |
224 | 224 self._enemy.set_pos(self._getval(x), self._getval(y), self._getval(z)); |
225 | 225 } |
226 // 45 | |
227 Instruction::SetAngleSpeed(angle, speed) { | |
228 self._enemy.update_mode = 0; | |
229 self._enemy.angle, self._enemy.speed = self._getval(angle), self._getval(speed); | |
230 } | |
231 // 46 | |
232 Instruction::SetRotationSpeed(speed) { | |
233 self._enemy.update_mode = 0 | |
234 self._enemy.rotation_speed = self._getval(speed) | |
235 } | |
236 // 47 | |
237 Instruction::SetSpeed(speed) { | |
238 self._enemy.update_mode = 0 | |
239 self._enemy.speed = self._getval(speed) | |
240 } | |
241 // 48 | |
242 Instruction::SetAcceleration(acceleration) { | |
243 self._enemy.update_mode = 0 | |
244 self._enemy.acceleration = self._getval(acceleration) | |
245 } | |
246 // 49 | |
247 Instruction::SetRandomAngle(min_angle, max_angle) { | |
248 angle = self._game.prng.rand_double() * (max_angle - min_angle) + min_angle | |
249 self._enemy.angle = angle | |
250 } | |
251 | |
252 // 83 -> star items >>> life items | |
253 | |
254 | |
255 | |
256 | |
257 | |
258 | |
259 | |
260 | |
261 | |
262 |