?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #include "interpreter.c"
  2.  
  3. #define NOP_CMD 0
  4. #define JUST_STAR_CMD 1
  5. #define ENEMIES_PAIR_CMD 2
  6. #define MAKE_CARAVAN_CMD 3
  7. #define MAKE_LEFT_FLYERS_CMD 4
  8. #define MAKE_RIGHT_FLYERS_CMD 5
  9. #define MAKE_BOOM_FAIRY_CMD 6
  10. #define ENEMY_WAVE_CMD 7
  11. #define MID_BOSS1_CMD 8
  12. #define DOUBLE_CARAVAN_CMD 9
  13. #define MAKE_SHOOTING_STAR_CMD 10
  14. #define PUSH_NPC_CMD 11
  15. #define TRIANGLE_CMD 12
  16. #define MAKE_CORRIDOR_CMD 13
  17. #define TRIANGLE_HALF_CMD 14
  18. #define DROPPED_ENEMY_CMD 15
  19. #define FIRING_TRAP_CMD 16
  20. #define MID_BOSS2_CMD 17
  21. #define AIMED_SIDE_ENEMIES_CMD 18
  22. #define AIMED_CIRCLE_CMD 19
  23. #define MARISA_HELP_CMD 20
  24. #define SET_SPEED_CMD 21
  25. #define AIMED_SHOT_CMD 22
  26. #define END_CMD 255
  27.  
  28. #define u16tobytes(i) ((u16)i & 255), ((u16)i >> 8)
  29.  
  30. #define Nop(len)  NOP_CMD, len, 3
  31. #define JustStar(x, y, count)  JUST_STAR_CMD, count, 8,  1, u16tobytes(x), u16tobytes(y)
  32. #define MakeEnemiesPair(sprite, type, life) ENEMIES_PAIR_CMD, 16, 8, type, u16tobytes(sprite), u16tobytes(life)
  33. #define MakeCaravan(x, tile, type, hp, bonus) MAKE_CARAVAN_CMD, 36, 12, type, u16tobytes(x), u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  34. #define MakeLeftFlyers(y, tile, hp,  bonus) MAKE_LEFT_FLYERS_CMD, 7, 12, 10, u16tobytes(y), u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  35. #define MakeRightFlyers(y, tile, hp, bonus) MAKE_RIGHT_FLYERS_CMD, 7, 12, 10, u16tobytes(y), u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  36. #define MakeBoomFairy(x, hp, bonus) MAKE_BOOM_FAIRY_CMD, 12, 8, hp,  u16tobytes(x), u16tobytes(bonus)
  37. #define MakeEnemyWave(tile, type, hp) ENEMY_WAVE_CMD, 36, 8, type, u16tobytes(tile), u16tobytes(hp)
  38. #define MidBoss1(tile, hp) MID_BOSS1_CMD, 26, 8, 0, u16tobytes(tile), u16tobytes(hp)
  39. #define DoubleCaravan(tile, type, hp, bonus) DOUBLE_CARAVAN_CMD, 22, 10, type, u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  40. #define MakeShootingStar(x, y, tile, type, hp) MAKE_SHOOTING_STAR_CMD, 31, 12, type, u16tobytes(x), u16tobytes(y), u16tobytes(tile), u16tobytes(hp)
  41. #define PushNpc(x, y, dx, dy, tile, type, hp,  bonus) PUSH_NPC_CMD, 1, 18, type, u16tobytes(x), u16tobytes(y), u16tobytes(dx), u16tobytes(dy),  u16tobytes(tile),  u16tobytes(bonus), u16tobytes(hp)  
  42. #define Triangle(tile, hp, bonus) TRIANGLE_CMD, 26, 8, hp, u16tobytes(tile), u16tobytes(bonus)
  43. #define MakeCorridor(tile, type, hp, bonus) MAKE_CORRIDOR_CMD, 20, 10, type, u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  44. #define TriangleHalf(isLeft, tile, hp, bonus) TRIANGLE_HALF_CMD, 26, 10, isLeft, u16tobytes(tile), u16tobytes(hp), u16tobytes(bonus)
  45. #define DroppedEnemy(x, tile, hp) DROPPED_ENEMY_CMD, 1, 8, hp, u16tobytes(x), u16tobytes(tile)
  46. #define FiringTrap(tile) FIRING_TRAP_CMD, 86, 6, 0, u16tobytes(tile)
  47. #define MidBoss2(tile, hp) MID_BOSS2_CMD, 26, 8, 0, u16tobytes(tile), u16tobytes(hp)
  48. #define AimedSideEnemies(tile, hp, count) AIMED_SIDE_ENEMIES_CMD, 5 * count, 6, hp, u16tobytes(tile)
  49. #define AimedCircle(tile, hp, count) AIMED_CIRCLE_CMD, 10 * count, 6, hp, u16tobytes(tile)
  50. #define MarisaHelp MARISA_HELP_CMD, 15, 3
  51. #define SetNpcSpeed(type, dx, dy) SET_SPEED_CMD, 1, 8, type, u16tobytes(dx), u16tobytes(dy)
  52. #define AimedShoot(type, count) AIMED_SHOT_CMD, count, 4, type
  53. #define End END_CMD, 1, 1, 3