Advertisement
ZoriaRPG

std_constants.zh - 13JUNE2017

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