Advertisement
ZoriaRPG

std_constants.zh for ZC 2.55

Nov 25th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 70.81 KB | None | 0 0
  1. // std_constants.zh for ZC v2.50.2 and later.
  2. // 13-JUNE-2016
  3. // Contains required constants for std.zh and ZScript functions.
  4.  
  5.  
  6. ///////////////////////
  7. /// Mathematical values
  8.  
  9. const float PI              = 3.1416;
  10. const float PI2             = 6.2832;
  11. const float E               = 2.7183;
  12.  
  13. const int NULL              = 0;
  14.  
  15. const int RADIAN            = 57.2958; //Multiplication value for converting degrees to radians.
  16. const float DEGREE          = 0.0174; //Multiplication value for converting radians to degrees.
  17.  
  18. const int SQRT_ERROR            = 464; // The return value of SafeSqrt() if a negative value is passed.
  19. const float SQRT_MAX            = 463.4095; //The largest square root thet ZC can return.
  20. //const int DIAGONAL            =
  21.  
  22. ////////////////////////////
  23. /// ZC Minimums and Maximums
  24.  
  25. const float MAX_CONSTANT        = 214747.9999;
  26. const float MAX_FLOAT           = 214747.9999;
  27. //const float MAX_VARIABLE      = 214748.3648; //Obviously this is truncated as a constant. Equal to ((2^31)-1)/10000
  28. const float MIN_CONSTANT        = -214747.9999; //! This is because of a bug. The minimum (negative) float
  29.                             //! **is** -214747.9999, but the min (negative) const float
  30.                             //! is -021473.0001 because of an error in char counting including the sign.
  31.                             //!...and will be fixed in 2.50.3.
  32.  
  33. const int MAX_SCRIPTDRAWINGCOMMANDS = 1000;
  34. const int MAX_INT           = 214747;
  35. const int MIN_INT           = -214747; //This value is assigned to the constant due to the bug involving negative constants in 2.50.0-2.50.2.
  36.                           //MIN_INT for variables is -214747
  37. const int MIN_FLOAT             = -214747.9999; //This value is a ZC bug, and will be fixed in 2.50.3.
  38.                             //MIN_FLOAT for variables is -214747
  39.  
  40. const int MAX_COUNTER           = 32768; //or is this 32767, counting 0?
  41. const int MIN_COUNTER           = -32768; //" -32767
  42.  
  43.  
  44. const int MIN_LWEAPON           = 1; //Lowest numbered objects.
  45. const int MIN_EWEAPON           = 1;
  46. const int MIN_NPC           = 1;
  47. const int MIN_ITEM          = 1;
  48. const int MAX_LWEAPON           = 255; //1 to 255.
  49. const int MAX_EWEAPON           = 255; //1 to 255.
  50. const int MAX_NPCS          = 255; //1 to 255.
  51. const int MAX_ITEM          = 255; //1 to 255;
  52. //!This is already called in stdExtra.zh
  53. //! Fixed; de-pluralised all.
  54.  
  55. const int MIN_FFC           = 1;
  56. const int MAX_FFC           = 32;
  57. const int MIN_OBJ           = 1; //Short, const for loops.
  58.  
  59.  
  60. const int MAX_OBJECT_POINTERS       = 255; //Max of any one type.
  61. const int MAX_WEAPON_POINTERS       = 510; //eweapon and lweapon combined.
  62. const int MAX_TOTAL_OBJECT_POINTERS     = 1020; //Max shared, across the three types.
  63. const int MAX_SPRITES           = 1020; //npc, eweapon, and lweapon
  64. const int MAX_DRAWING           = 1000; //Maximum number of simultaneous drawing commands.
  65.  
  66. const int MIN_BITMAP_X          = 0; //Legal Bitmap Region for Drawing
  67. const int MAX_BITMAP_X          = 511;
  68. const int MIN_BITMAP_Y          = 0;
  69. const int MAX_BITMAP_Y          = 511;
  70.  
  71. const int MAX_GLOBAL_VARIABLES      = 255;
  72. const int MAX_VARIABLES         = 255; //Vars in operation at any one time.
  73. const int MAX_BITSPERVARIABLE       = 18;
  74.  
  75. const int MAX_ARRAY_POINTERS        = 4095; //Arrays in operation.
  76. const int MAX_TILES             = 65519;
  77. const int MAX_COMBOS            = 65279;
  78. const int MAX_STRINGS           = 65519; //Strings in String Editor
  79.  
  80. const int HP_PER_HEART          = 16;
  81. const int MP_PER_BLOCK          = 32;
  82.  
  83. const int MAX_MESSAGES          = 65535;
  84. const int MAX_MESSAGELENGTH     = 145; //Pass an array of (at least) this size to Game->GetMessage
  85.  
  86. const int MAX_MAPS          = 256;
  87. const int MAX_DMAPS         = 512;
  88. const int MAX_DMAPNAMELENGTH        = 21; //Size of arrays to pass to Game->GetDMapX
  89. const int MAX_DMAPTITLELENGTH       = 21;
  90. const int MAX_DMAPINTROLENGTH       = 73;
  91.  
  92. //FFC Size Limitations
  93. const int MAX_FFC_W             = 4; //Four tiles wide
  94. const int MAX_FFC_H             = 4; //Four tiles high
  95. const int MAX_FFC_EFFECT_W      = 64; //Sixty-four pixels wide.
  96. const int MAX_FFC_EFFECT_H      = 64; //Sixty four pixels high.
  97.  
  98. /////////////////////
  99. /// Screen Dimensions
  100.  
  101. const int SCREEN_W          = 256; //X width of the Screen, starting at 0 (left) and goign right).
  102. //!SCREEN_WIDTH  is already called in stdExtra.zh
  103. const int SCREEN_H          = 176; //Y height of the screen, starting at 0 (top), going down.
  104. //!SCREEN_HEIGHT  is already called in stdExtra.zh
  105.  
  106. const int SCREEN_RIGHT          = 255; //The rightmost screen pixel.
  107. const int SCREEN_LEFT           = 0; //The leftmost screen pixel.
  108. const int SCREEN_TOP            = 0; //The top screen pixel, below the subscreen.
  109. const int SCREEN_BOTTOM         = 175; //The lowest screen pixel.  
  110.  
  111. const int SUBSCREEN_BOTTOM      = -1; //Bottom of passive subscreen.
  112. const int SUBSCREEN_TOP         = -56; //Top of passive subscreen.
  113. //! In stdExtra.zh, this is -64. ?!
  114.  
  115.  
  116.  
  117. ///////////////////
  118. /// Game Properties
  119.  
  120. //Defaults from Init Data
  121. const float GRAVITY         = 0.16;
  122. const float TERMINAL_VELOCITY       = 3.20;
  123. const int JUMPING_LAYER_THRESHOLD   = 16;
  124.  
  125. //CSet Initial Colour Swatch positions
  126. const int CSET_0    = 0; //Sixteen colours per, starting at '0' each.
  127. const int CSET_1    = 16;
  128. const int CSET_2    = 32;
  129. const int CSET_3    = 48;
  130. const int CSET_4    = 64;
  131. const int CSET_5    = 80;
  132. const int CSET_6    = 96;
  133. const int CSET_7    = 112;
  134. const int CSET_8    = 128;
  135. const int CSET_9    = 144;
  136. const int CSET_10   = 160;
  137. const int CSET_11   = 176;
  138. const int CSET_12   = 192;
  139. const int CSET_13   = 208; //Warning: Using CSets 13 through 15 is not officially supported,
  140. const int CSET_14   = 224; //     and may affect compatibility with future ZC builds.
  141. const int CSET_15   = 240;
  142.  
  143.  
  144. //Sound effect IDs. To be used for PlaySound().
  145. const int SFX_ARROW       = 1; // Arrow is fired.
  146. const int SFX_BEAM        = 2; // Sword beam is fired.
  147. const int SFX_BOMB        = 3; // Bomb explodes.
  148. const int SFX_BRANG       = 4; // Boomerang spinning.
  149. const int SFX_CHARGE1     = 35; // Sword powering up.
  150. const int SFX_CHARGE2     = 36; // Sword powering up again (Hurricane Spin).
  151. const int SFX_CURSOR      = 5; // Subscreen cursor.
  152. const int SFX_CLINK       = 6; // Shield is hit.
  153. const int SFX_CLEARED     = 7; // Chime when screen item appears.
  154. const int SFX_DINSFIRE    = 37; // Din's Fire blast.
  155. const int SFX_DODONGO     = 8; // Dodongo's roar.
  156. const int SFX_SHUTTER     = 9; // Shutter bang.
  157. const int SFX_EDEAD       = 10; // Enemy is killed.
  158. const int SFX_EHIT        = 11; // Enemy is hit.
  159. const int SFX_LOWHP       = 12; // Low hearts warning beep.
  160. const int SFX_FALL        = 38; // Enemy falls from ceiling (unused).
  161. const int SFX_FARORESWIND = 39; // Farore's Wind spell.
  162. const int SFX_FIRE        = 13; // Flame roar.
  163. const int SFX_FIREBALL    = 40; // Enemy fireball.
  164. const int SFX_GANON       = 14; // Music when Ganon appears/dies.
  165. const int SFX_GASP        = 15; // Boss is hit.
  166. const int SFX_GRASSCUT    = 41; // Grass or bush slashed.
  167. const int SFX_HAMMER      = 16; // Hammer pound.
  168. const int SFX_HAMMERPOST  = 42; // Pounded a post.
  169. const int SFX_HOOKSHOT    = 17; // Hookshot chain rattle.
  170. const int SFX_HOVER       = 43; // Hover boots.
  171. const int SFX_ICE         = 44; // Unused.
  172. const int SFX_JUMP        = 45; // Jumping.
  173. const int SFX_LENSOFF     = 46; // Lens of Truth off.
  174. const int SFX_LENSON      = 47; // Lens of Truth on.
  175. const int SFX_MSG         = 18; // Message typing.
  176. const int SFX_NAYRUSLOVE1 = 48; // Nayru's Love shield hum.
  177. const int SFX_NAYRUSLOVE2 = 49; // Nayru's Love shield running out.
  178. const int SFX_OUCH        = 19; // Link is hit.
  179. const int SFX_PICKUP      = 20; // Chime when item is held above head.
  180. const int SFX_PLACE       = 21; // Bomb is placed.
  181. const int SFX_PLINK       = 22; // Heart/Rupee is collected.
  182. const int SFX_PUSHBLOCK   = 50; // Pushed a block.
  183. const int SFX_REFILL      = 23; // Hearts being refilled.
  184. const int SFX_ROAR        = 24; // Aquamentus, Gleeok and Ganon's roar.
  185. const int SFX_ROCK        = 51; // Octorok rock is fired.
  186. const int SFX_ROCKETDOWN  = 52; // Spell rocket descends.
  187. const int SFX_ROCKETUP    = 53; // Spell rocket launched.
  188. const int SFX_SCALE       = 25; // Chime when fairy appears/is picked up.
  189. const int SFX_SEA         = 26; // "Ocean SFX" ambience.
  190. const int SFX_SECRET      = 27; // Chime when secret is discovered.
  191. const int SFX_SPINATTACK  = 54; // Sword spin.
  192. const int SFX_SPIRAL      = 28; // Link dies.
  193. const int SFX_SPLASH      = 55; // Splashing in shallow water.
  194. const int SFX_STAIRS      = 29; // Link marches down stairs.
  195. const int SFX_SUMMON      = 56; // Summoner magic.
  196. const int SFX_SWORD       = 30; // Sword swipe.
  197. const int SFX_TAP1        = 57; // Sword taps wall.
  198. const int SFX_TAP2        = 58; // Sword taps bombable wall.
  199. const int SFX_PATRA       = 31; // Patra and Manhandla's shriek.
  200. const int SFX_WAND        = 32; // Magic is fired by Wizzrobes or Link.
  201. const int SFX_WHIRLWIND   = 59; // Whistle whirlwind.
  202. const int SFX_WHISTLE     = 33; // Whistle is played.
  203. const int SFX_ZELDA       = 34; // Music when ending sequence begins.
  204.  
  205.  
  206. //Sprite IDs. To be used with UseSprite().
  207. const int SP_ARROW_ENEMY        = 19;
  208. const int SP_ARROW1             = 10; //Wooden Arrow
  209. const int SP_ARROW2             = 11; //Silver Arrow
  210. const int SP_ARROW3             = 34; //Golden Arrow
  211. const int SP_BAIT           = 14; //Enemy bait
  212. const int SP_BOMB_ENEMY         = 76; //Bomb (Enemy, normal)
  213. const int SP_SBOMB_ENEMY        = 77; //Bomb (Enemy, Super)
  214. const int SP_BOMB           = 7; //Normal Bomb
  215. const int SP_SBOMB          = 8; //Super Bomb
  216. const int SP_BRANG1             = 4; //Wooden Boomerang
  217. const int SP_BRANG2             = 5; //Magical Boomerang
  218. const int SP_BRANG3             = 6; //Fire Boomerang
  219. const int SP_CANEOFBYRNA        = 69; //Cane of Byrna Object
  220. const int SP_BYRNABEAM          = 87; //Cane of Byrna Orbiter
  221. const int SP_BYRNASLASH         = 70; //Cane of Byrna Slashing Sprite
  222. const int SP_DINSFIRE_FALL      = 39; //Din's Fire (Falling)
  223. const int SP_DINSFIRE_RISE      = 38; //Din's Fire (Rising)
  224. const int SP_DINSFIRE_TRAIL_FALL    = 41; //Din's Fire (Trail, Falling)
  225. const int SP_DINSFIRE_TRAIL_RISE    = 40; //Din's Fire (Trail, Rising)
  226. const int SP_BOMB_ENEMY_EXPLOSION   = 78; //Normal Bomb Exploion (Enemy)
  227. const int SP_SBOMB_ENEMY_EXPLOSION  = 79; //Super Bomb Explosion (Enemy)
  228. const int SP_BOMB_EXPLOSION         = 9; //Normal Bomb Explosion
  229. const int SP_SBOMB_EXPLOSION        = 75; //Super Bomb Explosion
  230. const int SP_FIRE_ENEMY         = 35; //Fire (Enemy)
  231. const int SP_FIRE2_ENEMY        = 81; //Fire 2 (Enemy)
  232. const int SP_FIRETRAIL2         = 82; //Fire Trail 2 (Enemy) [Unused]
  233. const int SP_FIRETRAIL          = 80; //Fire Trail (Enemy)
  234. const int SP_FIREBALL           = 17; //Fireball (Enemy)
  235. const int SP_FLAME          = 12; //Candle Fire
  236. const int SP_FIRE           = 12; //Candle Fire
  237. const int SP_HAMMER             = 25; //Hammer
  238. const int SP_HOOKSHOT1_CHAIN_H      = 27; //Hookshot (Short, Chain, Horizontal)
  239. const int SP_HOOKSHOT1_CHAIN_V      = 42; //Hookshot (Short, Chain, Vertical)
  240. const int SP_HOOKSHOT1_HANDLE       = 28; //Hookshot Handle (Short)
  241. const int SP_HOOKSHOT1_HEAD         = 26; //Hookshot Head (Short)
  242. const int SP_HOOKSHOT2_CHAIN_H      = 72; //Hookshot (Short, Chain, Horizontal)
  243. const int SP_HOOKSHOT2_CHAIN_V      = 74; //Hookshot (Short, Chain, Vertical)
  244. const int SP_HOOKSHOT2_HANDLE       = 73; //Hookshot Handle (Short)
  245. const int SP_HOOKSHOT2_HEAD         = 71; //Hookshot Head (Short)
  246. const int SP_ICE            = 83; //Ice Magic (Enemy, Unused)
  247. const int SP_MAGIC_ENEMY        = 21; //Magic (Enemy)
  248. const int SP_MAGIC_FIRE         = 85; //Magic (Fire)
  249. const int SP_MAGIC          = 16; //Magic (Wand)
  250. const int SP_MISC44             = 44; //Misc 44, unused
  251. const int SP_MISC45             = 45; //Misc 45, unused
  252. const int SP_MISC57             = 57; //Misc 57, unused
  253. const int SP_MISC24             = 24; //Misc 24, unused
  254. const int SP_MISC_ARROW2        = 29; //Silver Arrow Sparkles
  255. const int SP_MISC_ARROW3        = 30; //Golden Arrow Sparkles
  256. const int SP_MISC_BRANG2        = 31; //Magic Boomerang Sparkles
  257. const int SP_MISC_BRANG3        = 32; //Fire Boomerang Sparkles
  258. const int SP_MISC_BUSH          = 52; //Bush Leaf Clippings
  259. const int SP_MISC_DEATH         = 23; //Link Death Winkout
  260. const int SP_MISC_FLOWER        = 53; //Flower Clippings
  261. const int SP_MISC_GRASS         = 54; //Grass Clippings
  262. const int SP_MISC_HAMMER        = 33; //Hammer Impact
  263. const int SP_MISC_HOVER         = 84; //Hover Boots Glow
  264. const int SP_MISC_MAGICMETER        = 37; //Magic Meter
  265. const int SP_MISC_MORE          = 43; //More Indicator
  266. const int SP_MISC_QHEART        = 86; //Quarter Heart
  267. const int SP_MISC_RIPPLE        = 56; //Ripples
  268. const int SP_MISC_SHADOW2       = 51; //Shadow (Large)
  269. const int SP_MISC_SHADOW1       = 50; //Shadow (Small)
  270. const int SP_SPAWN          = 22; //Enemy Spawn Poof
  271. const int SP_MISC_SSVINE        = 68; //Subscreen Vine
  272. const int SP_TALLGRASS          = 55; //Tall Grass Movement
  273. const int SP_NAYRU_LEFT         = 58; //Nayru's Love (Left)
  274. const int SP_NAYRU_LEFT2        = 59; //Nayru's Love (Left, Returning)
  275. const int SP_NAYRU_RIGHT        = 62; //Nayru's Love (Right)
  276. const int SP_NAYRU_RIGHT2       = 63; //Nayru's Love (Right, Returning)
  277. const int SP_NAYRU_BACK         = 67; //Nayru's Love Shield (Back)
  278. const int SP_NAYRU_FRONT        = 66; //Nayru's Love Shield (Front)
  279. const int SP_NAYRU_TRAIL_LEFT       = 60; //Nayru's Love Trail (Left)
  280. const int SP_NAYRU_TRAIL_LEFT2      = 61; //Nayru's Love Trail (Left, Returning)
  281. const int SP_NAYRU_TRAIL_RIGHT      = 64; //Nayru's Love Trail (Right)
  282. const int SP_NAYRU_TRAIL_RIGHT2     = 65; //Nayru's Love Trail (Right, Returning)
  283. const int SP_ROCK           = 18; //Rock
  284. const int SP_SWORD_ENEMY        = 20; //Enemy Sword Beam
  285. const int SP_SWORD1             = 0; //Wooden Sword
  286. const int SP_SLASH1             = 46; //Wooden Sword Slash
  287. const int SP_SWORD2             = 1; //White Sword
  288. const int SP_SLASH2             = 47; //White Sword Slash
  289. const int SP_SWORD3             = 2; //Magical Sword
  290. const int SP_SLASH3             = 48; //Magical Sword Slash
  291. const int SP_SWORD4             = 3; //Master Sword
  292. const int SP_SLASH4             = 49; //master Sword Slash
  293. const int SP_WAND           = 15; //Wand Object
  294. const int SP_WHIRL          = 13; //Whiste Whirlwind
  295. const int SP_WIND           = 36; //Wind Magic (Enemy)
  296.  
  297. //User-Defined Sprites Range 088 to 255
  298.  
  299. //Directions. Use with Link->Dir, etc.
  300. const int DIR_UP                = 0; //000b
  301. const int DIR_DOWN              = 1; //001b
  302. const int DIR_LEFT              = 2; //010b
  303. const int DIR_RIGHT             = 3; //011b
  304. const int DIR_LEFTUP            = 4; //100b
  305. const int DIR_RIGHTUP           = 5; //101b
  306. const int DIR_LEFTDOWN          = 6; //110b
  307. const int DIR_RIGHTDOWN         = 7; //111b
  308. const int DIR_IGNORESHIELD  = 8; //dir+DIR_IGNORESHIELD: Prevents blocking by enemy shields.
  309.                     //Does not work with some enemy types.
  310.                     //Directions above 7 are used by some Z1 bosses.
  311.  
  312. //Flip Types for Tiles, or Sprites
  313. const int FLIP_NONE         = 0;
  314. const int FLIP_HORIZONTAL   = 1; //Horizontal Flip
  315. //!This is already called in stdExtra.zh
  316. //Fixed
  317. const int FLIP_VERTICAL     = 2; //Vertical Flip
  318. //!This is already called in stdExtra.zh
  319. //Fixed
  320. const int FLIP_HV       = 3; //Horizontal and vertical Flip
  321. const int FLIP_VH       = 3;
  322. const int FLIP_BOTH         = 3;
  323.  
  324. //Rotations + Flip
  325. const int ROT_CW        = 4;
  326. const int ROT_CW_FLIP       = 5;
  327. const int ROT_CCW_FLIP      = 6;
  328. const int ROT_CCW       = 7;
  329.  
  330.  
  331.  
  332.  
  333. //Sprite extending methods. Use with item->Extend,
  334. //npc->Extend, eweapon->Extend and lweapon->Extend.
  335. const int EXT_NONE              = 0; // Not extended
  336. const int EXT_16X32     = 1; // Object is extended as 16x32; or Link is extended in Sprites->Link to 16x32.
  337. const int EXT_32X32     = 2; // Object is extended as 32x32; or Link is extended in Sprites->Link to 32x32.
  338. const int EXT_NORMAL            = 3; // Extended
  339. const int EXT_EXTENDED          = 3; // Extended
  340. const int EXT_NOSHADOW          = 4; // Extended; NPC has no shadow.
  341.  
  342. //! We need some better names for Extend constants.
  343.  
  344. //Generic counters. Use with itemclass->Counter, Game->Counter[], Game->MCounter[] and Game->DCounter[]
  345. const int CR_LIFE               = 0;
  346. const int CR_RUPEES             = 1;
  347. const int CR_BOMBS              = 2;
  348. const int CR_ARROWS             = 3;
  349. const int CR_MAGIC              = 4;
  350. const int CR_KEYS               = 5;
  351. const int CR_SBOMBS             = 6;
  352. const int CR_SCRIPT1            = 7;
  353. const int CR_SCRIPT2            = 8;
  354. const int CR_SCRIPT3            = 9;
  355. const int CR_SCRIPT4            = 10;
  356. const int CR_SCRIPT5            = 11;
  357. const int CR_SCRIPT6            = 12;
  358. const int CR_SCRIPT7            = 13;
  359. const int CR_SCRIPT8            = 14;
  360. const int CR_SCRIPT9            = 15;
  361. const int CR_SCRIPT10           = 16;
  362. const int CR_SCRIPT11           = 17;
  363. const int CR_SCRIPT12           = 18;
  364. const int CR_SCRIPT13           = 19;
  365. const int CR_SCRIPT14           = 20;
  366. const int CR_SCRIPT15           = 21;
  367. const int CR_SCRIPT16           = 22;
  368. const int CR_SCRIPT17           = 23;
  369. const int CR_SCRIPT18           = 24;
  370. const int CR_SCRIPT19           = 25;
  371. const int CR_SCRIPT20           = 26;
  372. const int CR_SCRIPT21           = 27;
  373. const int CR_SCRIPT22           = 28;
  374. const int CR_SCRIPT23           = 29;
  375. const int CR_SCRIPT24           = 30;
  376. const int CR_SCRIPT25           = 31;
  377.  
  378. //Generic data indices. Use this with Game->Generic[]
  379. const int GEN_HEARTPIECES       = 0; // Heart Pieces currently possessed
  380. const int GEN_MAGICDRAINRATE    = 1; // Link's magic usage equals n / 2.
  381. const int GEN_CANSLASH          = 2; // Link can slash with the sword.
  382. const int GEN_WARPLEVEL         = 3; // Warp Ring number that a Whirlwind warp will send Link to.
  383.                               // It is set every time that Link uses the Whistle.
  384. const int GEN_HCPPERHC          = 4; // How many Pieces of Heart form a complete Heart Container?
  385. const int GEN_CONTINUEHEARTS    = 5; // Amount of life that Link continues with
  386. const int GEN_CONTINUEISPERCENT = 6; // ...Or a percentage of his total life
  387.  
  388. //Level item flags. Or (|) these together and use with Game->LItems[]
  389. const int LI_TRIFORCE           = 0x01; // The Triforce of this Level has been obtained
  390. const int LI_MAP                = 0x02; // The Dungeon Map of this Level has been obtained
  391. const int LI_COMPASS            = 0x04; // The Compass of this Level has been obtained
  392. const int LI_BOSS               = 0x08; // A "Dungeon Boss" enemy has been slain
  393. const int LI_BOSSKEY            = 0x10; // The Boss Key of this Level has been obtained
  394.  
  395. //Mouse buttons
  396. const int MB_LEFTCLICK          = 0x1; //AND (&) these with Link->InputMouseB to get the current button state of the mouse
  397. const int MB_RIGHTCLICK         = 0x2;
  398. const int MB_MIDDLECLICK        = 0x4; //Keep in in mind that not all mice/touchpads have a middle mouse button
  399.  
  400. //Controller buttons
  401. const int CB_UP     = 1;
  402. const int CB_DOWN   = 2;
  403. const int CB_LEFT   = 3;
  404. const int CB_RIGHT  = 4;
  405. const int CB_A      = 5;
  406. const int CB_B      = 6;
  407. const int CB_L      = 7;
  408. const int CB_R      = 8;
  409. const int CB_START  = 9;
  410. const int CB_MAP    = 10;
  411. const int CB_EX1    = 11;
  412. const int CB_EX2    = 12;
  413. const int CB_EX3    = 12;
  414. const int CB_EX4    = 14;
  415. const int CB_STICKUP    = 15;
  416. const int CB_STICKDOWN  = 16;
  417. const int CB_STICKLEFT  = 17;
  418. const int CB_STICKRIGHT = 18;
  419.  
  420.  
  421.  
  422. ////////////////////
  423. /// Items & Itemdata
  424.  
  425. //Item class ids. Use as comparisons with Itemdata->Family
  426. const int IC_AMULET             = 11;
  427. const int IC_ARROW              = 2;
  428. const int IC_ARROWAMMO          = 40;
  429. const int IC_BAIT               = 5;
  430. const int IC_BOMB               = 27;
  431. const int IC_BOMBAMMO           = 47;
  432. const int IC_BOMBBAG            = 48;
  433. const int IC_BOOK               = 16;
  434. const int IC_BOOTS              = 20;
  435. const int IC_BOSSKEY            = 35;
  436. const int IC_BOW                = 13;
  437. const int IC_BOWANDARROW        = 87;
  438. const int IC_BRACELET           = 18;
  439. const int IC_BRANG              = 1;
  440. const int IC_CANDLE             = 3;
  441. const int IC_CBYRNA             = 38;
  442. const int IC_CHARGERING         = 55;
  443. const int IC_CLOCK              = 29;
  444. const int IC_COMPASS            = 34;
  445. const int IC_CROSSSCROLL        = 52;
  446. const int IC_DINSFIRE           = 24;
  447. const int IC_FAIRY              = 41;
  448. const int IC_FARORESWIND        = 25;
  449. const int IC_FLIPPERS           = 19;
  450. const int IC_HAMMER             = 23;
  451. const int IC_HEART              = 43;
  452. const int IC_HEARTCONTAINER     = 44;
  453. const int IC_HEARTPIECE         = 45;
  454. const int IC_HEARTRING          = 58;
  455. const int IC_HOOKSHOT           = 21;
  456. const int IC_HOVERBOOTS         = 50;
  457. const int IC_HURRICANESCROLL    = 60;
  458. const int IC_KEY                = 30;
  459. const int IC_KILLALL            = 46;
  460. const int IC_LADDER             = 15;
  461. const int IC_LENS               = 22;
  462. const int IC_LETTER             = 6;
  463. const int IC_LETTERPOTION       = 88;
  464. const int IC_LEVELKEY           = 37;
  465. const int IC_MAGIC              = 42;
  466. const int IC_MAGICCONTAINER     = 31;
  467. const int IC_MAGICKEY           = 17;
  468. const int IC_MAGICRING          = 59;
  469. const int IC_MAP                = 33;
  470. const int IC_MISC               = 66;
  471. const int IC_NAYRUSLOVE         = 26;
  472. const int IC_PERILRING          = 65;
  473. const int IC_PERILSCROLL        = 56;
  474. const int IC_POTION             = 7;
  475. const int IC_QUAKESCROLL        = 53;
  476. const int IC_QUIVER             = 36;
  477. const int IC_RAFT               = 14;
  478. const int IC_RING               = 9;
  479. const int IC_ROCS               = 49;
  480. const int IC_RUPEE              = 39;
  481. const int IC_SBOMB              = 28;
  482. const int IC_SHIELD             = 12;
  483. const int IC_SPINSCROLL         = 51;
  484. const int IC_SQUAKESCROLL       = 61;
  485. const int IC_STOMPBOOTS         = 63;
  486. const int IC_STONEAGONY         = 62;
  487. const int IC_SWORD              = 0;
  488. const int IC_TRIFORCE           = 32;
  489. const int IC_WALLET             = 10;
  490. const int IC_WAND               = 8;
  491. const int IC_WEALTHMEDAL        = 57;
  492. const int IC_WHIMSICALRING      = 64;
  493. const int IC_WHISPRING          = 54;
  494. const int IC_WHISTLE            = 4;
  495.  
  496. const int IC_CUSTOM1            = 67;
  497. const int IC_CUSTOM2            = 68;
  498. const int IC_CUSTOM3            = 69;
  499. const int IC_CUSTOM4            = 70;
  500. const int IC_CUSTOM5            = 71;
  501. const int IC_CUSTOM6            = 72;
  502. const int IC_CUSTOM7            = 73;
  503. const int IC_CUSTOM8            = 74;
  504. const int IC_CUSTOM9            = 75;
  505. const int IC_CUSTOM10           = 76;
  506. const int IC_CUSTOM11           = 77;
  507. const int IC_CUSTOM12           = 78;
  508. const int IC_CUSTOM13           = 79;
  509. const int IC_CUSTOM14           = 80;
  510. const int IC_CUSTOM15           = 81;
  511. const int IC_CUSTOM16           = 82;
  512. const int IC_CUSTOM17           = 83;
  513. const int IC_CUSTOM18           = 84;
  514. const int IC_CUSTOM19           = 85;
  515. const int IC_CUSTOM20           = 86;
  516.  
  517.  
  518. //Item IDs. Use with CreateItem() and Link->Item[].
  519. //These are DEFAULT values, and may not be correct for custom quests which
  520. //have overridden item action data.
  521. const int I_AMULET1             = 50;
  522. const int I_AMULET2             = 63;
  523. const int I_ARROW1              = 13;
  524. const int I_ARROW2              = 14;
  525. const int I_ARROW3              = 57;
  526. const int I_ARROWAMMO1          = 70;
  527. const int I_ARROWAMMO10         = 72;
  528. const int I_ARROWAMMO30         = 73;
  529. const int I_ARROWAMMO5          = 71;
  530. const int I_BAIT                = 16;
  531. const int I_BOMB                = 3;
  532. const int I_BOMBAMMO1           = 77;
  533. const int I_BOMBAMMO30          = 80;
  534. const int I_BOMBAMMO4           = 78;
  535. const int I_BOMBAMMO8           = 79;
  536. const int I_BOMBBAG1            = 81;
  537. const int I_BOMBBAG2            = 82;
  538. const int I_BOMBBAG3            = 83;
  539. const int I_BOMBBAG4            = 106;
  540. const int I_BOOK                = 32;
  541. const int I_BOOTS               = 55;
  542. const int I_BOSSKEY             = 67;
  543. const int I_BOW1                = 15;
  544. const int I_BOW2                = 68;
  545. const int I_BRACELET1           = 107;
  546. const int I_BRACELET2           = 19;
  547. const int I_BRACELET3           = 56;
  548. const int I_BRANG1              = 23;
  549. const int I_BRANG2              = 24;
  550. const int I_BRANG3              = 35;
  551. const int I_CANDLE1             = 10;
  552. const int I_CANDLE2             = 11;
  553. const int I_CBYRNA              = 88;
  554. const int I_CHARGERING1         = 101;
  555. const int I_CHARGERING2         = 102;
  556. const int I_CLOCK               = 4;
  557. const int I_COMPASS             = 22;
  558. const int I_CROSSSCROLL         = 95;
  559. const int I_DINSFIRE            = 64;
  560. const int I_DUST_PILE           = 43;
  561. const int I_FAIRY               = 34;
  562. const int I_FAIRYSTILL          = 69;
  563. const int I_FARORESWIND         = 65;
  564. const int I_FLIPPERS            = 51;
  565. const int I_HAMMER              = 54;
  566. const int I_HCPIECE             = 49;
  567. const int I_HEART               = 2;
  568. const int I_HEARTCONTAINER      = 28;
  569. const int I_HEARTRING1          = 112;
  570. const int I_HEARTRING2          = 113;
  571. const int I_HEARTRING3          = 114;
  572. const int I_HOOKSHOT1           = 52;
  573. const int I_HOOKSHOT2           = 89;
  574. const int I_HOVERBOOTS          = 92;
  575. const int I_KEY                 = 9;
  576. const int I_KILLALL             = 62;
  577. const int I_LADDER1             = 27;
  578. const int I_LADDER2             = 108;
  579. const int I_LENS                = 53;
  580. const int I_LETTER              = 12;
  581. const int I_LETTERUSED          = 90;
  582. const int I_LEVELKEY            = 84;
  583. const int I_MAGICCONTAINER      = 58;
  584. const int I_MAGICJAR1           = 59;
  585. const int I_MAGICJAR2           = 60;
  586. const int I_MAGICKEY            = 33;
  587. const int I_MAGICRING1          = 115;
  588. const int I_MAGICRING2          = 116;
  589. const int I_MAGICRING3          = 117;
  590. const int I_MAGICRING4          = 118;
  591. const int I_MAP                 = 21;
  592. const int I_MISC1               = 46;
  593. const int I_MISC2               = 47;
  594. const int I_NAYRUSLOVE          = 66;
  595. const int I_PERILRING           = 121;
  596. const int I_PERILSCROLL         = 103;
  597. const int I_POTION1             = 29;
  598. const int I_POTION2             = 30;
  599. const int I_QUAKESCROLL1        = 96;
  600. const int I_QUAKESCROLL2        = 97;
  601. const int I_QUIVER1             = 74;
  602. const int I_QUIVER2             = 75;
  603. const int I_QUIVER3             = 76;
  604. const int I_QUIVER4             = 105;
  605. const int I_RAFT                = 26;
  606. const int I_RING1               = 17;
  607. const int I_RING2               = 18;
  608. const int I_RING3               = 61;
  609. const int I_ROCSFEATHER         = 91;
  610. const int I_RUPEE1              = 0;
  611. const int I_RUPEE10             = 86;
  612. const int I_RUPEE100            = 87;
  613. const int I_RUPEE20             = 38;
  614. const int I_RUPEE200            = 40;
  615. const int I_RUPEE5              = 1;
  616. const int I_RUPEE50             = 39;
  617. const int I_SBOMB               = 48;
  618. const int I_SELECTA             = 45;
  619. const int I_SELECTB             = 85;
  620. const int I_SHIELD1             = 93;
  621. const int I_SHIELD2             = 8;
  622. const int I_SHIELD3             = 37;
  623. const int I_SPINSCROLL1         = 94;
  624. const int I_SPINSCROLL2         = 98;
  625. const int I_STOMPBOOTS          = 120;
  626. const int I_STONEAGONY          = 119;
  627. const int I_SWORD1              = 5;
  628. const int I_SWORD2              = 6;
  629. const int I_SWORD3              = 7;
  630. const int I_SWORD4              = 36;
  631. const int I_TRIFORCE            = 20;
  632. const int I_TRIFORCEBIG         = 44;
  633. const int I_WALLET500           = 41;
  634. const int I_WALLET999           = 42;
  635. const int I_WALLETA             = 104;
  636. const int I_WAND                = 25;
  637. const int I_WEALTHMEDAL         = 109;
  638. const int I_WEALTHMEDAL2        = 110;
  639. const int I_WEALTHMEDAL3        = 111;
  640. const int I_WHIMSICALRING       = 122;
  641. const int I_WHISPRING1          = 99;
  642. const int I_WHISPRING2          = 100;
  643. const int I_WHISTLE             = 31;
  644.  
  645. //Item pickup flags. OR (|) these together to use with item->Pickup
  646. //Other values are reserved for internal usage, and have no effect
  647. const int IP_HOLDUP         = 0x002; //Link holds it up when collecting it.
  648. const int IP_ST_ITEM            = 0x004; //Sets the screen state "Item" when collected.
  649. const int IP_DUMMY          = 0x008; //A 'dummy' item, such as rupee markers in shops. Can't be collected and ignores gravity.
  650. const int IP_ENEMYCARRIED       = 0x080; //The item-carrying NPC carries it. If no NPC has an item, the most recently created NPC carries it.
  651. const int IP_TIMEOUT            = 0x100; //Disappears after 512 frames. Can be collected by melee weapons if the related quest rule is not set.
  652. const int IP_ST_SPECIALITEM     = 0x800; //Sets the screen state "Special Item" when collected.
  653.  
  654.  
  655. /////////////////////////
  656. /// EWeapons and LWeapons
  657.  
  658. //LWeapon types. Use with Screen->CreateLWeapon() and Screen->LoadLWeapon().
  659. const int LW_SWORD              = 1; // This cannot be created
  660. const int LW_WAND               = 12; // This cannot be created
  661. const int LW_CANDLE             = 12; // This cannot be created
  662. const int LW_HAMMER             = 19; // This cannot be created
  663. const int LW_HOOKSHOT           = 20; // This cannot be created
  664. const int LW_CANEOFBYRNA        = 27; // This cannot be created
  665. const int LW_ARROW              = 8;
  666. const int LW_BEAM               = 2; // Sword beam
  667. const int LW_BRANG              = 3;
  668. const int LW_BOMB               = 6;
  669. const int LW_BOMBBLAST          = 4; // Bomb explosion
  670. const int LW_SBOMB              = 7;
  671. const int LW_SBOMBBLAST         = 5; // Super Bomb explosion
  672. const int LW_FIRE               = 9;
  673. const int LW_WHISTLE            = 10; // Whistle music - kills Digdogger
  674. const int LW_BAIT               = 11;
  675. const int LW_MAGIC              = 13; // Wand magic
  676. const int LW_WIND               = 15; // Whistle whirlwind
  677. const int LW_REFMAGIC           = 16; // Reflected wand magic
  678. const int LW_REFFIREBALL        = 17; // Reflected fireball
  679. const int LW_REFROCK            = 18; // Reflected rock
  680. const int LW_REFBEAM            = 28; // Reflected sword beam
  681. const int LW_SPARKLE            = 23;
  682. const int LW_FIRESPARKLE        = 24; // Damages enemies
  683. // Dummy weapons, for use with scripts.
  684. const int LW_SCRIPT1            = 31;
  685. const int LW_SCRIPT2            = 32;
  686. const int LW_SCRIPT3            = 33;
  687. const int LW_SCRIPT4            = 34;
  688. const int LW_SCRIPT5            = 35;
  689. const int LW_SCRIPT6            = 36;
  690. const int LW_SCRIPT7            = 37;
  691. const int LW_SCRIPT8            = 38;
  692. const int LW_SCRIPT9            = 39;
  693. const int LW_SCRIPT10           = 40;
  694.  
  695. //EWeapon types. Use with Screen->CreateEWeapon() and Screen->LoadEWeapon().
  696. const int EW_ARROW              = 130;
  697. const int EW_BRANG              = 131;
  698. const int EW_BEAM               = 132; // Sword beam
  699. const int EW_ROCK               = 133;
  700. const int EW_MAGIC              = 134;
  701. const int EW_FIREBALL           = 129;
  702. const int EW_FIREBALL2          = 145; // Arcing boss fireball
  703. const int EW_BOMB               = 137; // Projectile bomb
  704. const int EW_BOMBBLAST          = 135; // Bomb explosion
  705. const int EW_SBOMB              = 138; // Projectile super bomb
  706. const int EW_SBOMBBLAST         = 136; // Super bomb explosion
  707. const int EW_FIRETRAIL          = 139;
  708. const int EW_FIRE               = 140;
  709. const int EW_WIND               = 141; // Wind wizzrobe magic
  710. const int EW_FIRE2      = 142; //! What is 'Fire 2' ?
  711. // Dummy weapons, for use with scripts.
  712. const int EW_SCRIPT1            = 31;
  713. const int EW_SCRIPT2            = 32;
  714. const int EW_SCRIPT3            = 33;
  715. const int EW_SCRIPT4            = 34;
  716. const int EW_SCRIPT5            = 35;
  717. const int EW_SCRIPT6            = 36;
  718. const int EW_SCRIPT7            = 37;
  719. const int EW_SCRIPT8            = 38;
  720. const int EW_SCRIPT9            = 39;
  721. const int EW_SCRIPT10           = 40;
  722.  
  723. //Weapon DeadState values. Use with Weapon->DeadState.
  724. const int WDS_NOHIT             = -10; // This value switches collision detection off. Deprecated by weapon->CollDetection.
  725. const int WDS_ALIVE     = -1; // Weapon is currently 'alive'.
  726. const int WDS_DEAD              = 0;  // Use to dispose of most weapons.
  727. const int WDS_BEAMSHARDS        = 23; // Use with LW_BEAMs to shatter it into shards.
  728. const int WDS_ARROW             = 4;  // Use with LW_ARROWs to make them 'wink out' using tile 54.
  729. const int WDS_BOUNCE            = 1;  // Use with LW_BRANGs or LW_HOOKSHOTs to
  730.                                       // make it 'bounce off' and start returning to Link.
  731.  
  732.  
  733. ////////////////////
  734. /// NPCs and Enemies
  735.  
  736.  
  737. //NPC Types. Compare against npc->Type.
  738. const int NPCT_GUY          = 0;
  739. const int NPCT_WALK         = 1;
  740. const int NPCT_TEKTITE          = 3;
  741. const int NPCT_LEEVER           = 4;
  742. const int NPCT_PEAHAT           = 5;
  743. const int NPCT_ZORA         = 6;
  744. const int NPCT_ROCK         = 7;
  745. const int NPCT_GHINI            = 8;
  746. const int NPCT_ARMOS            = 9;
  747. const int NPCT_KEESE            = 10;
  748. const int NPCT_TRAP         = 15;
  749. const int NPCT_WALLMASTER       = 16;
  750. const int NPCT_WIZZROBE         = 21;
  751. const int NPCT_AQUAMENTUS       = 22;
  752. const int NPCT_MOLDORM          = 23;
  753. const int NPCT_DODONGO          = 24;
  754. const int NPCT_MANHANDLA        = 25;
  755. const int NPCT_GLEEOK           = 26;
  756. const int NPCT_DIGDOGGER        = 27;
  757. const int NPCT_GOHMA            = 28;
  758. const int NPCT_LANMOLA          = 29;
  759. const int NPCT_PATRA            = 30;
  760. const int NPCT_GANON            = 31;
  761. const int NPCT_PROJECTILE       = 32;
  762. const int NPCT_SPINTILE         = 37;
  763. const int NPCT_NONE         = 38;
  764. const int NPCT_FAIRY            = 39;
  765. const int NPCT_OTHERFLOAT       = 40;
  766. const int NPCT_OTHER            = 41;
  767.  
  768. //Guy IDs. Use with CreateNPC().
  769. const int NPC_ABEI              = 1;
  770. const int NPC_AMA               = 2;
  771. const int NPC_MERCHANT          = 3;
  772. const int NPC_MOBLIN            = 4;
  773. const int NPC_FIRE              = 5;
  774. const int NPC_FAIRY             = 6;
  775. const int NPC_GORIYA            = 7;
  776. const int NPC_ZELDA             = 8;
  777. const int NPC_ABEI2             = 9;
  778.  
  779. //Default enemy IDs. Use with CreateNPC().
  780. const int NPC_AQUAMENTUSL       = 93;
  781. const int NPC_AQUAMENTUSR       = 58;
  782. const int NPC_ARMOS             = 37;
  783. const int NPC_BAT               = 106;
  784. const int NPC_BOMBCHU           = 160;
  785. const int NPC_BOULDER           = 135;
  786. const int NPC_BUBBLEITEMP       = 118;  // Permanently jinxes
  787. const int NPC_BUBBLEITEMR       = 119;  // Restores item usage
  788. const int NPC_BUBBLEITEMT       = 117;
  789. const int NPC_BUBBLESWORDP      = 81;  // Permanently jinxes
  790. const int NPC_BUBBLESWORDR      = 82;  // Restores sword usage
  791. const int NPC_BUBBLESWORDT      = 51;
  792. const int NPC_CEILINGMASTER     = 101; // This enemy isn't implemented
  793. const int NPC_DARKNUT1          = 49;
  794. const int NPC_DARKNUT2          = 50;
  795. const int NPC_DARKNUT3          = 92;   // Splits when killed.
  796. const int NPC_DARKNUT4          = 172;  // This enemy isn't implemented
  797. const int NPC_DARKNUT5          = 87;   // Sword beams.
  798. const int NPC_DIGDOGGER1        = 66; // Splits into 1
  799. const int NPC_DIGDOGGER3        = 67; // Splits into 3
  800. const int NPC_DIGKID1           = 68; // Spawned by NPC_DIGDOGGER1
  801. const int NPC_DIGKID2           = 69; // Spawned by NPC_DIGDOGGER3
  802. const int NPC_DIGKID3           = 70; // Spawned by NPC_DIGDOGGER3
  803. const int NPC_DIGKID4           = 71; // Spawned by NPC_DIGDOGGER3
  804. const int NPC_DODONGO           = 60; // Uses one tile when walking vertically
  805. const int NPC_DODONGOBS         = 114; // Uses two tiles when walking vertically
  806. const int NPC_DODONGOFIRE       = 115; // This enemy isn't implemented
  807. const int NPC_ENEMYFIRE         = 85;  // The Fire enemy in Princess Zelda's screen
  808. const int NPC_FLOORMASTER       = 102; // This enemy isn't implemented
  809. const int NPC_GANON             = 78;
  810. const int NPC_GEL               = 42;
  811. const int NPC_GELFIRE           = 161;
  812. const int NPC_GELFIRETRIB       = 163;
  813. const int NPC_GELTRIB           = 88;
  814. const int NPC_GHINI1            = 35;
  815. const int NPC_GHINI2            = 36;
  816. const int NPC_GHINIMGC          = 173; // This enemy isn't implemented
  817. const int NPC_GIBDO             = 54;
  818. const int NPC_GLEEOK1           = 62;
  819. const int NPC_GLEEOK1FIRE       = 109;
  820. const int NPC_GLEEOK2           = 63;
  821. const int NPC_GLEEOK2FIRE       = 110;
  822. const int NPC_GLEEOK3           = 64;
  823. const int NPC_GLEEOK3FIRE       = 111;
  824. const int NPC_GLEEOK4           = 65;
  825. const int NPC_GLEEOK4FIRE       = 112;
  826. const int NPC_GOHMA1            = 72;
  827. const int NPC_GOHMA2            = 73;
  828. const int NPC_GOHMA3            = 121;
  829. const int NPC_GOHMAFIRE         = 122;
  830. const int NPC_GORIYA1           = 45;
  831. const int NPC_GORIYA2           = 46;
  832. const int NPC_GORIYA3           = 136;
  833. const int NPC_GRAPBUGHP         = 174; // This enemy isn't implemented
  834. const int NPC_GRAPBUGMP         = 175; // This enemy isn't implemented
  835. const int NPC_ITEMFAIRY         = 84;
  836. const int NPC_KEESE1            = 38;
  837. const int NPC_KEESE2            = 39;
  838. const int NPC_KEESE3            = 40;
  839. const int NPC_KEESETRIB         = 90;
  840. const int NPC_LANMOLA1          = 74;
  841. const int NPC_LANMOLA2          = 75;
  842. const int NPC_LEEVER1           = 26;
  843. const int NPC_LEEVER2           = 27;
  844. const int NPC_LEEVER3           = 137;
  845. const int NPC_LIKELIKE          = 53;
  846. const int NPC_LYNEL1            = 30;
  847. const int NPC_LYNEL2            = 31;
  848. const int NPC_LYNEL3            = 168;
  849. const int NPC_MANHANDLA         = 61;
  850. const int NPC_MANHANDLA2        = 94;
  851. const int NPC_MOBLIN1           = 28;
  852. const int NPC_MOBLIN2           = 29;
  853. const int NPC_MOLDORM           = 59;
  854. const int NPC_OCTOROCK1F        = 22;
  855. const int NPC_OCTOROCK1S        = 20;
  856. const int NPC_OCTOROCK2F        = 23;
  857. const int NPC_OCTOROCK2S        = 21;
  858. const int NPC_OCTOROCKBOMBF     = 141;
  859. const int NPC_OCTOROCKBOMBS     = 140;
  860. const int NPC_OCTOROCKFIREF     = 139;
  861. const int NPC_OCTOROCKFIRES     = 138;
  862. const int NPC_OCTOROCKMGC       = 86;
  863. const int NPC_PATRA1            = 76;
  864. const int NPC_PATRA2            = 104;
  865. const int NPC_PATRA3            = 105;
  866. const int NPC_PATRABS           = 103;
  867. const int NPC_PATRAOVAL         = 77;
  868. const int NPC_PEAHAT            = 32;
  869. const int NPC_PEAHATFIRE        = 169; // This enemy isn't implemented
  870. const int NPC_POLSVOICE         = 55;
  871. const int NPC_POLSVOICEBS       = 171; // This enemy isn't implemented
  872. const int NPC_POLSVOICEMGC      = 170;
  873. const int NPC_ROCK              = 34;
  874. const int NPC_ROPE1             = 44;
  875. const int NPC_ROPE2             = 80;
  876. const int NPC_SHOOTFBALL        = 83;
  877. const int NPC_SHOOTFLAME        = 158;
  878. const int NPC_SHOOTFLAME2       = 159;
  879. const int NPC_SHOOTMAGIC        = 154;
  880. const int NPC_SHOOTROCK         = 155;
  881. const int NPC_SHOOTSPEAR        = 156;
  882. const int NPC_SHOOTSWORD        = 157;
  883. const int NPC_SPINTILE          = 166;
  884. const int NPC_SPINTILERND       = 167; // Random spin tile
  885. const int NPC_STALFOS1          = 41;
  886. const int NPC_STALFOS2          = 79;
  887. const int NPC_STALFOS3          = 120;
  888. const int NPC_TEKTITE1          = 24;
  889. const int NPC_TEKTITE2          = 25;
  890. const int NPC_TEKTITE3          = 165; // This enemy isn't implemented
  891. const int NPC_TRAP              = 47;
  892. const int NPC_TRAP8WAY          = 142;  // This enemy isn't implemented
  893. const int NPC_TRAPBACKSLASHC    = 146;  // This enemy isn't implemented
  894. const int NPC_TRAPBACKSLASHLOS  = 147; // This enemy isn't implemented
  895. const int NPC_TRAPCCLOCKWISEC   = 150; // This enemy isn't implemented
  896. const int NPC_TRAPCCLOCKWISELOS = 151; // This enemy isn't implemented
  897. const int NPC_TRAPCLOCKWISEC    = 148; // This enemy isn't implemented
  898. const int NPC_TRAPCLOCKWISELOS  = 149; // This enemy isn't implemented
  899. const int NPC_TRAPDIAG          = 143; // This enemy isn't implemented
  900. const int NPC_TRAPHORIZC        = 97;
  901. const int NPC_TRAPHORIZLOS      = 95;
  902. const int NPC_TRAPSLASHC        = 144;  // This enemy isn't implemented
  903. const int NPC_TRAPSLASHLOS      = 145;
  904. const int NPC_TRAPVERTC         = 98;
  905. const int NPC_TRAPVERTLOS       = 96;
  906. const int NPC_TRIGGER           = 116;
  907. const int NPC_VIRE              = 52;
  908. const int NPC_VIRETRIB          = 91;
  909. const int NPC_WALLMASTER        = 48;
  910. const int NPC_WIZZROBE1         = 56; // Teleports
  911. const int NPC_WIZZROBE2         = 57; // Phases through blocks
  912. const int NPC_WIZZROBEBAT       = 107;
  913. const int NPC_WIZZROBEBAT2      = 108; // This enemy isn't implemented
  914. const int NPC_WIZZROBEFIRE      = 99;
  915. const int NPC_WIZZROBEICE       = 153; // This enemy isn't implemented
  916. const int NPC_WIZZROBEMIRR      = 113;
  917. const int NPC_WIZZROBESUMM      = 152;
  918. const int NPC_WIZZROBEWIND      = 100;
  919. const int NPC_ZOL               = 43;
  920. const int NPC_ZOLFIRE           = 162;
  921. const int NPC_ZOLFIRETRIB       = 164;
  922. const int NPC_ZOLTRIB           = 89;
  923. const int NPC_ZORA              = 33;
  924.  
  925. //NPC hit point values. Use with npc->HP to make the enemy die in a special manner.
  926. const int HP_SILENT = -1000;  // The enemy will die without their Death Sound playing.
  927.  
  928. //NPC Attribute 1 constants. Use with npc->Attributes.
  929. const int NPCA1_1SHOT           = 0;
  930. const int NPCA1_ENDHALT         = 1;
  931. const int NPCA1_RAPIDFIRE       = 2;
  932. const int NPCA1_1FAST           = 3;
  933. const int NPCA1_1SLANT          = 4;
  934. const int NPCA1_3SHOTS          = 5;
  935. const int NPCA1_4SHOTS          = 6;
  936. const int NPCA1_5SHOTS          = 7;
  937. const int NPCA1_3FAST           = 8;
  938. const int NPCA1_BREATH          = 9;
  939. const int NPCA1_8SHOTS          = 10;
  940. const int NPCA1_SUMMON          = 11;
  941. const int NPCA1_SUMMONLAYER     = 12;
  942.  
  943. //NPC Attribute 2 constants. Use with npc->Attributes.
  944. const int NPCA2_NORMAL          = 0;
  945. const int NPCA2_SPLITHIT        = 1;
  946. const int NPCA2_SPLIT           = 2;
  947. const int NPCA2_8SHOTS          = 3;
  948. const int NPCA2_EXPLODE         = 4;
  949. const int NPCA2_TRIBBLE         = 5;
  950.  
  951. //NPC Attribute 7 constants. Use with npc->Attributes.
  952. const int NPCA7_NORMAL          = 0;
  953. const int NPCA7_TEMPJINX        = 1;
  954. const int NPCA7_PERMJINX        = 2;
  955. const int NPCA7_CUREJINX        = 3;
  956. const int NPCA7_LOSEMAGIC       = 4;
  957. const int NPCA7_LOSERUPEES      = 5;
  958. const int NPCA7_DRUNK           = 6;
  959. const int NPCA7_EATITEMS        = 7;
  960. const int NPCA7_EATMAGIC        = 8;
  961. const int NPCA7_EATRUPEES       = 9;
  962.  
  963. //NPC Attribute 9 constants. Use with npc->Attributes.
  964. const int NPCA9_NORMAL          = 0;
  965. const int NPCA9_ROPE            = 1;
  966. const int NPCA9_VIRE            = 2;
  967. const int NPCA9_POLSVOICE       = 3;
  968.  
  969. //NPC Defenses. Use as indices to npc->Defense[].
  970. const int NPCD_ARROW            = 3;
  971. const int NPCD_BEAM         = 10;
  972. const int NPCD_BRANG            = 0;
  973. const int NPCD_BOMB         = 1;
  974. const int NPCD_BYRNA            = 16;
  975. const int NPCD_FIRE         = 4;
  976. const int NPCD_HAMMER           = 8;
  977. const int NPCD_HOOKSHOT         = 7;
  978. const int NPCD_MAGIC            = 6;
  979. const int NPCD_REFBEAM          = 11;
  980. const int NPCD_REFMAGIC         = 12;
  981. const int NPCD_REFFIREBALL      = 13;
  982. const int NPCD_REFROCK          = 14;
  983. const int NPCD_SBOMB            = 2;
  984. const int NPCD_SCRIPT           = 17;
  985. const int NPCD_STOMP            = 15;
  986. const int NPCD_SWORD            = 9;
  987. const int NPCD_WAND         = 5;
  988.  
  989. //NPC Defense types. Use with npc->Defense[].
  990. const int NPCDT_NONE            = 0;
  991. const int NPCDT_HALFDAMAGE      = 1;
  992. const int NPCDT_QUARTERDAMAGE       = 2;
  993. const int NPCDT_STUN            = 3;
  994. const int NPCDT_STUNORBLOCK     = 4;
  995. const int NPCDT_STUNORIGNORE        = 5;
  996. const int NPCDT_BLOCK1          = 6;
  997. const int NPCDT_BLOCK2          = 7;
  998. const int NPCDT_BLOCK4          = 8;
  999. const int NPCDT_BLOCK6          = 9;
  1000. const int NPCDT_BLOCK8          = 10;
  1001. const int NPCDT_BLOCK           = 11;
  1002. const int NPCDT_IGNORE1         = 12;
  1003. const int NPCDT_IGNORE          = 13;
  1004. const int NPCDT_ONEHITKILL      = 14;
  1005.  
  1006. //NPC Misc.
  1007. const int NPCM_0POWERWEAPS      = 0x0001; //Damaged by 0-Power Weapons
  1008. const int NPCM_ISINVISIBLE      = 0x0002; //Is Invisible
  1009. const int NPCM_NEVERRETURNS         = 0x0004; //Never Returns After Death
  1010. const int NPCM_NOT_BEATABLE         = 0x0008; //Doesn't Count as beatable Enemy
  1011. const int NPCM_SPAWNFLICKER         = 0x0010; //Unused.
  1012. //! These may be offset here, as MM defines:
  1013. //! const int NPCMF_SPAWNFLICKER = 0x0010; //Spawn animation = flicker (???)
  1014. //! in stdExtra.zh.  If so, the values should be offset to include this, ending at 0x2000.
  1015. // Fixed
  1016. const int NPCM_ONLY_LENS        = 0x0020; //Only Seen By Lens of truth
  1017. const int NPCM_FLASHING         = 0x0040; //Is Flashing
  1018. const int NPCM_FLICKERING       = 0x0080; //Is Flickering
  1019. const int NPCM_TRANSLUCENT      = 0x0100; //Is translucent
  1020. const int NPCM_SHIELDED_FRONT       = 0x0200; //Shielded on Front
  1021. const int NPCM_SHIELDED_LEFT        = 0x0400; //Shielded on Left
  1022. const int NPCM_SHIELDED_RIGHT       = 0x0800; //Shielded on Right
  1023. const int NPCM_SHIELDED_BACK        = 0x1000; //Shielded on Back
  1024. const int NPCM_HAMMERBREAKS         = 0x2000; //Hammer Can break Shield
  1025.  
  1026. //NPC Spawn Flags
  1027. const int NPCSF_ZORA            = 0x0001; //Spawned by Zora Screen Flag
  1028. const int NPCSF_FALLINGROCK     = 0x0002; //Spawned by Falling Rocks Screen Flag
  1029. const int NPCSF_CORNERTRAP      = 0x0004; //Spawned by Corner Traps Screen Flag
  1030. const int NPCSF_HORIZTRAP       = 0x0008; //Spawned by Horiz Trap Combo Type or Flag
  1031. const int NPCSF_VERTTRAP        = 0x0010; //Spawned by Vert Trap Combo Type or Flag
  1032. const int NPCSF_4WAYTRAP        = 0x0020; //Spawned by 4-Way Trap Combo Type or Flag
  1033. const int NPCSF_LRTRAP          = 0x0040; //Spawned by LR Trap Combo Type or Flag
  1034. const int NPCSF_UPTRAP          = 0x0080; //Spawned by UD Trap Combo Type or Flag
  1035. const int NPCSF_MIDTRAP         = 0x0100; //Spawned by Middle Traps Screen Flag
  1036. const int NPCSF_STATUEFIRE      = 0x0200; //Spawned by Statue Fire Screen Flag
  1037. const int NPCSF_ARMOS           = 0x0400; //Spawned by Armos Combo Type
  1038. const int NPCSF_GRAVE           = 0x0800; //Spawned by Grave Combo Type
  1039. const int NPCSF_GANONROOM       = 0x1000; //Spawned by Ganon Room Type
  1040. const int NPCSF_SPAWNANIM       = 0x2000; //Spawn Animation Type
  1041.  
  1042. //Enemy projectile weapon selections. Use with npc->Weapon.
  1043. //Note: Don't use these with Screen->CreateEWeapon! Use the EW_ constants instead.
  1044. const int WPN_NONE              = 0;
  1045. const int WPN_ENEMYFLAME        = 140;
  1046. const int WPN_ENEMYWIND         = 141;
  1047. const int WPN_ENEMYFIREBALL     = 129;
  1048. const int WPN_ENEMYARROW        = 130;
  1049. const int WPN_ENEMYBRANG        = 131;
  1050. const int WPN_ENEMYSWORD        = 132;
  1051. const int WPN_ENEMYROCK         = 133;
  1052. const int WPN_ENEMYMAGIC        = 134;
  1053. const int WPN_ENEMYBOMB         = 135;
  1054. const int WPN_ENEMYSBOMB        = 136;
  1055. const int WPN_ENEMYLITBOMB      = 137;
  1056. const int WPN_ENEMYLITSBOMB     = 138;
  1057. const int WPN_ENEMYFIRETRAIL    = 139;
  1058. const int WPN_ENEMYFLAME2       = 142;
  1059. const int WPN_ENEMYFLAME2TRAIL  = 143; // Not implemented
  1060. const int WPN_ENEMYICE          = 144; // Not implemented
  1061. const int WPN_ENEMYFIREBALL2    = 145; // A fireball that doesn't fly toward Link
  1062.  
  1063. //Default item drop sets. Use with npc->ItemSet
  1064. const int IS_NONE               = 0;
  1065. const int IS_DEFAULT            = 1;
  1066. const int IS_BOMBS              = 2;
  1067. const int IS_MONEY              = 3;
  1068. const int IS_LIFE               = 4;
  1069. const int IS_BOMB100            = 5; // Used by Dodongos
  1070. const int IS_SBOMB100           = 6; // Used by Dodongos
  1071. const int IS_MAGIC              = 7;
  1072. const int IS_MAGICBOMBS         = 8;
  1073. const int IS_MAGICMONEY         = 9;
  1074. const int IS_MAGICLIFE          = 10;
  1075. const int IS_MAGIC2             = 11;
  1076. const int IS_COMBOS     = 12; // Used by Tall Grass / Bush / Slash combos.
  1077.  
  1078. //Boss palettes. Use with npc->BossPal
  1079. const int BPAL_AQUA             = 0;
  1080. const int BPAL_GLEEOK           = 1;
  1081. const int BPAL_DODONGO          = 2;
  1082. const int BPAL_GANON            = 3;
  1083. const int BPAL_BROWN            = 4;
  1084. const int BPAL_PILE             = 5;  // Used for the Dust Pile.
  1085. const int BPAL_BLUE             = 6;
  1086. const int BPAL_RED              = 7;
  1087. const int BPAL_GOLD             = 8;
  1088. const int BPAL_ICON1            = 9;  // Used for Quest Icon 1.
  1089. const int BPAL_ICON2            = 10; // Used for Quest Icon 2.
  1090. const int BPAL_ICON3            = 11; // Used for Quest Icon 3.
  1091. const int BPAL_ICON4            = 12; // Used for Quest Icon 4.
  1092. const int BPAL_GLEEOKF          = 13;
  1093. const int BPAL_FROZEN           = 14; // Unused
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099. ///////////////////
  1100. /// Script Drawing
  1101.  
  1102. //Draw styles. Use with item->DrawStyle
  1103. const int DS_NORMAL             = 0;
  1104. const int DS_PHANTOM            = 1;
  1105. const int DS_CLOAKED            = 2;
  1106. const int DS_LINK               = 3;
  1107.  
  1108. // Font types. Use with Screen->DrawCharacter *note -some of these fonts may not represent normal ascii characters,
  1109. //and all of these are completely undocumented. Use at your own peril
  1110. const int FONT_Z1               = 0;
  1111. const int FONT_Z3               = 1;
  1112. const int FONT_Z3SMALL          = 2;
  1113. const int FONT_DEF              = 3;
  1114. const int FONT_L                = 4;
  1115. const int FONT_L2               = 5;
  1116. const int FONT_P                = 6;
  1117. const int FONT_MATRIX           = 7;
  1118. const int FONT_ZTIME            = 8;
  1119. const int FONT_S                = 9;
  1120. const int FONT_S2               = 10;
  1121. const int FONT_SP               = 11;
  1122. const int FONT_SUBSCREEN1       = 12;
  1123. const int FONT_SUBSCREEN2       = 13;
  1124. const int FONT_SUBSCREEN3       = 14;
  1125. const int FONT_SUBSCREEN4       = 15;
  1126. const int FONT_GBLA             = 16;
  1127. const int FONT_GORON            = 17;
  1128. const int FONT_ZORAN            = 18;
  1129. const int FONT_HYLIAN1          = 19;
  1130. const int FONT_HYLIAN2          = 20;
  1131. const int FONT_HYLIAN3          = 21;
  1132. const int FONT_HYLIAN4          = 22;
  1133. const int FONT_GBORACLE         = 23;
  1134. const int FONT_GBORACLEP        = 24;
  1135. const int FONT_DSPHANTOM        = 25;
  1136. const int FONT_DSPHANTOMP       = 26;
  1137.  
  1138. // PrintString Text Formats. Use with Screen->DrawString.
  1139. const int TF_NORMAL             = 0; // treats the left-most char as (x)
  1140. const int TF_CENTERED           = 1; // prints the string centered on (x)
  1141. const int TF_RIGHT              = 2; // treats the right-most char as (x)
  1142.  
  1143. // Texture mapping rendering modes. Use with Screen->"Psuedo 3D" or "*3D" drawing routines. ie; Polygon, Quad, or Triangle
  1144. const int PT_FLAT               = 0; // single color shading
  1145. const int PT_FLATSHADED         = 1; // "" with flat shading (*3D only)
  1146. const int PT_COLSHADED          = 2; // "" with color shading (*3D only)
  1147. const int PT_TEXTURE            = 3; // texture mapped polygon using 2d linear interpolation
  1148. const int PT_PTEXTURE           = 4; // ""
  1149. const int PT_MASKTEXTURE        = 5; // transparent texture mapped polygon using 2d linear interpolation
  1150. const int PT_MASKPTEXTURE       = 6; // ""
  1151. const int PT_LITTEXTURE         = 7; // "" with lighting (*3D only)
  1152. const int PT_LITPTEXTURE        = 8; // "" (*3D only)
  1153. const int PT_MASKLITTEXTURE     = 9; // "" with transparency
  1154. const int PT_MASKLITPTEXTURE    = 10; // ""
  1155. const int PT_TRANSTEXTURE       = 11; // translucent texture mapped polygon using 2d linear interpolation
  1156. const int PT_TRANSPTEXTURE      = 12; // ""
  1157. const int PT_MASKTRANSTEXTURE   = 13; // translucent and transparent texture mapped polygon using 2d linear interpolation
  1158. const int PT_MASKTRANSPTEXTURE  = 14; // ""
  1159.  
  1160. // Opacity options. Use with drawing commands.
  1161. const int OP_TRANS              = 64;
  1162. const int OP_OPAQUE             = 128;
  1163. const float OP_XOR      = 1234.9875; //REMOVE from PUBLIC Docs
  1164.  
  1165. // Render Targets. Use with Screen->"*RenderTarget" and Screen->"Bitmap" drawing routines.
  1166. const int RT_SCREEN             = -1; // draws to screen
  1167. const int RT_BITMAP0            = 0; // draws to off-screen bitmap 0
  1168. const int RT_BITMAP1            = 1; // draws to off-screen bitmap 1
  1169. const int RT_BITMAP2            = 2; // draws to off-screen bitmap 2
  1170. const int RT_BITMAP3            = 3; // draws to off-screen bitmap 3
  1171. const int RT_BITMAP4            = 4; // draws to off-screen bitmap 4
  1172. const int RT_BITMAP5            = 5; // draws to off-screen bitmap 5
  1173. const int RT_BITMAP6            = 6; // draws to off-screen bitmap 6
  1174.  
  1175.  
  1176.  
  1177.  
  1178. /////////////////////////
  1179. /// DMaps, Screens, Rooms
  1180.  
  1181. //Screen Flag categories. Flags from each category are ORed together, starting with the first flag
  1182. //See Screen Data dialog for what flags are contained in each category. Use in Screen->Flags
  1183. const int SF_ROOMTYPE           = 0;
  1184. const int SF_VIEW           = 1;
  1185. const int SF_SECRETS            = 2;
  1186. const int SF_WARP           = 3;
  1187. const int SF_ITEMS          = 4;
  1188. const int SF_COMBOS         = 5;
  1189. const int SF_SAVE           = 6;
  1190. const int SF_FFC            = 7;
  1191. const int SF_WHISTLE            = 8;
  1192. const int SF_MISC           = 9;
  1193.  
  1194.  
  1195. //! These DMap Flag values do not return the expected results when compared via TraeS()ing what is anticipated!
  1196.  
  1197. //Screen Flag Roomtype
  1198. const int SFR_INTERIOR = 0; //0x0000 ?
  1199. const int SFR_DUNGEON = 1; //0x0001
  1200. const int SFR_SIDEVIEW = 2; //0x0002
  1201.  
  1202. //Screen Flag View
  1203. const int SFV_INVISLINK = 0; //0x0001;
  1204. const int SFV_NOLINKMARKER = 1;// 0x0002;
  1205. const int SFV_NOSUBSCREEN = 2;// 0x0004;
  1206. const int SFV_NOOFFSET = 3; // 0x0008; //'...but don't offset'
  1207. const int SFV_LAYER2BG = 4; // 0x0010; //Layer 2 is Background
  1208. const int SFV_LAYER3BG = 5; //0x0020;
  1209. const int SFV_DARKROOM = 6; //0x0040;
  1210.  
  1211. //Screen Flag Secrets
  1212. const int SFS_BLOCKSHUT = 0; //0x0001; //Block->Shutters
  1213. const int SFS_TEMPSECRETS = 1; //0x0002; //Secrets are temporary.
  1214. const int SFS_TRIGPERM = 2; //0x0004; //All Triggers->Perm Secret
  1215. const int SFS_ALLTRIGFLAGS = 3; //0x0008; //All triggers->16-31
  1216.  
  1217. //Screen Flag Warp
  1218. const int SFW_AUTODIRECT = 0; //  0x0001; //Auto Warps are Direct
  1219. const int SFW_SENDDIRECT = 1; //0x0002; //Sensitive Warps are direct.
  1220. const int SFW_MAZEPATHS = 2; //0x0004; //Use maze Path
  1221. const int SFW_MAZEOVERRIDE = 3; //0x0008; //maze Overrides Sidewarps
  1222. const int SFW_SPRITECARRY = 4; //0x0010; //Sprites carry over.
  1223.  
  1224.  
  1225. //Screen Flag Items
  1226. const int SFI_HOLDUP = 0; //0x0001; //Hold up item.
  1227. const int SFI_FALLS = 1; //0x0002; //Falls from ceiling
  1228.  
  1229. //Screen Flag Combos
  1230. const int SFC_MIDAIR = 0;// 0x0001; //Combos affect midair Link
  1231. const int SFC_CYCLEINIT = 1; //0x0002; //Cycle combos on screen init.
  1232. const int SFC_IGNOREBOOTS = 2; //0x0004; //Damage combos ignore boots.
  1233. const int SFC_TOGGLERINGS = 3; //0x0008; //Toggle 'Rings Affect Combos'
  1234.  
  1235. //Screen Flag Save
  1236. const int SFSV_SAVECONTHERE = 0; //0x0001; //Save Point->ontinue here.
  1237. const int SFSV_SAVEONENTRY = 1; //0x0002; //Save game on entry.
  1238. const int SFSV_CONTHERE = 2; // 0x0004; //Comtinue here.
  1239. const int SFSV_NOCONTINUEWARP = 3; //0x0008; //No continue Here after warp.
  1240.  
  1241. //Screen Flags FFC
  1242. const int SFF_WRAP = 0;  //  0x0001; //Freeform Combos Wrap Around
  1243. const int SFF_NOCARRYOVER = 1; //0x0002; //No FFC carry over.
  1244.  
  1245. //Screen Flags Whistle
  1246. const int SFW_STAIRS = 0; //0x0001; //Whistle->Stairs
  1247. const int SFW_PALCHANGE = 1; //0x0002; //Whistle->Palette Change
  1248. const int SFW_DRYLAKE = 2; //0x0004; //Whistle->Dry lake
  1249.  
  1250. //Misc. Screen flags. OR (|) these together to use (Read-Only).
  1251. const int SFM_ALLOW_LADDER  = 0; //0x0001; //Toggle 'Allow Ladder'
  1252. const int SFM_NO_DIVING     = 1; //0x0002; //Toggle 'No Diving'
  1253. const int SFM_SCRIPT1       = 2; //0x0004; //General use 1 (Scripts)
  1254. const int SFM_SCRIPT2       = 3; //0x0008; //General use 2 (Scripts)
  1255. const int SFM_SCRIPT3       = 4; //0x0010; //General use 3 (Scripts)
  1256. const int SFM_SCRIPT4       = 5; //0x0020; //General use 4 (Scripts)
  1257. const int SFM_SCRIPT5       = 6; //0x0040; //General use 5 (Scripts)
  1258.  
  1259. //Screen Enemy Flag categories, handled in the same way as the SF_ constants.
  1260. //Use in Screen->EFlags
  1261. const int SEF_SPAWN             = 0;
  1262. const int SEF_LIST1             = 1; //left-hand list
  1263. const int SEF_LIST2             = 2; //right-hand list
  1264.  
  1265. //Room types (Screen => Room Type)
  1266. //Use with Screen->RoomType
  1267. const int RT_DOORREPAIR         = 5;
  1268. const int RT_FEEDTHEGORIYA      = 7;
  1269. const int RT_GAMBLE             = 4;
  1270. const int RT_GANON              = 15;
  1271. const int RT_ITEMPOND           = 17; //doesn't work
  1272. const int RT_LEARNSLASH         = 19;
  1273. const int RT_LEVEL9ENTRANCE     = 8;
  1274. const int RT_MAGICUPGRADE       = 18;
  1275. const int RT_MONEYORLIFE        = 12;
  1276. const int RT_MOREARROWS         = 20;
  1277. const int RT_MOREBOMBS          = 11;
  1278. const int RT_NONE               = 0;
  1279. const int RT_PAYFORINFO         = 2;
  1280. const int RT_POTIONORHEART      = 6;
  1281. const int RT_POTIONSHOP         = 9;
  1282. const int RT_SECRETMONEY        = 3;
  1283. const int RT_SHOP               = 10;
  1284. const int RT_SPECIALITEM        = 1;
  1285. const int RT_STAIRWARP          = 14;
  1286. const int RT_TAKEONEITEM        = 21;
  1287. const int RT_TENRUPEES          = 13;
  1288. const int RT_ZELDA              = 16;
  1289.  
  1290. //DMap Flag constants. Use with Game->DMapFlags.
  1291. const int DMF_CAVESNOTCELLARS       = 0x0001; //Use caves instead of item cellars
  1292. const int DMF_3STAIRWARPS       = 0x0002; //Allow 3-stair warps
  1293. const int DMF_WWIND         = 0x0004; //Allow whistle whirlwinds
  1294. const int DMF_GUYCAVES          = 0x0008; //Special rooms and guys are in caves only
  1295. const int DMF_NOCOMPASS         = 0x0010; //Don't display compass marker in minimap
  1296. const int DMF_WAVY          = 0x0020; //Underwater wave effect
  1297. const int DMF_WWINDRET          = 0x0040; //Whistle whirlwind returns Link to start
  1298. const int DMF_ALWAYSINTROMSG        = 0x0080; //Always display intro string
  1299. const int DMF_VIEWMAP               = 0x0100; //View overworld map by pressing 'Map'
  1300. const int DMF_DMAPMAP               = 0x0200; //...But only show screens marked in minimap
  1301. const int DMF_MINIMAPCOLORFIX       = 0x0400; //Use minimap foreground colour 2
  1302. const int DMF_MINIMAPCOLOURFIX      = 0x0400; //Use minimap foreground colour 2
  1303. const int DMF_SCRIPT1           = 0x0800; //DMap Script Flags
  1304. const int DMF_SCRIPT2           = 0x1000;
  1305. const int DMF_SCRIPT3           = 0x2000;
  1306. const int DMF_SCRIPT4           = 0x4000;
  1307. const int DMF_SCRIPT5           = 0x8000;
  1308.  
  1309. //Screen states. Use these with Screen->State[], etc.
  1310. const int ST_DOORUP         = 0; // The locked/bomb door has been permanently unlocked/bombed
  1311. const int ST_DOORDOWN           = 1; // The locked/bomb door has been permanently unlocked/bombed
  1312. const int ST_DOORLEFT           = 2; // The locked/bomb door has been permanently unlocked/bombed
  1313. const int ST_DOORRIGHT          = 3; // The locked/bomb door has been permanently unlocked/bombed
  1314. const int ST_ITEM           = 4; // If set, the item is gone
  1315. const int ST_SPECIALITEM        = 5; // If set, the Cave/Item Cellar/Dive For Item/Armos item is gone
  1316. const int ST_ENEMYNORETURN      = 6; // If set, enemies won't return
  1317. const int ST_TEMPNORETURN       = 7; // If set, enemies won't return. This is automatically unset when you leave the DMap
  1318. const int ST_LOCKBLOCK          = 8; // The lock block on the screen has been triggered
  1319. const int ST_BOSSLOCKBLOCK      = 9; // The boss lock block on the screen has been triggered
  1320. const int ST_CHEST          = 10; // The unlocked chest on this screen has been opened
  1321. const int ST_LOCKEDCHEST        = 11; // The locked chest on this screen has been opened
  1322. const int ST_BOSSCHEST          = 12; // The boss chest on this screen has been opened
  1323. const int ST_SECRET         = 13; // Screen Secrets have been made permanent
  1324. const int ST_VISITED            = 14; // If set, this screen will appear on the Overworld Map
  1325.  
  1326. //Door types. Use with Screen->Door[]
  1327. const int D_WALL                = 0;
  1328. const int D_OPEN                = 1;
  1329. const int D_LOCKED              = 2;
  1330. const int D_UNLOCKED            = 3; // A locked door that has been opened
  1331. const int D_SHUTTER             = 4; // Defeat enemies to unlock this door
  1332. const int D_BOMB                = 6; // A door that changes when bombed
  1333. const int D_BOMBED              = 7; // A door that has been bombed
  1334. const int D_WALKTHRU            = 8; // Push against the wall to pass through
  1335. const int D_BOSSLOCKED          = 10;
  1336. const int D_BOSSUNLOCKED        = 11; // A boss door that has been opened
  1337. const int D_OPENSHUTTER         = 12; // A shutter that has been opened
  1338. const int D_1WAYSHUTTER         = 14; // A shutter that locks behind you and never opens
  1339.  
  1340. //Sprite lists. Use with Screen->ClearSprites()
  1341. const int SL_GUYS               = 0; // Enemies
  1342. const int SL_ITEMS              = 1; // Items
  1343. const int SL_EWPNS              = 2; // Enemy weapons
  1344. const int SL_LWPNS              = 3; // Link's weapons
  1345. const int SL_DECORATIONS        = 4; // Grass clippings, Hover boots glow, etc.
  1346. const int SL_PARTICLES          = 5; // Farore's Wind particles
  1347.  
  1348. //Warp types. Use with Screen->SetSideWarp
  1349. const int WT_CAVE           = 0;
  1350. const int WT_PASSAGE            = 1;
  1351. const int WT_ENTRANCEEXIT       = 2;
  1352. const int WT_SCROLLING          = 3;
  1353. const int WT_IAWARP         = 4;
  1354. const int WT_IWARPBLACKOUT      = 5;
  1355. const int WT_IWARPOPENWIPE      = 6;
  1356. const int WT_IWARPZAP           = 7;
  1357. const int WT_IWARPWAVE          = 8;
  1358. const int WT_NOWARP         = 9;
  1359.  
  1360.  
  1361. ///////////////////
  1362. /// Link Properties
  1363.  
  1364. //Link actions
  1365. const int LA_NONE               = 0;
  1366. const int LA_WALKING            = 1;
  1367. const int LA_ATTACKING          = 2;
  1368. const int LA_FROZEN             = 3;
  1369. const int LA_HOLD1LAND          = 4; // One hand.
  1370. const int LA_HOLD2LAND          = 5; // Both hands.
  1371. const int LA_RAFTING            = 6;
  1372. const int LA_GOTHURTLAND        = 7;
  1373. const int LA_INWIND             = 8;
  1374. const int LA_SCROLLING          = 9;
  1375. const int LA_WINNING            = 10;
  1376. const int LA_SWIMMING           = 11;
  1377. const int LA_HOPPING            = 12; // Leaving water.
  1378. const int LA_GOTHURTWATER       = 13;
  1379. const int LA_HOLD1WATER         = 14;
  1380. const int LA_HOLD2WATER         = 15;
  1381. const int LA_CASTING            = 16; // Casting a spell.
  1382. const int LA_CAVEWALKUP         = 17;
  1383. const int LA_CAVEWALKDOWN       = 18;
  1384. const int LA_DYING              = 19;
  1385. const int LA_DROWNING           = 20;
  1386. const int LA_CHARGING           = 22; // Charging the sword.
  1387. const int LA_SPINNING           = 23; // Spin attack.
  1388. const int LA_DIVING             = 24;
  1389.  
  1390. ///////////////////////
  1391. /// Combo Types & Flags
  1392.  
  1393.  
  1394.  
  1395. //Combo flags. Use with Screen->ComboF[]
  1396. const int CF_NONE               = 0;
  1397. const int CF_PUSHUPDOWN         = 1;
  1398. const int CF_PUSH4WAY           = 2;
  1399. const int CF_WHISTLE            = 3;
  1400. const int CF_CANDLE1            = 4;
  1401. const int CF_ARROW              = 5;
  1402. const int CF_BOMB               = 6;
  1403. const int CF_FAIRY              = 7;
  1404. const int CF_RAFT               = 8;
  1405. const int CF_ARMOSSECRET        = 9;
  1406. const int CF_ARMOSITEM          = 10;
  1407. const int CF_SBOMB              = 11;
  1408. const int CF_RAFTBRANCH         = 12;
  1409. const int CF_DIVEITEM           = 13;
  1410. const int CF_ZELDA              = 15;
  1411. const int CF_SECRETS01          = 16;
  1412. const int CF_SECRETS02          = 17;
  1413. const int CF_SECRETS03          = 18;
  1414. const int CF_SECRETS04          = 19;
  1415. const int CF_SECRETS05          = 20;
  1416. const int CF_SECRETS06          = 21;
  1417. const int CF_SECRETS07          = 22;
  1418. const int CF_SECRETS08          = 23;
  1419. const int CF_SECRETS09          = 24;
  1420. const int CF_SECRETS10          = 25;
  1421. const int CF_SECRETS11          = 26;
  1422. const int CF_SECRETS12          = 27;
  1423. const int CF_SECRETS13          = 28;
  1424. const int CF_SECRETS14          = 29;
  1425. const int CF_SECRETS15          = 30;
  1426. const int CF_SECRETS16          = 31;
  1427. const int CF_TRAPH              = 32;
  1428. const int CF_TRAPV              = 33;
  1429. const int CF_TRAP4WAY           = 34;
  1430. const int CF_TRAPLR             = 35;
  1431. const int CF_TRAPUD             = 36;
  1432. const int CF_ENEMY0             = 37;
  1433. const int CF_ENEMY1             = 38;
  1434. const int CF_ENEMY2             = 39;
  1435. const int CF_ENEMY3             = 40;
  1436. const int CF_ENEMY4             = 41;
  1437. const int CF_ENEMY5             = 42;
  1438. const int CF_ENEMY6             = 43;
  1439. const int CF_ENEMY7             = 44;
  1440. const int CF_ENEMY8             = 45;
  1441. const int CF_ENEMY9             = 46;
  1442. const int CF_PUSHLR             = 47;
  1443. const int CF_PUSHUP             = 48;
  1444. const int CF_PUSHDOWN           = 49;
  1445. const int CF_PUSHLEFT           = 50;
  1446. const int CF_PUSHRIGHT          = 51;
  1447. const int CF_PUSHUPDOWNNS       = 52;
  1448. const int CF_PUSHLEFTRIGHTNS    = 53;
  1449. const int CF_PUSH4WAYNS         = 54;
  1450. const int CF_PUSHUPNS           = 55;
  1451. const int CF_PUSHDOWNNS         = 56;
  1452. const int CF_PUSHLEFTNS         = 57;
  1453. const int CF_PUSHRIGHTNS        = 58;
  1454. const int CF_PUSHUPDOWNINS      = 59;
  1455. const int CF_PUSHLEFTRIGHTINS   = 60;
  1456. const int CF_PUSH4WAYINS        = 61;
  1457. const int CF_PUSHUPINS          = 62;
  1458. const int CF_PUSHDOWNINS        = 63;
  1459. const int CF_PUSHLEFTINS        = 64;
  1460. const int CF_PUSHRIGHTINS       = 65;
  1461. const int CF_BLOCKTRIGGER       = 66;
  1462. const int CF_NOBLOCKS           = 67;
  1463. const int CF_BRANG1             = 68;
  1464. const int CF_BRANG2             = 69;
  1465. const int CF_BRANG3             = 70;
  1466. const int CF_ARROW2             = 71;
  1467. const int CF_ARROW3             = 72;
  1468. const int CF_CANDLE2            = 73;
  1469. const int CF_WANDFIRE           = 74;
  1470. const int CF_DINSFIRE           = 75;
  1471. const int CF_WANDMAGIC          = 76;
  1472. const int CF_REFMAGIC           = 77;
  1473. const int CF_REFFIREBALL        = 78;
  1474. const int CF_SWORD1             = 79;
  1475. const int CF_SWORD2             = 80;
  1476. const int CF_SWORD3             = 81;
  1477. const int CF_SWORD4             = 82;
  1478. const int CF_SWORD1BEAM         = 83;
  1479. const int CF_SWORD2BEAM         = 84;
  1480. const int CF_SWORD3BEAM         = 85;
  1481. const int CF_SWORD4BEAM         = 86;
  1482. const int CF_HOOKSHOT           = 87;
  1483. const int CF_WAND               = 88;
  1484. const int CF_HAMMER             = 89;
  1485. const int CF_STRIKE             = 90;
  1486. const int CF_BLOCKHOLE          = 91;
  1487. const int CF_MAGICFAIRY         = 92;
  1488. const int CF_ALLFAIRY           = 93;
  1489. const int CF_SINGLE             = 94;
  1490. const int CF_SINGLE16           = 95;
  1491. const int CF_NOENEMY            = 96;
  1492. const int CF_NOGROUNDENEMY      = 97;
  1493. const int CF_SCRIPT1            = 98;
  1494. const int CF_SCRIPT2            = 99;
  1495. const int CF_SCRIPT3            = 100;
  1496. const int CF_SCRIPT4            = 101;
  1497. const int CF_SCRIPT5            = 102;
  1498.  
  1499. //Combo types. Use with Screen->ComboT[]
  1500. const int CT_ARMOS              = 4;
  1501. const int CT_AWARPA             = 94;
  1502. const int CT_AWARPB             = 95;
  1503. const int CT_AWARPC             = 96;
  1504. const int CT_AWARPD             = 97;
  1505. const int CT_AWARPR             = 98;
  1506. const int CT_BLOCKALL           = 118;
  1507. const int CT_BLOCKARROW1        = 111;
  1508. const int CT_BLOCKARROW2        = 112;
  1509. const int CT_BLOCKARROW3        = 113;
  1510. const int CT_BLOCKBRANG1        = 114;
  1511. const int CT_BLOCKBRANG2        = 115;
  1512. const int CT_BLOCKBRANG3        = 116;
  1513. const int CT_BLOCKFIREBALL      = 119;
  1514. const int CT_BLOCKMAGIC         = 50;
  1515. const int CT_BLOCKSWORDBEAM     = 117;
  1516. const int CT_BOSSCHEST          = 69;
  1517. const int CT_BOSSCHEST2         = 70;
  1518. const int CT_BOSSLOCKBLOCK      = 61;
  1519. const int CT_BOSSLOCKBLOCK2     = 62;
  1520. const int CT_BSGRAVE            = 64;
  1521. const int CT_BUSH               = 55;
  1522. const int CT_BUSHC              = 134;
  1523. const int CT_BUSHNEXT           = 131;
  1524. const int CT_BUSHNEXTC          = 139;
  1525. const int CT_CAVE               = 2;
  1526. const int CT_CAVE2              = 51;
  1527. const int CT_CAVE2B             = 83;
  1528. const int CT_CAVE2C             = 84;
  1529. const int CT_CAVE2D             = 85;
  1530. const int CT_CAVEB              = 74;
  1531. const int CT_CAVEC              = 75;
  1532. const int CT_CAVED              = 76;
  1533. const int CT_CENTERSTATUE       = 35;
  1534. const int CT_CENTRESTATUE       = 35;
  1535. const int CT_CHEST              = 65;
  1536. const int CT_CHEST2             = 66;
  1537. const int CT_CVDOWN             = 15;
  1538. const int CT_CVLEFT             = 16;
  1539. const int CT_CVRIGHT            = 17;
  1540. const int CT_CVUP               = 14;
  1541. const int CT_DAMAGE1            = 31;
  1542. const int CT_DAMAGE2            = 32;
  1543. const int CT_DAMAGE3            = 33;
  1544. const int CT_DAMAGE4            = 34;
  1545. const int CT_DAMAGE5            = 120;
  1546. const int CT_DAMAGE6            = 121;
  1547. const int CT_DAMAGE7            = 122;
  1548. const int CT_DIVEWARP           = 19;
  1549. const int CT_DIVEWARPB          = 89;
  1550. const int CT_DIVEWARPC          = 90;
  1551. const int CT_DIVEWARPD          = 91;
  1552. const int CT_DOCK               = 6;
  1553. const int CT_EYEBALL4WAY        = 140;
  1554. const int CT_EYEBALLA           = 52;
  1555. const int CT_EYEBALLB           = 53;
  1556. const int CT_FLOWERS            = 56;
  1557. const int CT_FLOWERSC           = 135;
  1558. const int CT_GRAVE              = 5;
  1559. const int CT_HOOKSHOTONLY       = 42;
  1560. const int CT_HSBRIDGE           = 30;
  1561. const int CT_HSGRAB             = 29;
  1562. const int CT_LADDERHOOKSHOT     = 20;
  1563. const int CT_LADDERONLY         = 63;
  1564. const int CT_LEFTSTATUE         = 11;
  1565. const int CT_LOCKBLOCK          = 59;
  1566. const int CT_LOCKBLOCK2         = 60;
  1567. const int CT_LOCKEDCHEST        = 67;
  1568. const int CT_LOCKEDCHEST2       = 68;
  1569. const int CT_MAGICPRISM         = 48;
  1570. const int CT_MAGICPRISM4WAY     = 49;
  1571. const int CT_MIRROR             = 45;
  1572. const int CT_MIRRORBACKSLASH    = 47;
  1573. const int CT_MIRRORSLASH        = 46;
  1574. const int CT_NOENEMY            = 110;
  1575. const int CT_NOFLYZONE          = 44;
  1576. const int CT_NOGROUNDENEMY      = 128;
  1577. const int CT_NOJUMPZONE         = 54;
  1578. const int CT_NONE               = 0;
  1579. const int CT_OVERHEAD           = 43;
  1580. const int CT_PIT                = 41;
  1581. const int CT_PITB               = 80;
  1582. const int CT_PITC               = 81;
  1583. const int CT_PITD               = 82;
  1584. const int CT_PITR               = 93;
  1585. const int CT_POUND              = 28;
  1586. const int CT_PUSHHEAVY          = 9;
  1587. const int CT_PUSHHEAVY2         = 26;
  1588. const int CT_PUSHHEAVY2WAIT     = 27;
  1589. const int CT_PUSHHEAVYWAIT      = 10;
  1590. const int CT_PUSHWAIT           = 8;
  1591. const int CT_RESET              = 71;
  1592. const int CT_RIGHTSTATUE        = 12;
  1593. const int CT_SAVE               = 72;
  1594. const int CT_SAVE2              = 73;
  1595. const int CT_SCREENFREEZE       = 126;
  1596. const int CT_SCREENFREEZEFF     = 127;
  1597. const int CT_SCRIPT1        = 142;
  1598. const int CT_SCRIPT2        = 143;
  1599. const int CT_SCRIPT3        = 144;
  1600. const int CT_SCRIPT4        = 145;
  1601. const int CT_SCRIPT5        = 146;
  1602. const int CT_SHALLOWWATER       = 58;
  1603. const int CT_SLASH              = 24;
  1604. const int CT_SLASHC             = 132;
  1605. const int CT_SLASHITEM          = 25;
  1606. const int CT_SLASHITEMC         = 133;
  1607. const int CT_SLASHNEXT          = 129;
  1608. const int CT_SLASHNEXTC         = 137;
  1609. const int CT_SLASHNEXTITEM      = 130;
  1610. const int CT_SLASHNEXTITEMC     = 138;
  1611. const int CT_SLOWWALK           = 13;
  1612. const int CT_SPINTILE1          = 124;
  1613. const int CT_SPINTILE2          = 125;
  1614. const int CT_STAIR              = 1;
  1615. const int CT_STAIRB             = 77;
  1616. const int CT_STAIRC             = 78;
  1617. const int CT_STAIRD             = 79;
  1618. const int CT_STAIRR             = 92;
  1619. const int CT_STEP               = 106;
  1620. const int CT_STEPALL            = 108;
  1621. const int CT_STEPCOPY           = 109;
  1622. const int CT_STEPSAME           = 107;
  1623. const int CT_STRIGFLAG          = 105;
  1624. const int CT_STRIGNOFLAG        = 104;
  1625. const int CT_SWARPA             = 99;
  1626. const int CT_SWARPB             = 100;
  1627. const int CT_SWARPC             = 101;
  1628. const int CT_SWARPD             = 102;
  1629. const int CT_SWARPR             = 103;
  1630. const int CT_SWIMWARP           = 18;
  1631. const int CT_SWIMWARPB          = 86;
  1632. const int CT_SWIMWARPC          = 87;
  1633. const int CT_SWIMWARPD          = 88;
  1634. const int CT_TALLGRASS          = 57;
  1635. const int CT_TALLGRASSC         = 136;
  1636. const int CT_TALLGRASSNEXT      = 141;
  1637. const int CT_TRAP4WAY           = 38;
  1638. const int CT_TRAPH              = 36;
  1639. const int CT_TRAPLEFTRIGHT      = 39;
  1640. const int CT_TRAPUPDOWN         = 40;
  1641. const int CT_TRAPV              = 37;
  1642. const int CT_TRIGFLAG           = 22;
  1643. const int CT_TRIGNOFLAG         = 21;
  1644. const int CT_WALKSLOW           = 13;
  1645. const int CT_WATER              = 3;
  1646. const int CT_ZELDA              = 23;
  1647.  
  1648.  
  1649. //////////////////
  1650. /// FFC Properties
  1651.  
  1652. //FFC Flags. To be used as indices into ffc->Flags[].
  1653. const int FFCF_OVERLAY          = 0; // Draw Over (draw between layers 4 and 5)
  1654. const int FFCF_TRANS            = 1; // Translucent
  1655. const int FFCF_SOLID            = 2; // Unused
  1656. const int FFCF_CARRYOVER        = 3; // Carry Over
  1657. const int FFCF_STATIONARY       = 4; // Stationary
  1658. const int FFCF_CHANGER          = 5; // Is A Changer
  1659. const int FFCF_PRELOAD          = 6; // Run Script On Screen Init
  1660. const int FFCF_LENSVIS          = 7; // Only Visible to Lens of Truth
  1661. const int FFCF_RESET            = 8; // Script Resets When Carried Over
  1662. const int FFCF_ETHEREAL         = 9; // The FFC's Combo Type is ignored.
  1663. const int FFCF_IGNOREHOLDUP     = 10; // The FFC is updated while Link is holding up an item
  1664.  
  1665.  
  1666.  
  1667.  
  1668. //Aim-type constants, for use with AimEWeapon
  1669. const int AT_NONE       = 0;
  1670. const int AT_4DIR       = 1;
  1671. const int AT_8DIR       = 2;
  1672. const int AT_ANGULAR        = 3;
  1673. const int AT_RAND4DIR       = 4;
  1674. const int AT_RAND8DIR       = 5;
  1675. const int AT_RANDANGULAR    = 6;
  1676.  
  1677. //Tile and Side Warps
  1678. const int TILEWARP_A        = 0;
  1679. const int TILEWARP_B        = 1;
  1680. const int TILEWARP_C        = 2;
  1681. const int TILEWARP_D        = 3;
  1682. const int SIDEWARP_A        = 0;
  1683. const int SIDEWARP_B        = 1;
  1684. const int SIDEWARP_C        = 2;
  1685. const int SIDEWARP_D        = 3;
  1686.  
  1687. //Array Handling
  1688. //const float MALLOC_FREE = 214747.9898; //Used with malloc to determine is an index is available.
  1689. //const float MALLOC_RESERVED = 214747.8989; //used with Malloc to reserve indices.
  1690.  
  1691. //! Moved to mem.zh
  1692.  
  1693. //Drawing texture Modes
  1694.  
  1695. const int TEX_BITMAP        = 214739;
  1696.  
  1697. //Constants for AdjacentCombo()
  1698.  
  1699. const int CMB_UPLEFT    = 0;
  1700. const int CMB_UP        = 1;
  1701. const int CMB_UPRIGHT   = 2;
  1702. const int CMB_RIGHT     = 3;
  1703. const int CMB_DOWNRIGHT = 4;
  1704. const int CMB_DOWN      = 5;
  1705. const int CMB_DOWNLEFT  = 6;
  1706. const int CMB_LEFT      = 7;
  1707. const int CMB_LEFTUP    = 0; //Not 8, as those are dir + shield
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement