ModelConstants.hh

Go to the documentation of this file.
00001 /*
00002  * hack4u
00003  * Copyright (C) 2004-2008 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of hack4u.
00007  *
00008  * hack4u is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * hack4u is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with hack4u; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022 
00023 // $Id: ModelConstants.hh,v 1.10 2008/12/16 22:12:52 jdratlif Exp $
00024 
00025 #ifndef HACK4U_MODELCONSTANTS_HH_
00026 #define HACK4U_MODELCONSTANTS_HH_
00027 
00028 #include <utility>
00029 
00030 /// SRAM offset for partial avatarhoods
00031 #define AVATAR_OFFSET 0x14
00032 
00033 /// SRAM offset for the Balloon's latitude
00034 #define BALLOON_LATITUDE_OFFSET 0xF1
00035 
00036 /// SRAM offset for the Balloon's longitude
00037 #define BALLOON_LONGITUDE_OFFSET 0xF0
00038 
00039 /// SRAM offset for the primary checksum
00040 #define CHECKSUM_OFFSET 0x00
00041 
00042 /// Starting SRAM offset for chracater current HP
00043 #define CURRENT_HP_OFFSET 0x71
00044 
00045 /// Starting SRAM offset for chracater current MP
00046 #define CURRENT_MP_OFFSET 0x91
00047 
00048 /// Starting SRAM offset for chracater dexterity
00049 #define DEXTERITY_OFFSET 0xB1
00050 
00051 /// Starting SRAM offset for equipment
00052 #define EQUIPMENT_OFFSET 0x39
00053 
00054 /// Starting SRAM offset for chracater experience
00055 #define EXPERIENCE_OFFSET 0xB9
00056 
00057 /// SRAM offset for gold
00058 #define GOLD_OFFSET 0x27
00059 
00060 /// Starting SRAM offset for herbs
00061 #define HERB_OFFSET 0x1F
00062 
00063 /// Starting SRAM offset for chracater intelligence
00064 #define INTELLIGENCE_OFFSET 0xA9
00065 
00066 /// SRAM offset for joined members
00067 #define JOINED_OFFSET 0xB
00068 
00069 /// Starting SRAM offset for chracater levels
00070 #define LEVEL_OFFSET 0x69
00071 
00072 /// Starting SRAM offset for magic
00073 #define MAGIC_OFFSET 0x1B
00074 
00075 /// Starting SRAM offset for chracater max HP
00076 #define MAX_HP_OFFSET 0x81
00077 
00078 /// Starting SRAM offset for chracater max MP
00079 #define MAX_MP_OFFSET 0x99
00080 
00081 /// Starting SRAM offset for the party members
00082 #define MEMBER_OFFSET 0x15
00083 
00084 /// SRAM offset for the moon phases
00085 #define MOON_OFFSET 0x01
00086 
00087 /// SRAM offset for the hero's name
00088 #define NAME_OFFSET 0x02
00089 
00090 /// SRAM offset for captured pirate ships
00091 #define PIRATESHIP_OFFSET 0xED
00092 
00093 /// Starting SRAM offset for Pirate Ship latitude
00094 #define PIRATESHIP_LATITUDE_OFFSET 0xF5
00095 
00096 /// Starting SRAM offset for Pirate Ship longitude
00097 #define PIRATESHIP_LONGITUDE_OFFSET 0xF4
00098 
00099 /// SRAM offset for Runes
00100 #define RUNES_OFFSET 0x1A
00101 
00102 /// The starting offset within the SRAM of the sanity values
00103 #define SANITY_OFFSET 0x1900
00104 
00105 /// The first sanity check XOR
00106 #define SANITY_XOR1 0xAA
00107 
00108 /// The second sanity check XOR
00109 #define SANITY_XOR2 0x55
00110 
00111 /// The size of a particular save game
00112 #define SAVE_SIZE 0x200
00113 
00114 /// Starting offset within the SRAM of the save games
00115 #define SRAM_OFFSET 0x1A00
00116 
00117 /// The size of SRAM
00118 #define SRAM_SIZE 0x2000
00119 
00120 /// The start location
00121 #define START_LOCATION 0x107
00122 
00123 /// SRAM offset for Stones
00124 #define STONES_OFFSET 0x19
00125 
00126 /// Starting SRAM offset for chracater strength
00127 #define STRENGTH_OFFSET 0xA1
00128 
00129 /// Starting SRAM offset for tools
00130 #define TOOL_OFFSET 0x29
00131 
00132 /// Starting SRAM offset for virtues 
00133 #define VIRTUE_OFFSET 0x0C
00134 
00135 /// SRAM offset for the whirlpool's latitude
00136 #define WHIRLPOOL_LATITUDE_OFFSET 0xF3
00137 
00138 /// SRAM offset for the whirlpool's longitude
00139 #define WHIRLPOOL_LONGITUDE_OFFSET 0xF2
00140 
00141 namespace hack4u {
00142     /// The eight characters
00143     enum Character {MAGE, BARD, FIGHTER, DRUID, 
00144                     TINKER, PALADIN, RANGER, SHEPHERD};
00145     
00146     /// The eight cities of virtue
00147     enum City {MOONGLOW, BRITAIN, JHELOM, YEW, 
00148                MINOC, TRINSIC, SKARABRAE, MAGINCIA};
00149                     
00150     /// The eight herbs (reagents)
00151     enum Herb {ASH, GINSENG, GARLIC, SILKWEB, MOSS, PEARL, FUNGUS, MANROOT};
00152                      
00153     /// The possible magic in the game
00154     enum Magic {LIGHT, MISSILE, AWAKEN, CURE, WIND, HEAL, FIRE, EXIT, DISPEL,
00155                 VIEW, PROTECT, ICE, BLINK, ENERGY, QUICK, INVALID1, SLEEP,
00156                 REFLECT, NEGATE, INVALID2, DESTROY, JINX, SQUISH, GATE,
00157                 TREMOR, LIFE, INVALID3, DEFEAT};
00158                 
00159     /// The two moons of Ultima
00160     enum Moon {TRAMMEL, FELUCCA};
00161     
00162     /// The capture pirate ships
00163     enum PirateShip {SHIP1, SHIP2, SHIP3, SHIP4};
00164     
00165     /// The possible starting locations
00166     enum StartLocation {MOONGLOW_INN = 0x5, BRITAIN_INN, JHELOM_INN, YEW_INN,
00167                         MINOC_INN, TRINSIC_INN, SKARABRAE_INN,
00168                         VESPER_INN = 0xE};
00169     
00170     /// The tools
00171     enum Tool {TORCH, GEM, KEY, OIL, SEXTANT, SCALE, FLUTE, CANDLE, BOOK,
00172                 BELL, WHEEL, HORN, SKULL, TRUTHKEY, COURAGEKEY, LOVEKEY};
00173                 
00174     /// The eight virtues
00175     enum Virtue {HONESTY, COMPASSION, VALOR, JUSTICE,
00176                   SACRIFICE, HONOR, SPIRITUALITY, HUMILITY};
00177                   
00178     /// Found offsets for the eight runes
00179     extern const std::pair<int, int> FOUND_RUNES_OFFSET[];
00180     
00181     /// Found offsets for the eight stones
00182     extern const std::pair<int, int> FOUND_STONES_OFFSET[];
00183     
00184     ///  Found offset for the Bell of Courage
00185     extern const std::pair<int, int> FOUND_BELL_OFFSET;
00186     
00187     /// Found offset for the Book of Truth
00188     extern const std::pair<int, int> FOUND_BOOK_OFFSET;
00189     
00190     /// Found offset for the Candle of Love
00191     extern const std::pair<int, int> FOUND_CANDLE_OFFSET;
00192     
00193     /// Found offset for the Flute
00194     extern const std::pair<int, int> FOUND_FLUTE_OFFSET;
00195     
00196     /// Found offset for the Silver Horn
00197     extern const std::pair<int, int> FOUND_HORN_OFFSET;
00198     
00199     /// Found offset for the Scale
00200     extern const std::pair<int, int> FOUND_SCALE_OFFSET;
00201     
00202     /// Found offset for Mondain's Skull
00203     extern const std::pair<int, int> FOUND_SKULL_OFFSET;
00204 }
00205 
00206 #endif
00207 

Generated on Mon Dec 29 01:19:00 2008 for hack4u by  doxygen 1.5.4