NXEngine v1.0.0.5
[NXEngine.git] / object.h
blobae9fa0590300de22743d7cfafa78cc1d30c5bde4
2 #ifndef _OBJECT_H
3 #define _OBJECT_H
5 // used in SpawnXP
6 #define XP_SMALL_AMT 1
7 #define XP_MED_AMT 5
8 #define XP_LARGE_AMT 20
10 class Object
12 public:
13 virtual ~Object() { } // REQUIRED for subclasses (e.g. Player)
15 void SetType(int type);
16 void ChangeType(int type);
17 void BringToFront();
18 void PushBehind(Object *behind);
19 void PushBehind(int objtype);
21 // --------------------------------------- hit detection w/ map
23 uint32_t GetAttributes(const Point *pointlist, int npoints, int *tile = NULL);
25 bool CheckAttribute(const Point *pointlist, int npoints, uint32_t attrmask, \
26 int *tile_x = NULL, int *tile_y = NULL);
28 bool CheckSolidIntersect(Object *other, const Point *pointlist, int npoints);
30 // --------------------------------------- overridden convenience versions of above
32 bool CheckAttribute(SIFPointList *points, uint32_t attrmask, int *tile_x = NULL, int *tile_y = NULL)
34 return CheckAttribute(&points->point[0], points->count, attrmask, tile_x, tile_y);
37 uint32_t GetAttributes(SIFPointList *points, int *tile = NULL)
39 return GetAttributes(&points->point[0], points->count, tile);
42 bool CheckSolidIntersect(Object *other, SIFPointList *points)
44 return CheckSolidIntersect(other, &points->point[0], points->count);
47 // ---------------------------------------
49 void UpdateBlockStates(uint8_t updatemask);
50 void SetBlockForSolidBrick(uint8_t updatemask);
51 int GetBlockingType();
53 // ---------------------------------------
55 bool apply_xinertia(int inertia);
56 bool apply_yinertia(int inertia);
57 void PushPlayerOutOfWay(int xinertia, int yinertia);
58 void SnapToGround();
60 // ---------------------------------------
62 void DealDamage(int dmg, Object *shot = NULL);
63 void Kill();
64 void SpawnPowerups();
65 void SpawnXP(int amt);
67 // ---------------------------------------
69 void RunAI();
70 void DealContactDamage();
71 int GetAttackDirection();
73 void OnTick();
74 void OnAftermove();
75 void OnSpawn();
76 void OnDeath();
78 // ---------------------------------------
80 void animate_seq(int speed, const int *framelist, int nframes);
81 void CurlyTargetHere(int mintime = 80, int maxtime = 100);
82 void ResetClip();
83 void MoveAtDir(int dir, int speed);
85 // ---------------------------------------
87 void Delete(); // mark for deletion at end of frame
88 void Destroy(); // delete immediately
89 void DisconnectGamePointers();
91 // ---------------------------------------
93 int Width();
94 int Height();
96 int BBoxWidth();
97 int BBoxHeight();
99 int CenterX();
100 int CenterY();
102 int Left();
103 int Right();
104 int Top();
105 int Bottom();
107 int SolidLeft();
108 int SolidRight();
109 int SolidTop();
110 int SolidBottom();
112 int ActionPointX();
113 int ActionPointY();
114 int ActionPoint2X();
115 int ActionPoint2Y();
116 int DrawPointX();
117 int DrawPointY();
119 SIFSprite *Sprite();
121 // ---------------------------------------
123 int type; // object's type
124 int sprite; // sprite # to use with object
125 int frame; // frame of sprite to display
127 int x, y;
128 int xinertia, yinertia;
129 uint8_t dir;
131 int hp; // remaining health
132 int damage; // if != 0 does this much damage to player on touch
133 int state; // AI state
134 int substate; // state of current "common/shared" AI routine
135 int dirparam; // for ANP's that use the dir as an extra parameter: see tsc.cpp: SetCSDir
137 // if the object has FLAG_SOLID_BRICK set, this is how much damage it does to the
138 // player if it runs him into a wall or the ceiling/floor.
139 int smushdamage;
141 // for enemies' "shaking" effect when hurt
142 int shaketime;
143 int display_xoff;
145 // rising damage points
146 FloatText *DamageText;
147 // tracks amount of damage dealt quickly, while the objects is still shaking from
148 // previous shots. displaying this damage is postponed until the enemy stops shaking.
149 int DamageWaiting;
151 // for teleportation and other effects
152 bool clip_enable;
153 int clipx1, clipx2;
154 int clipy1, clipy2;
156 // for use by AI
157 int timer, timer2, timer3;
158 int animtimer;
159 int animframe;
160 int blinktimer;
161 int xmark, ymark;
162 int xmark2, ymark2;
163 uint8_t angle, angleoffset; // used for a few such as skullstep
164 int speed;
165 int savedhp;
167 uint32_t flags; // NPC flags (from .pxe)
168 uint32_t nxflags; // NXEngine-specific flags
169 uint16_t id1, id2; // object identifiers (from .pxe)
171 bool onscreen; // true if currently onscreen (lags 1 frame behind)
172 bool invisible; // if true the object will NOT be rendered (but still does collision checking)
174 // flags which are set if an object is touching a wall, ceiling, or floor
175 // they're addressable either by the array or individually.
176 #define BLOCKED_MAP 1
177 #define BLOCKED_OBJECT 2
178 union {
179 struct { uint8_t blockr, blockl, blocku, blockd; };
180 uint8_t block[4];
182 union {
183 struct { uint8_t lastblockr, lastblockl, lastblocku, lastblockd; };
184 uint8_t lastblock[4];
187 // if true, object has been deleted and should be freed before next tick
188 bool deleted;
190 // the dual-layered linked-list. one list is order of creation is the
191 // order AI routines are run in, the other is the z-order and is the
192 // order the objects are drawn in.
193 Object *prev, *next;
194 Object *lower, *higher;
196 Object *linkedobject;
198 // AI variables used for specific AI functions
199 union
201 // for player shots (not enemy shots)
202 struct
204 int ttl; // frames left till shot times out; sets range
205 int dir; // direction shot was fired in, LEFT RIGHT UP DOWN.
206 int damage; // damage dealt per hit
208 int btype; // bullet type
209 int level; // weapon level (0, 1, or 2)
211 // missile boom spawner used w/ player missiles
212 struct
214 int range;
215 int booms_left;
216 } boomspawner;
217 } shot;
219 struct
221 int bultype;
222 int nlayers;
223 int wave_amt;
224 } mgun;
226 struct
227 { // if 1 on an OBJ_CARRIED_OBJECT then object faces in OPPOSITE direction of carrier
228 bool flip;
229 } carry;
231 struct
233 int jumpheight, jumpgrav;
234 int falldmg;
235 bool canfly;
236 } critter;
238 struct
240 int blockedtime;
241 int reachptimer;
242 int tryjumptime;
243 int impjumptime;
244 uchar impjump;
245 uchar look;
246 int gunsprite;
247 int changedirtimer;
248 bool spawned_watershield;
249 } curly;
251 struct
253 bool left_ground;
254 } toro;
256 struct
258 Object *carried_by;
259 } sue;
261 struct
263 bool smoking;
264 int smoketimer;
265 } balrog;
267 struct
269 bool fireattack;
270 } igor;
272 struct
274 bool is_horizontal;
275 int x1, y1, x2, y2;
276 } hvt; // hvtrigger
278 struct
280 Object *layers[4];
281 } cloud;
286 inline int Object::Width() { return (sprites[this->sprite].w << CSF); }
287 inline int Object::Height() { return (sprites[this->sprite].h << CSF); }
289 inline int Object::BBoxWidth() { return (((sprites[this->sprite].bbox.x2 - sprites[this->sprite].bbox.x1) + 1) << CSF); }
290 inline int Object::BBoxHeight() { return (((sprites[this->sprite].bbox.y2 - sprites[this->sprite].bbox.y1) + 1) << CSF); }
292 inline int Object::CenterX() { return (this->x + (Width() / 2)) - DrawPointX(); }
293 inline int Object::CenterY() { return (this->y + (Height() / 2)) - DrawPointY(); }
295 inline int Object::Left() { return (this->x + (sprites[this->sprite].bbox.x1 << CSF)); }
296 inline int Object::Right() { return (this->x + (sprites[this->sprite].bbox.x2 << CSF)); }
297 inline int Object::Top() { return (this->y + (sprites[this->sprite].bbox.y1 << CSF)); }
298 inline int Object::Bottom() { return (this->y + (sprites[this->sprite].bbox.y2 << CSF)); }
300 inline int Object::SolidLeft() { return (this->x + (sprites[this->sprite].solidbox.x1 << CSF)); }
301 inline int Object::SolidRight() { return (this->x + (sprites[this->sprite].solidbox.x2 << CSF)); }
302 inline int Object::SolidTop() { return (this->y + (sprites[this->sprite].solidbox.y1 << CSF)); }
303 inline int Object::SolidBottom() { return (this->y + (sprites[this->sprite].solidbox.y2 << CSF)); }
305 inline int Object::ActionPointX() { return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.x << CSF)); }
306 inline int Object::ActionPointY() { return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.y << CSF)); }
307 inline int Object::ActionPoint2X() { return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.x << CSF)); }
308 inline int Object::ActionPoint2Y() { return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.y << CSF)); }
310 inline int Object::DrawPointX() { return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.x << CSF); }
311 inline int Object::DrawPointY() { return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.y << CSF); }
313 inline SIFSprite *Object::Sprite() { return &sprites[this->sprite]; }
316 // game objects
318 #define OBJ_NULL 0
320 #define OBJ_XP 1
321 #define OBJ_BEHEMOTH 2
322 #define OBJ_SMOKE_CLOUD 4
323 #define OBJ_CRITTER_HOPPING_GREEN 5
324 #define OBJ_BEETLE_GREEN 6
325 #define OBJ_BASIL 7
326 #define OBJ_BEETLE_FREEFLY 8
327 #define OBJ_BALROG_DROP_IN 9
328 #define OBJ_IGOR_SHOT 11
329 #define OBJ_BALROG 12
330 #define OBJ_FORCEFIELD 13
331 #define OBJ_SANTAS_KEY 14
332 #define OBJ_CHEST_CLOSED 15
333 #define OBJ_SAVE_POINT 16
334 #define OBJ_RECHARGE 17
335 #define OBJ_DOOR 18
336 #define OBJ_BALROG_BUST_IN 19
337 #define OBJ_COMPUTER 20
338 #define OBJ_CHEST_OPEN 21
339 #define OBJ_TELEPORTER 22
340 #define OBJ_TELEPORTER_LIGHTS 23
341 #define OBJ_POWER_CRITTER 24
342 #define OBJ_EGG_ELEVATOR 25 // lift platform in Egg Observation Room
343 #define OBJ_BAT_CIRCLE 26
344 #define OBJ_BIG_SPIKE 27
345 #define OBJ_CRITTER_FLYING 28 // cyan critters from grasstown
346 #define OBJ_CHTHULU 29
347 #define OBJ_HERMIT_GUNSMITH 30
348 #define OBJ_BAT_HANG 31
349 #define OBJ_LIFE_CAPSULE 32
350 #define OBJ_BALROG_SHOT_BOUNCE 33
351 #define OBJ_BED 34
352 #define OBJ_MANNAN 35
353 #define OBJ_BALROG_BOSS_FLYING 36
354 #define OBJ_SIGNPOST 37
355 #define OBJ_FIREPLACE 38
356 #define OBJ_SAVE_SIGN 39
357 #define OBJ_SANTA 40 // NPC Santa
358 #define OBJ_DOOR_BUSTED 41 // door of shack after balrog breaks it
359 #define OBJ_SUE 42
360 #define OBJ_CHALKBOARD 43
361 #define OBJ_POLISH 44
362 #define OBJ_POLISHBABY 45
363 #define OBJ_HVTRIGGER 46
364 #define OBJ_SANDCROC 47
365 #define OBJ_SKULLHEAD 49
366 #define OBJ_SKELETON_SHOT 50 // bones fired by skullhead_carried & skeleton
367 #define OBJ_CROWWITHSKULL 51
368 #define OBJ_BLUE_ROBOT_SITTING 52
369 #define OBJ_SKULLSTEP_FOOT 53
370 #define OBJ_SKULLSTEP 54
371 #define OBJ_KAZUMA 55
372 #define OBJ_BEETLE_BROWN 56
373 #define OBJ_CROW 57
374 #define OBJ_GIANT_BEETLE 58 // Basu
375 #define OBJ_DOOR_ENEMY 59 // attacking exit door from First Cave
376 #define OBJ_TOROKO 60
377 #define OBJ_KING 61
378 #define OBJ_KAZUMA_AT_COMPUTER 62
379 #define OBJ_TOROKO_SHACK 63 // scared toroko attacking in Shack
380 #define OBJ_CRITTER_HOPPING_BLUE 64 // from First Cave
381 #define OBJ_BAT_BLUE 65 // from First Cave
382 #define OBJ_MISERYS_BUBBLE 66 // misery's bubble that takes Toroko away in Shack
383 #define OBJ_MISERY_FLOAT 67
384 #define OBJ_BALROG_BOSS_RUNNING 68
385 #define OBJ_MUSHROOM_ENEMY 69
386 #define OBJ_HIDDEN_SPARKLE 70
387 #define OBJ_CHINFISH 71
388 #define OBJ_SPRINKLER 72
389 #define OBJ_WATER_DROPLET 73
390 #define OBJ_JACK 74 // guards cemetary door in Village
391 #define OBJ_KANPACHI_FISHING 75
392 #define OBJ_YAMASHITA_FLOWERS 76 // flowers grown in Yamashita Farm
393 #define OBJ_YAMASHITA_PAVILION 77 // Sandaime's Pavilion from Yamashita Farm
394 #define OBJ_POT 78
395 #define OBJ_MAHIN 79 // from village
396 #define OBJ_GRAVEKEEPER 80 // man with knife in Mimiga Graveyard
397 #define OBJ_GIANT_MUSHROOM_ENEMY 81
398 #define OBJ_MISERY_STAND 82
399 #define OBJ_NPC_IGOR 83
400 #define OBJ_GIANT_BEETLE_SHOT 84
401 #define OBJ_TERMINAL 85
402 #define OBJ_MISSILE 86
403 #define OBJ_HEART 87
404 #define OBJ_BOSS_IGOR 88
405 #define OBJ_BOSS_IGOR_DEFEATED 89
406 #define OBJ_CAGE 91
407 #define OBJ_SUE_AT_COMPUTER 92
408 #define OBJ_CHACO 93
409 #define OBJ_GIANT_JELLY 94
410 #define OBJ_JELLY 95
411 #define OBJ_FAN_LEFT 96
412 #define OBJ_FAN_UP 97
413 #define OBJ_FAN_RIGHT 98
414 #define OBJ_FAN_DOWN 99
415 #define OBJ_GRATE 100
416 #define OBJ_POWERCOMP 101
417 #define OBJ_POWERSINE 102
418 #define OBJ_MANNAN_SHOT 103
419 #define OBJ_FROG 104
420 #define OBJ_HEY 105 // "Hey!" balloon
421 #define OBJ_HEY_SPAWNER 106 // creates "Hey!" ballons
422 #define OBJ_MALCO 107
423 #define OBJ_BALFROG_SHOT 108
424 #define OBJ_MALCO_BROKEN 109
425 #define OBJ_MINIFROG 110
426 #define OBJ_PTELOUT 111 // player teleporting out (using teleporter)
427 #define OBJ_PTELIN 112 // player teleporting in (using teleporter)
428 #define OBJ_PROFESSOR_BOOSTER 113
429 #define OBJ_PRESS 114
430 #define OBJ_FRENZIED_MIMIGA 115
431 #define OBJ_RED_PETALS 116 // scattered around beds
432 #define OBJ_CURLY 117 // curly (npc)
433 #define OBJ_CURLY_BOSS 118 // curly (boss)
434 #define OBJ_TABLECHAIRS 119 // table & chairs
435 #define OBJ_MIMIGAC1 120 // curly's mimigas
436 #define OBJ_MIMIGAC2 121 // curly's mimigas
437 #define OBJ_MIMIGAC_ENEMY 122 // fighting mimigas during 1st boss fight in sand zone
438 #define OBJ_CURLYBOSS_SHOT 123
439 #define OBJ_SUNSTONE 124
440 #define OBJ_HIDDEN_POWERUP 125
441 #define OBJ_PUPPY_RUN 126
442 #define OBJ_PUPPY_WAG 130
443 #define OBJ_PUPPY_SLEEP 131
444 #define OBJ_PUPPY_BARK 132
445 #define OBJ_JENKA 133
446 #define OBJ_ARMADILLO 134
447 #define OBJ_SKELETON 135
448 #define OBJ_PUPPY_CARRY 136
449 #define OBJ_LARGEDOOR_FRAME 137
450 #define OBJ_LARGEDOOR 138
451 #define OBJ_DOCTOR 139
452 #define OBJ_TOROKO_FRENZIED 140
453 #define OBJ_TOROKO_BLOCK 141
454 #define OBJ_TOROKO_FLOWER 142
455 #define OBJ_JENKA_COLLAPSED 143
456 #define OBJ_TOROKO_TELEPORT_IN 144
457 #define OBJ_KINGS_SWORD 145 // sticks to linkedobject
458 #define OBJ_LIGHTNING 146
459 #define OBJ_CRITTER_SHOOTING_PURPLE 147
460 #define OBJ_CRITTER_SHOT 148
461 #define OBJ_BLOCK_MOVEH 149
462 #define OBJ_NPC_PLAYER 150 // the player as an NPC in cutscenes
463 #define OBJ_BLUE_ROBOT 151
464 #define OBJ_SHUTTER_STUCK 152
465 #define OBJ_GAUDI 153
466 #define OBJ_GAUDI_DYING 154
467 #define OBJ_GAUDI_FLYING 155
468 #define OBJ_GAUDI_FLYING_SHOT 156
469 #define OBJ_BLOCK_MOVEV 157
470 #define OBJ_X_FISHY_MISSILE 158 // homing fish projectiles fired by Monster X
471 #define OBJ_X_DEFEATED 159 // cat that falls out after defeating X
472 #define OBJ_POOH_BLACK 160 // clinic ghost
473 #define OBJ_POOH_BLACK_BUBBLE 161
474 #define OBJ_POOH_BLACK_DYING 162
475 #define OBJ_DR_GERO 163 // from labyrinth clinic
476 #define OBJ_NURSE_HASUMI 164 // from labyrinth clinic
477 #define OBJ_CURLY_COLLAPSED 165
478 #define OBJ_GAUDI_SHOPKEEP 166 // aka Chaba, at table in labyrinth shop
479 #define OBJ_BOOSTER_FALLING 167 // professor booster falling after Labyrinth
480 #define OBJ_BOULDER 168 // large boulder in the Boulder Chamber
481 #define OBJ_BALROG_BOSS_MISSILES 169 // balrog boss in Boulder Chamber
482 #define OBJ_BALROG_MISSILE 170
483 #define OBJ_FIREWHIRR 171
484 #define OBJ_FIREWHIRR_SHOT 172
485 #define OBJ_GAUDI_ARMORED 173
486 #define OBJ_GAUDI_ARMORED_SHOT 174
487 #define OBJ_GAUDI_EGG 175
488 #define OBJ_BUYOBUYO_BASE 176
489 #define OBJ_BUYOBUYO 177
490 #define OBJ_MINICORE_SHOT 178
491 #define OBJ_CORE_GHOSTIE 179
492 #define OBJ_CURLY_AI 180
493 #define OBJ_CAI_GUN 181
494 #define OBJ_CAI_MGUN 182
495 #define OBJ_CAI_WATERSHIELD 183
496 #define OBJ_SHUTTER_BIG 184
497 #define OBJ_SHUTTER 185
498 #define OBJ_ALMOND_LIFT 186
499 #define OBJ_FUZZ_CORE 187
500 #define OBJ_FUZZ 188
501 #define OBJ_ALMOND_ROBOT 190
502 #define OBJ_WATERLEVEL 191 // controls water level in Almond
503 #define OBJ_MOTORBIKE 192
504 #define OBJ_MOTORBIKE_BROKEN 193
505 #define OBJ_BLUE_ROBOT_REMAINS 194
506 #define OBJ_GRATING 195
507 #define OBJ_MOTION_WALL 196 // top & bottom wall during Ironhead battle
508 #define OBJ_IRONH_FISHY 197 // fishies in IronH battle
509 #define OBJ_IRONH_SHOT 198
510 #define OBJ_FAN_DROPLET 199 // air or water current (from fans and Waterway)
511 #define OBJ_DRAGON_ZOMBIE 200
512 #define OBJ_DRAGON_ZOMBIE_DEAD 201
513 #define OBJ_DRAGON_ZOMBIE_SHOT 202
514 #define OBJ_CRITTER_HOPPING_AQUA 203
515 #define OBJ_FALLING_SPIKE_SMALL 204
516 #define OBJ_FALLING_SPIKE_LARGE 205
517 #define OBJ_COUNTER_BOMB 206
518 #define OBJ_COUNTER_BOMB_NUMBER 207
519 #define OBJ_GIANT_BEETLE_2 208
520 #define OBJ_BEETLE_FREEFLY_2 210
521 #define OBJ_SPIKE_SMALL 211
522 #define OBJ_SKY_DRAGON 212 // kazuma's nice dragon (npc)
523 #define OBJ_NIGHT_SPIRIT 213
524 #define OBJ_NIGHT_SPIRIT_SHOT 214
525 #define OBJ_SANDCROC_OSIDE 215 // from outer wall
526 #define OBJ_PIXEL_CAT 216 // hidden pixel the cat from oside aka "debug kitty"
527 #define OBJ_ITOH 217
528 #define OBJ_CORE_BLAST 218
529 #define OBJ_BUBBLE_SPAWNER 219
530 #define OBJ_MIMIGA_FARMER_STANDING 220 // from plantation, doesn't move
531 #define OBJ_MIMIGA_FARMER_WALKING 221 // from plantation, walks back and forth
532 #define OBJ_JAIL_GRATING 222
533 #define OBJ_MOMORIN 223
534 #define OBJ_CHIE 224 // plantation lounge
535 #define OBJ_MEGANE 225 // plantation lounge (you give him the sprinkler)
536 #define OBJ_KANPACHI_STANDING 226 // standing version, plantation lounge
537 #define OBJ_BUCKET 227 // kanpachi's fishing bucket
538 #define OBJ_DROLL_GUARD 228 // droll that stomps you in Teleporter Room
539 #define OBJ_RED_FLOWERS_SPROUTS 229
540 #define OBJ_RED_FLOWERS_BLOOMING 230
541 #define OBJ_ROCKET 231 // ...that you ride up to Last Cave
542 #define OBJ_ORANGEBELL 232 // bat swarm from Plantation
543 #define OBJ_ORANGEBELL_BABY 233
544 #define OBJ_RED_FLOWERS_PICKED 234
545 #define OBJ_FLOWERS_PENS1 234 // picked red flowers in lower-right corner of Arthur's House
546 #define OBJ_MIDORIN 235
547 #define OBJ_GUNFISH 236
548 #define OBJ_GUNFISH_SHOT 237
549 #define OBJ_PROXIMITY_PRESS_HOZ 238 // horizontal-moving presses along rocket path
550 #define OBJ_MIMIGA_CAGE 239
551 #define OBJ_MIMIGA_JAILED 240 // mimigas in jail2
552 #define OBJ_CRITTER_HOPPING_RED 241
553 #define OBJ_RED_BAT 242
554 #define OBJ_RED_BAT_SPAWNER 243
555 #define OBJ_LAVA_DRIP 244
556 #define OBJ_LAVA_DRIP_SPAWNER 245 // for example at entrance to last cave (hidden)
557 #define OBJ_PROXIMITY_PRESS_VERT 246
558 #define OBJ_BOSS_MISERY 247
559 #define OBJ_MISERY_SHOT 248
560 #define OBJ_MISERY_PHASE 249 // 2 used in teleport effect
561 #define OBJ_MISERY_BALL 250
562 #define OBJ_BLACK_LIGHTNING 251
563 #define OBJ_MISERY_RING 252
564 #define OBJ_XP_CAPSULE 253
565 #define OBJ_HELICOPTER 254 // Balcony helicopter
566 #define OBJ_HELICOPTER_BLADE 255
567 #define OBJ_DOCTOR_CROWNED 256
568 #define OBJ_RED_CRYSTAL 257
569 #define OBJ_MIMIGA_SLEEPING 258 // plantation lounge
570 #define OBJ_CURLY_CARRIED 259 // curly being carried via Tow Rope
571 #define OBJ_MIMIGA_CAGED 260 // from Kings Table
572 #define OBJ_CHIE_CAGED 261 // from Kings Table
573 #define OBJ_CHACO_CAGED 262 // from Kings Table
574 #define OBJ_BOSS_DOCTOR 263
575 #define OBJ_DOCTOR_SHOT 264 // wave shot
576 #define OBJ_DOCTOR_SHOT_TRAIL 265
577 #define OBJ_DOCTOR_BLAST 266 // his explosion of red bouncy shots
578 #define OBJ_BOSS_DOCTOR_FRENZIED 267 // Muscle Doctor
579 #define OBJ_IGOR_BALCONY 268 // "igor"-like big Ravil on Balcony
580 #define OBJ_DOCTOR_BAT 269 // orange bats spawned by Doctor 2
581 #define OBJ_RED_ENERGY 270 // used by Doctor 2 and Undead Core cutscene
582 #define OBJ_IRONH_BRICK 271
583 #define OBJ_BRICK_SPAWNER 272
584 #define OBJ_DROLL_SHOT 273
585 #define OBJ_DROLL 274
586 #define OBJ_PUPPY_ITEMS 275 // wagging puppy such as that gives you life capsule
587 #define OBJ_RED_DEMON 276 // middle-boss in Last Cave Hidden
588 #define OBJ_RED_DEMON_SHOT 277
589 #define OBJ_LITTLE_FAMILY 278 // Little Man, and also used for his family
590 #define OBJ_FALLING_BLOCK 279 // from Misery and Hell B1
591 #define OBJ_SUE_TELEPORT_IN 280
592 #define OBJ_DOCTOR_GHOST 281 // doctor as red energy
593 #define OBJ_UDMINI_PLATFORM 282 // undead minicore (platforms)
594 #define OBJ_MISERY_FRENZIED 283 // for Final Battle transformed by DOCTOR_GHOST
595 #define OBJ_SUE_FRENZIED 284 // for Final Battle transformed by DOCTOR_GHOST
596 #define OBJ_UD_SPINNER 285
597 #define OBJ_UD_SPINNER_TRAIL 286
598 #define OBJ_UD_SMOKE 287
599 #define OBJ_UD_PELLET 288 // undead core pellet/rock shot
600 #define OBJ_MISERY_CRITTER 289
601 #define OBJ_MISERY_BAT 290
602 #define OBJ_UD_MINICORE_IDLE 291
603 #define OBJ_QUAKE 292
604 #define OBJ_UD_BLAST 293
605 #define OBJ_FALLING_BLOCK_SPAWNER 294
606 #define OBJ_CLOUD 295
607 #define OBJ_CLOUD_SPAWNER 296 // clouds from prtFall (ending sequence)
608 #define OBJ_INTRO_DOCTOR 298 // from intro
609 #define OBJ_INTRO_KINGS 299 // balrog/misery in bubble (from intro)
610 #define OBJ_INTRO_CROWN 300 // Demon Crown (from intro)
611 #define OBJ_MISERY_MISSILE 301
612 #define OBJ_SCROLL_CONTROLLER 302 // <FON on it and you can do various tricks with controlling the scrolling
613 #define OBJ_SANTA_CAGED 307 // from Kings Table
614 #define OBJ_GAUDI_PATIENT 304 // credits
615 #define OBJ_BABY_PUPPY 305 // credits
616 #define OBJ_BALROG_MEDIC 306 // credits
617 #define OBJ_STUMPY 308
618 #define OBJ_BUTE_FLYING 309
619 #define OBJ_BUTE_SWORD 310
620 #define OBJ_BUTE_ARCHER 311
621 #define OBJ_BUTE_ARROW 312
622 #define OBJ_MA_PIGNON 313
623 #define OBJ_MA_PIGNON_ROCK 314
624 #define OBJ_MA_PIGNON_CLONE 315
625 #define OBJ_BUTE_DYING 316
626 #define OBJ_MESA 317
627 #define OBJ_MESA_DYING 318
628 #define OBJ_MESA_BLOCK 319
629 #define OBJ_CURLY_CARRIED_SHOOTING 320
630 #define OBJ_CCS_GUN 321 // OBJ_CURLY_CARRIED_SHOOTING: her gun
631 #define OBJ_DELEET 322
632 #define OBJ_BUTE_FALLING 323
633 #define OBJ_BUTE_SPAWNER 324
634 #define OBJ_HP_LIGHTNING 325 // lightning shot & charging from Heavy Press
635 #define OBJ_TURNING_HUMAN 326 // Itoh/Sue turning human (credits)
636 #define OBJ_AHCHOO 327
637 #define OBJ_TRANSMOGRIFIER 328 // credits
638 #define OBJ_BUILDING_FAN 329 // credits
639 #define OBJ_ROLLING 330
640 #define OBJ_BALLOS_BONE 331
641 #define OBJ_BALLOS_BONE_SPAWNER 332
642 #define OBJ_BALLOS_TARGET 333
643 #define OBJ_STRAINING 334 // "straining" effect used in Boulder Chamber cutscene
644 #define OBJ_IKACHAN 335
645 #define OBJ_IKACHAN_SPAWNER 336
646 #define OBJ_NUMAHACHI 337 // in Plantation version of Statue Room
647 #define OBJ_GREEN_DEVIL 338
648 #define OBJ_GREEN_DEVIL_SPAWNER 339
649 #define OBJ_BALLOS_PRIEST 340 // form #1 in Seal Chamber
650 #define OBJ_BALLOS_SMILE 341 // his closed face that smiles at start of battle
651 #define OBJ_BALLOS_ROTATOR 342 // 3rd/4th form spiky rotators
652 #define OBJ_BALLOS_BODY_2 343 // time-limited body?
653 #define OBJ_BALLOS_EYE_2 344 // time-limited closed eyes?
654 #define OBJ_BALLOS_SKULL 345 // falling skulls during 3rd form
655 #define OBJ_BALLOS_PLATFORM 346 // platforms for 4th form
656 #define OBJ_HOPPY 347
657 #define OBJ_BALLOS_SPIKES 348
658 #define OBJ_STATUE_BASE 349 // statues in Statue Room (actionable base)
659 #define OBJ_BUTE_ARCHER_RED 350
660 #define OBJ_STATUE 351 // statues in Statue Room
661 #define OBJ_THE_CAST 352 // friends that surround player at end of credits
662 #define OBJ_BUTE_SWORD_RED 353
663 #define OBJ_WALL_COLLAPSER 354 // post-Ballos cutscene
664 #define OBJ_BALROG_PASSENGER 355 // Player/Curly when rescued from Seal Chamber by Balrog
665 #define OBJ_BALROG_FLYING 356 // best-ending flying-in-clouds cutscene
666 #define OBJ_PUPPY_GHOST 357 // Ballos's dog in Corridor/ostep
667 #define OBJ_MISERY_WIND 358 // seen in best-ending credits
668 #define OBJ_DROPLET_SPAWNER 359 // spawns small falling water drips from e.g. resevoir
669 #define OBJ_THANK_YOU 360 // credits
670 #define OBJ_BALFROG 363
672 // NXEngine defined objects --
673 #define OBJ_PLAYER 400
674 #define OBJ_HEART3 401 // i'm sure there must be...
675 #define OBJ_MISSILE3 402 // ...a real object number for these???
676 #define OBJ_LAVA_DROPLET 403 // don't know real objnum for this either
678 #define OBJ_SKULLHEAD_CARRIED 404 // skullhead when carried by a crow
679 #define OBJ_BBOX_PUPPET 405 // used to form non-square/irregular bboxes
680 #define OBJ_SMOKE_DROPPER 406 // used by CMP script command
682 // Core (Almond)
683 #define OBJ_CORE_CONTROLLER 410
684 #define OBJ_CORE_FRONT 411
685 #define OBJ_CORE_BACK 412
686 #define OBJ_CORE_MARKER 413
687 #define OBJ_MINICORE 414
690 // player bullets
691 #define OBJ_SHOTS_START 420
693 #define OBJ_POLAR_SHOT 420 // polar-star type player shot (or machine gun L1)
694 #define OBJ_MGUN_SPAWNER 421 // object dropped by MGun that handles firing it
695 #define OBJ_MGUN_LEADER 422 // leading "layer" of Machine Gun L2 & 3
696 #define OBJ_MGUN_TRAIL 423 // "tail" of Machine Gun L2 & 3
697 #define OBJ_MGUN_L1_SHOT 424 // level 1 machine gun, AI identical to polar star
698 #define OBJ_MISSILE_SHOT 425 // missile fired by Missile Launcher
699 #define OBJ_SUPERMISSILE_SHOT 426 // missile fired by Super Missile Launcher
700 #define OBJ_MISSILE_BOOM_SPAWNER 427 // spawns boomflashes for missile launcher
701 #define OBJ_FIREBALL1 428
702 #define OBJ_FIREBALL23 429
703 #define OBJ_FIREBALL_TRAIL 430
704 #define OBJ_BLADE12_SHOT 431
705 #define OBJ_BLADE3_SHOT 432
706 #define OBJ_BLADE_SLASH 433
707 #define OBJ_SNAKE1_SHOT 434
708 #define OBJ_SNAKE23_SHOT 435
709 #define OBJ_SNAKE_TRAIL 436
710 #define OBJ_NEMESIS_SHOT 437
711 #define OBJ_NEMESIS_SHOT_CURLY 438 // for counting her shots separately in Hell
712 #define OBJ_BUBBLER12_SHOT 439
713 #define OBJ_BUBBLER3_SHOT 440
714 #define OBJ_BUBBLER_SHARP 441 // sharp-looking "launched" shot from Bubbler L3
715 #define OBJ_SPUR_SHOT 442
716 #define OBJ_SPUR_TRAIL 443
717 #define OBJ_WHIMSICAL_STAR 444
719 #define OBJ_SHOTS_END 449
722 #define OBJ_OMEGA_BODY 450
723 #define OBJ_OMEGA_LEG 451
724 #define OBJ_OMEGA_STRUT 452
725 #define OBJ_OMEGA_SHOT 453
727 #define OBJ_IRONH 455
729 // Monster X
730 #define OBJ_X_MAINOBJECT 460
731 #define OBJ_X_BODY 461
732 #define OBJ_X_TREAD 462
733 #define OBJ_X_INTERNALS 463
734 #define OBJ_X_DOOR 464
735 #define OBJ_X_TARGET 465
736 #define OBJ_X_FISHY_SPAWNER 466
738 #define OBJ_SISTERS_HEAD 470
739 #define OBJ_SISTERS_BODY 471
740 #define OBJ_SISTERS_MAIN 472
742 #define OBJ_UDCORE_MAIN 480
743 #define OBJ_UDCORE_FRONT 481
744 #define OBJ_UDCORE_BACK 482
745 #define OBJ_UDCORE_FACE 483
746 #define OBJ_UDMINI_ROTATOR 484
747 #define OBJ_UDMINI_BBOX 485
749 #define OBJ_HEAVY_PRESS 490
750 #define OBJ_HEAVY_PRESS_SHIELD 491
752 #define OBJ_BALLOS_MAIN 500
753 #define OBJ_BALLOS_BODY 501
754 #define OBJ_BALLOS_EYE 502
756 #define OBJ_LAST 512
759 #endif