comparison pytouhou/vm/eclrunner.py @ 82:de48213a02bf

Fix a few things
author Thibaut Girka <thib@sitedethib.com>
date Sat, 03 Sep 2011 22:16:47 +0200
parents ffe2c2b9912c
children fc0294c745b6
comparison
equal deleted inserted replaced
81:f5f9b5eb69a3 82:de48213a02bf
419 def clear_screen_box(self): 419 def clear_screen_box(self):
420 self._enemy.screen_box = None 420 self._enemy.screen_box = None
421 421
422 422
423 @instruction(67) 423 @instruction(67)
424 def set_bullet_attributes1(self, bullet_anim, launch_anim, bullets_per_shot, 424 def set_bullet_attributes1(self, anim, sprite_idx_offset, bullets_per_shot,
425 number_of_shots, speed, speed2, launch_angle, 425 number_of_shots, speed, speed2, launch_angle,
426 angle, flags): 426 angle, flags):
427 self._enemy.set_bullet_attributes(67, bullet_anim, launch_anim, 427 self._enemy.set_bullet_attributes(67, anim,
428 self._getval(sprite_idx_offset),
428 self._getval(bullets_per_shot), 429 self._getval(bullets_per_shot),
429 self._getval(number_of_shots), 430 self._getval(number_of_shots),
430 self._getval(speed), 431 self._getval(speed),
431 self._getval(speed2), 432 self._getval(speed2),
432 self._getval(launch_angle), 433 self._getval(launch_angle),
433 self._getval(angle), 434 self._getval(angle),
434 flags) 435 flags)
435 436
436 437
437 @instruction(68) 438 @instruction(68)
438 def set_bullet_attributes2(self, bullet_anim, launch_anim, bullets_per_shot, 439 def set_bullet_attributes2(self, anim, sprite_idx_offset, bullets_per_shot,
439 number_of_shots, speed, speed2, launch_angle, 440 number_of_shots, speed, speed2, launch_angle,
440 angle, flags): 441 angle, flags):
441 self._enemy.set_bullet_attributes(68, bullet_anim, launch_anim, 442 self._enemy.set_bullet_attributes(68, anim,
443 self._getval(sprite_idx_offset),
442 self._getval(bullets_per_shot), 444 self._getval(bullets_per_shot),
443 self._getval(number_of_shots), 445 self._getval(number_of_shots),
444 self._getval(speed), 446 self._getval(speed),
445 self._getval(speed2), 447 self._getval(speed2),
446 self._getval(launch_angle), 448 self._getval(launch_angle),
447 self._getval(angle), 449 self._getval(angle),
448 flags) 450 flags)
449 451
450 452
451 @instruction(69) 453 @instruction(69)
452 def set_bullet_attributes3(self, bullet_anim, launch_anim, bullets_per_shot, 454 def set_bullet_attributes3(self, anim, sprite_idx_offset, bullets_per_shot,
453 number_of_shots, speed, speed2, launch_angle, 455 number_of_shots, speed, speed2, launch_angle,
454 angle, flags): 456 angle, flags):
455 self._enemy.set_bullet_attributes(69, bullet_anim, launch_anim, 457 self._enemy.set_bullet_attributes(69, anim,
458 self._getval(sprite_idx_offset),
456 self._getval(bullets_per_shot), 459 self._getval(bullets_per_shot),
457 self._getval(number_of_shots), 460 self._getval(number_of_shots),
458 self._getval(speed), 461 self._getval(speed),
459 self._getval(speed2), 462 self._getval(speed2),
460 self._getval(launch_angle), 463 self._getval(launch_angle),
461 self._getval(angle), 464 self._getval(angle),
462 flags) 465 flags)
463 466
464 467
465 @instruction(70) 468 @instruction(70)
466 def set_bullet_attributes4(self, bullet_anim, launch_anim, bullets_per_shot, 469 def set_bullet_attributes4(self, anim, sprite_idx_offset, bullets_per_shot,
467 number_of_shots, speed, speed2, launch_angle, 470 number_of_shots, speed, speed2, launch_angle,
468 angle, flags): 471 angle, flags):
469 self._enemy.set_bullet_attributes(67, bullet_anim, launch_anim, 472 self._enemy.set_bullet_attributes(70, anim,
473 self._getval(sprite_idx_offset),
470 self._getval(bullets_per_shot), 474 self._getval(bullets_per_shot),
471 self._getval(number_of_shots), 475 self._getval(number_of_shots),
472 self._getval(speed), 476 self._getval(speed),
473 self._getval(speed2), 477 self._getval(speed2),
474 self._getval(launch_angle), 478 self._getval(launch_angle),
475 self._getval(angle), 479 self._getval(angle),
476 flags) 480 flags)
477 481
478 482
479 @instruction(71) 483 @instruction(71)
480 def set_bullet_attributes5(self, bullet_anim, launch_anim, bullets_per_shot, 484 def set_bullet_attributes5(self, anim, sprite_idx_offset, bullets_per_shot,
481 number_of_shots, speed, speed2, launch_angle, 485 number_of_shots, speed, speed2, launch_angle,
482 angle, flags): 486 angle, flags):
483 self._enemy.set_bullet_attributes(71, bullet_anim, launch_anim, 487 self._enemy.set_bullet_attributes(71, anim,
488 self._getval(sprite_idx_offset),
484 self._getval(bullets_per_shot), 489 self._getval(bullets_per_shot),
485 self._getval(number_of_shots), 490 self._getval(number_of_shots),
486 self._getval(speed), 491 self._getval(speed),
487 self._getval(speed2), 492 self._getval(speed2),
488 self._getval(launch_angle), 493 self._getval(launch_angle),
489 self._getval(angle), 494 self._getval(angle),
490 flags) 495 flags)
491 496
492 497
493
494 @instruction(76) 498 @instruction(76)
495 def set_bullet_interval(self, value): 499 def set_bullet_interval(self, value):
496 self._enemy.bullet_launch_interval = value 500 self._enemy.bullet_launch_interval = value
497 501
498 502
499 @instruction(77) 503 @instruction(77)
500 def set_bullet_interval_ex(self, value): 504 def set_bullet_interval_ex(self, value):
501 self.set_bullet_interval(value) 505 self._enemy.bullet_launch_interval = value
502 #TODO: set counter to random() * bullet_launch_interval 506 self._enemy.bullet_launch_timer = int(self._game_state.prng.rand_double() * value) #TODO: check
503 507
504 508
505 @instruction(78) 509 @instruction(78)
506 def set_delay_attack(self): 510 def set_delay_attack(self):
507 self._enemy.delay_attack = True 511 self._enemy.delay_attack = True
626 630
627 631
628 @instruction(120) 632 @instruction(120)
629 def set_automatic_orientation(self, flags): 633 def set_automatic_orientation(self, flags):
630 #TODO: does it change anything else than the sprite's rotation? 634 #TODO: does it change anything else than the sprite's rotation?
631 self._enemy.automatic_orientation = bool(flags & 1) #TODO: name 635 self._enemy.automatic_orientation = bool(flags & 1)
632 636
633 637
634 @instruction(123) 638 @instruction(123)
635 def skip_frames(self, frames): 639 def skip_frames(self, frames):
636 #TODO: is that all? 640 #TODO: is that all?