Added GemRB sources

This commit is contained in:
pelya
2010-12-14 09:47:29 +00:00
parent 674da851ef
commit 38bceffddd
455 changed files with 137680 additions and 0 deletions
@@ -0,0 +1,2 @@
#SUBDIRS = sdl
noinst_HEADERS = *.h
@@ -0,0 +1,31 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
#ifndef RGBACOLOR_H
#define RGBACOLOR_H
struct RevColor {
unsigned char b,g,r,a;
};
struct Color {
unsigned char r,g,b,a;
};
#endif
@@ -0,0 +1,89 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file SClassID.h
* Defines ID numbers identifying the various plugins.
* Needed for loading the plugins on MS Windows.
* @author The GemRB Project
*/
#ifndef SCLASS_ID_H
#define SCLASS_ID_H
/** Type of plugin ID numbers */
typedef unsigned long SClass_ID;
#define IE_2DA_CLASS_ID 0x000003F4
#define IE_ACM_CLASS_ID 0x00010000
#define IE_ARE_CLASS_ID 0x000003F2
#define IE_BAM_CLASS_ID 0x000003E8
#define IE_BCS_CLASS_ID 0x000003EF
#define IE_BS_CLASS_ID 0x100003EF
#define IE_BIF_CLASS_ID 0x00020000
#define IE_BIO_CLASS_ID 0x000003FE //also .res
#define IE_BMP_CLASS_ID 0x00000001
#define IE_PNG_CLASS_ID 0x00000003
#define IE_CHR_CLASS_ID 0x000003FA
#define IE_CHU_CLASS_ID 0x000003EA
#define IE_CRE_CLASS_ID 0x000003F1
#define IE_DLG_CLASS_ID 0x000003F3
#define IE_EFF_CLASS_ID 0x000003F8
#define IE_GAM_CLASS_ID 0x000003F5
#define IE_IDS_CLASS_ID 0x000003F0
#define IE_INI_CLASS_ID 0x00000802
#define IE_ITM_CLASS_ID 0x000003ED
#define IE_MOS_CLASS_ID 0x000003EC
#define IE_MUS_CLASS_ID 0x00040000
#define IE_MVE_CLASS_ID 0x00000002
#define IE_BIK_CLASS_ID 0x00FFFFFF
#define IE_OGG_CLASS_ID 0x00000007
#define IE_PLT_CLASS_ID 0x00000006
#define IE_PRO_CLASS_ID 0x000003FD
#define IE_SAV_CLASS_ID 0x00050000
#define IE_SPL_CLASS_ID 0x000003EE
#define IE_SRC_CLASS_ID 0x00000803
#define IE_STO_CLASS_ID 0x000003F6
#define IE_TIS_CLASS_ID 0x000003EB
#define IE_TLK_CLASS_ID 0x00060000
#define IE_TOH_CLASS_ID 0x00070000
#define IE_TOT_CLASS_ID 0x00080000
#define IE_VAR_CLASS_ID 0x00090000
#define IE_VEF_CLASS_ID 0x000003FC
#define IE_VVC_CLASS_ID 0x000003FB
#define IE_WAV_CLASS_ID 0x00000004
#define IE_WED_CLASS_ID 0x000003E9
#define IE_WFX_CLASS_ID 0x00000005
#define IE_WMP_CLASS_ID 0x000003F7
#define IE_SCRIPT_CLASS_ID 0x000D0000
#define IE_GUI_SCRIPT_CLASS_ID 0x000E0000
typedef unsigned long PluginID;
enum {
PLUGIN_OPCODES_CORE = 0xABCD0001,
PLUGIN_OPCODES_ICEWIND,
PLUGIN_OPCODES_TORMENT,
PLUGIN_RESOURCE_KEY,
PLUGIN_RESOURCE_DIRECTORY,
PLUGIN_IMAGE_WRITER_BMP,
PLUGIN_COMPRESSION_ZLIB
};
#endif
@@ -0,0 +1,49 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file defsounds.h
* Defines default sound numbers
* @author The GemRB Project
*/
// these symbols should match defsound.2da
#ifndef IE_SOUNDS_H
#define IE_SOUNDS_H
#define DS_OPEN 0
#define DS_CLOSE 1
#define DS_HOPEN 2
#define DS_HCLOSE 3
#define DS_BUTTON_PRESSED 4
#define DS_WINDOW_OPEN 5
#define DS_WINDOW_CLOSE 6
#define DS_OPEN_FAIL 7
#define DS_CLOSE_FAIL 8
#define DS_ITEM_GONE 9
#define DS_FOUNDSECRET 10
#define DS_RAIN 20
#define DS_SNOW 21
#define DS_LIGHTNING1 22
#define DS_LIGHTNING2 23
#define DS_LIGHTNING3 24
#endif //! IE_SOUNDS_H
@@ -0,0 +1,27 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
#ifndef ERRORS_H
#define ERRORS_H
#define GEM_OK 0
#define GEM_ERROR -1
#define GEM_EOF -2
#endif
@@ -0,0 +1,48 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
#ifndef EXPORTS_H
#define EXPORTS_H
#ifdef WIN32
# ifdef GEM_BUILD_DLL
# define GEM_EXPORT __declspec(dllexport)
# else
# define GEM_EXPORT __declspec(dllimport)
# endif
# define GEM_EXPORT_DLL extern "C" __declspec(dllexport)
#else
# if (__GNUC__ >= 3) && (__GNUC_MINOR__ >=4 || __GNUC__ > 3)
# ifdef GEM_BUILD_DLL
# define GEM_EXPORT __attribute__ ((visibility("default")))
# endif
# define GEM_EXPORT_DLL extern "C" __attribute__ ((visibility("default")))
# endif
#endif
#ifndef GEM_EXPORT
#define GEM_EXPORT
#endif
#ifndef GEM_EXPORT_DLL
#define GEM_EXPORT_DLL extern "C"
#endif
#endif
@@ -0,0 +1,241 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file globals.h
* Some global definitions and includes
* @author The GemRB Project
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "ie_types.h"
#define VERSION_GEMRB "0.6.3-git"
#define GEMRB_STRING "GemRB v" VERSION_GEMRB
#ifdef ANDROID
# define PACKAGE "GemRB"
# define S_IEXEC S_IXUSR
# define S_IREAD S_IRUSR
# define S_IWRITE S_IWUSR
#endif
#ifndef GLOBALS_ONLY_DEFS
#include "RGBAColor.h"
#include "SClassID.h"
#include "errors.h"
#include "win32def.h"
#include "AnimStructures.h"
#include "System/DataStream.h"
#include "Region.h"
#include "Sprite2D.h"
#include <cstdio>
#include <cstdlib>
#endif //GLOBALS_ONLY_DEFS
//Global Variables
#define IE_NORMAL 0
#define IE_SHADED 1
#define IE_STR_STRREFON 1
#define IE_STR_SOUND 2
#define IE_STR_SPEECH 4
#define IE_STR_ALLOW_ZERO 8 //0 strref is allowed
#define IE_STR_STRREFOFF 256
#define IE_STR_REMOVE_NEWLINE 0x1000 // gemrb extension: remove extraneus ending newline
// bitflag operations
// !!! Keep these synchronized with GUIDefines.py !!!
#define BM_SET 0 //gemrb extension
#define BM_AND 1
#define BM_OR 2
#define BM_XOR 3
#define BM_NAND 4 //gemrb extension
//IDS Importer Defines
#define IDS_VALUE_NOT_LOCATED -65535 // GetValue returns this if text is not found in arrays ... this needs to be a unique number that does not exist in the value[] array
#define GEM_ENCRYPTION_KEY "\x88\xa8\x8f\xba\x8a\xd3\xb9\xf5\xed\xb1\xcf\xea\xaa\xe4\xb5\xfb\xeb\x82\xf9\x90\xca\xc9\xb5\xe7\xdc\x8e\xb7\xac\xee\xf7\xe0\xca\x8e\xea\xca\x80\xce\xc5\xad\xb7\xc4\xd0\x84\x93\xd5\xf0\xeb\xc8\xb4\x9d\xcc\xaf\xa5\x95\xba\x99\x87\xd2\x9d\xe3\x91\xba\x90\xca"
/////feature flags
#define GF_HAS_KAPUTZ 0 //pst
#define GF_ALL_STRINGS_TAGGED 1 //bg1, pst, iwd1
#define GF_HAS_SONGLIST 2 //bg2
#define GF_TEAM_MOVEMENT 3 //pst
#define GF_UPPER_BUTTON_TEXT 4 //bg2
#define GF_LOWER_LABEL_TEXT 5 //bg2
#define GF_HAS_PARTY_INI 6 //iwd2
#define GF_SOUNDFOLDERS 7 //iwd2
#define GF_IGNORE_BUTTON_FRAMES 8 // all?
#define GF_ONE_BYTE_ANIMID 9 // pst
#define GF_HAS_DPLAYER 10 // not pst
#define GF_HAS_EXPTABLE 11 // iwd, iwd2
#define GF_HAS_BEASTS_INI 12 //pst; also for quests.ini
#define GF_HAS_DESC_ICON 13 //bg
#define GF_HAS_PICK_SOUND 14 //pst
#define GF_IWD_MAP_DIMENSIONS 15 //iwd, iwd2
#define GF_AUTOMAP_INI 16 //pst
#define GF_SMALL_FOG 17 //bg1, pst
#define GF_REVERSE_DOOR 18 //pst
#define GF_PROTAGONIST_TALKS 19 //pst
#define GF_HAS_SPELLLIST 20 //iwd2
#define GF_IWD2_SCRIPTNAME 21 //iwd2, iwd, how
#define GF_DIALOGUE_SCROLLS 22 //pst
#define GF_KNOW_WORLD 23 //iwd2
#define GF_REVERSE_TOHIT 24 //all except iwd2
#define GF_SAVE_FOR_HALF 25 //pst
#define GF_CHARNAMEISGABBER 26 //iwd2
#define GF_MAGICBIT 27 //iwd, iwd2
#define GF_CHECK_ABILITIES 28 //bg2 (others?)
#define GF_CHALLENGERATING 29 //iwd2
#define GF_SPELLBOOKICONHACK 30 //bg2
#define GF_ENHANCED_EFFECTS 31 //iwd2 (maybe iwd/how too)
#define GF_DEATH_ON_ZERO_STAT 32 //not in iwd2
#define GF_SPAWN_INI 33 //pst, iwd, iwd2
#define GF_IWD2_DEATHVARFORMAT 34 //iwd branch (maybe pst)
#define GF_RESDATA_INI 35 //pst
#define GF_OVERRIDE_CURSORPOS 36 //pst, iwd2
#define GF_BREAKABLE_WEAPONS 37 //only bg1
#define GF_3ED_RULES 38 //iwd2
#define GF_LEVELSLOT_PER_CLASS 39 //iwd2
#define GF_SELECTIVE_MAGIC_RES 40 //bg2, iwd2, (how)
#define GF_HAS_HIDE_IN_SHADOWS 41 // not in bg1 and pst
#define GF_AREA_VISITED_VAR 42 //iwd, iwd2
#define GF_PROPER_BACKSTAB 43 //bg2, iwd2, how?
#define GF_ONSCREEN_TEXT 44 //pst
#define GF_SPECIFIC_DMG_BONUS 45 //how, iwd2
#define GF_STRREF_SAVEGAME 46 //iwd2
#define GF_WISDOM_BONUS 47 //pst
#define GF_BIOGRAPHY_RES 48 //iwd branch
#define GF_NO_BIOGRAPHY 49 //pst
#define GF_STEAL_IS_ATTACK 50 //bg2 for sure
#define GF_CUTSCENE_AREASCRIPTS 51 //bg1, maybe more
#define GF_FLEXIBLE_WMAP 52 //iwd
#define GF_AUTOSEARCH_HIDDEN 53 //all except iwd2
#define GF_PST_STATE_FLAGS 54 //pst complicates this
#define GF_NO_DROP_CAN_MOVE 55 //bg1
#define GF_JOURNAL_HAS_SECTIONS 56 //bg2
#define GF_CASTING_SOUNDS 57 //all except pst and bg1
#define GF_CASTING_SOUNDS2 58 //bg2
//update this or bad things can happen
#define GF_COUNT 59
//the number of item usage fields (used in CREItem and STOItem)
#define CHARGE_COUNTERS 3
/////AI global defines
#define AI_UPDATE_TIME 15
/////maximum animation orientation count (used in many places)
#define MAX_ORIENT 16
/////globally used functions
class Scriptable;
class Actor;
/* this function will work with pl/cz special characters */
extern unsigned char pl_uppercase[256];
extern unsigned char pl_lowercase[256];
GEM_EXPORT void strnlwrcpy(char* d, const char *s, int l);
GEM_EXPORT void strnuprcpy(char* d, const char *s, int l);
GEM_EXPORT void strnspccpy(char* d, const char *s, int l);
#ifndef HAVE_STRNLEN
GEM_EXPORT int strnlen(const char* string, int maxlen);
#endif
GEM_EXPORT unsigned char GetOrient(const Point &s, const Point &d);
GEM_EXPORT unsigned int Distance(const Point pos, const Point pos2);
GEM_EXPORT unsigned int Distance(const Point pos, Scriptable *b);
GEM_EXPORT unsigned int SquaredMapDistance(const Point pos, Scriptable *b);
GEM_EXPORT unsigned int PersonalDistance(const Point pos, Scriptable *b);
GEM_EXPORT unsigned int SquaredPersonalDistance(const Point pos, Scriptable *b);
GEM_EXPORT unsigned int Distance(Scriptable *a, Scriptable *b);
GEM_EXPORT unsigned int SquaredDistance(Scriptable *a, Scriptable *b);
GEM_EXPORT unsigned int PersonalDistance(Scriptable *a, Scriptable *b);
GEM_EXPORT unsigned int SquaredPersonalDistance(Scriptable *a, Scriptable *b);
GEM_EXPORT unsigned int SquaredMapDistance(Scriptable *a, Scriptable *b);
GEM_EXPORT int EARelation(Scriptable *a, Actor *b);
GEM_EXPORT bool dir_exists(const char* path);
GEM_EXPORT int strlench(const char* string, char ch);
#ifndef HAVE_STRNDUP
GEM_EXPORT char* strndup(const char* s, size_t l);
#endif
#ifndef WIN32
GEM_EXPORT char* strupr(char* string);
GEM_EXPORT char* strlwr(char* string);
#endif
#ifdef WIN32
#define GetTime(store) store = GetTickCount()
#else
#include <sys/time.h>
#define GetTime(store) \
{ \
struct timeval tv; \
gettimeofday(&tv, NULL); \
store = (tv.tv_usec/1000) + (tv.tv_sec*1000); \
}
#endif
//struct ActorBlock;
inline int MIN(int a, int b)
{
return (a > b ? b : a);
}
inline int MAX(int a, int b)
{
return (a < b ? b : a);
}
inline bool valid_number(const char* string, long& val)
{
char* endpr;
val = (long) strtoul( string, &endpr, 0 );
return ( const char * ) endpr != string;
}
//we need 32+6 bytes at least, because we store 'context' in the variable
//name too
#define MAX_VARIABLE_LENGTH 40
//the maximum supported game CD count
#define MAX_CD 6
#endif //! GLOBALS_H
@@ -0,0 +1,94 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
#define FEAT_AEGIS_OF_RIME 0
#define FEAT_AMBIDEXTERITY 1
#define FEAT_AQUA_MORTIS 2
#define FEAT_ARMORED_ARCANA 3
#define FEAT_ARMOUR_PROFICIENCY 4
#define FEAT_ARTERIAL_STRIKE 5
#define FEAT_BLIND_FIGHT 6
#define FEAT_BULLHEADED 7
#define FEAT_CLEAVE 8
#define FEAT_COMBAT_CASTING 9
#define FEAT_COURTEOUS_MAGOCRACY 10
#define FEAT_CRIPPLING_STRIKE 11
#define FEAT_DASH 12
#define FEAT_DEFLECT_ARROWS 13
#define FEAT_DIRTY_FIGHTING 14
#define FEAT_DISCIPLINE 15
#define FEAT_DODGE 16
#define FEAT_ENVENOM_WEAPON 17
#define FEAT_EXOTIC_BASTARD 18
#define FEAT_EXPERTISE 19
#define FEAT_EXTRA_RAGE 20
#define FEAT_EXTRA_SHAPESHIFTING 21
#define FEAT_EXTRA_SMITING 22
#define FEAT_EXTRA_TURNING 23
#define FEAT_FIENDSLAYER 24
#define FEAT_FORESTER 25
#define FEAT_GREAT_FORTITUDE 26
#define FEAT_HAMSTRING 27
#define FEAT_HERETICS_BANE 28
#define FEAT_HEROIC_INSPIRATION 29
#define FEAT_IMPROVED_CRITICAL 30
#define FEAT_IMPROVED_EVASION 31
#define FEAT_IMPROVED_INITIATIVE 32
#define FEAT_IMPROVED_TURNING 33
#define FEAT_IRON_WILL 34
#define FEAT_LIGHTNING_REFLEXES 35
#define FEAT_LINGERING_SONG 36
#define FEAT_LUCK_OF_HEROES 37
#define FEAT_MARTIAL_AXE 38
#define FEAT_MARTIAL_BOW 39
#define FEAT_MARTIAL_FLAIL 40
#define FEAT_MARTIAL_GREATSWORD 41
#define FEAT_MARTIAL_HAMMER 42
#define FEAT_MARTIAL_LARGESWORD 43
#define FEAT_MARTIAL_POLEARM 44
#define FEAT_MAXIMIZED_ATTACKS 45
#define FEAT_MERCANTILE_BACKGROUND 46
#define FEAT_POWER_ATTACK 47
#define FEAT_PRECISE_SHOT 48
#define FEAT_RAPID_SHOT 49
#define FEAT_RESIST_POISON 50
#define FEAT_SCION_OF_STORMS 51
#define FEAT_SHIELD_PROF 52
#define FEAT_SIMPLE_CROSSBOW 53
#define FEAT_SIMPLE_MACE 54
#define FEAT_SIMPLE_MISSILE 55
#define FEAT_SIMPLE_QUARTERSTAFF 56
#define FEAT_SIMPLE_SMALLBLADE 57
#define FEAT_SLIPPERY_MIND 58
#define FEAT_SNAKE_BLOOD 59
#define FEAT_SPELL_FOCUS_ENCHANTMENT 60
#define FEAT_SPELL_FOCUS_EVOCATION 61
#define FEAT_SPELL_FOCUS_NECROMANCY 62
#define FEAT_SPELL_FOCUS_TRANSMUTE 63
#define FEAT_SPELL_PENETRATION 64
#define FEAT_SPIRIT_OF_FLAME 65
#define FEAT_STRONG_BACK 66
#define FEAT_STUNNING_FIST 67
#define FEAT_SUBVOCAL_CASTING 68
#define FEAT_TOUGHNESS 69
#define FEAT_TWO_WEAPON_FIGHTING 70
#define FEAT_WEAPON_FINESSE 71
#define FEAT_WILDSHAPE_BOAR 72
#define FEAT_WILDSHAPE_PANTHER 73
#define FEAT_WILDSHAPE_SHAMBLER 74
@@ -0,0 +1,524 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file ie_stats.h
* Definitions of creature stats codes
* @author The GemRB Project
*/
// !!! NOTE: keep this file synchronized with gemrb/GUIScripts/ie_stats.py !!!
#ifndef IE_STATS_H
#define IE_STATS_H
//EA values
#define EA_INANIMATE 1
#define EA_PC 2
#define EA_FAMILIAR 3
#define EA_ALLY 4
#define EA_CONTROLLED 5
#define EA_CHARMED 6
#define EA_CONTROLLABLE 15
#define EA_GOODBUTRED 28
#define EA_GOODBUTBLUE 29
#define EA_GOODCUTOFF 30
#define EA_NOTGOOD 31
#define EA_ANYTHING 126
#define EA_NEUTRAL 128
#define EA_NOTNEUTRAL 198
#define EA_NOTEVIL 199
#define EA_EVILCUTOFF 200
#define EA_EVILBUTGREEN 201
#define EA_EVILBUTBLUE 202
#define EA_ENEMY 255
//GENERAL values
#define GEN_HUMANOID 1 //charm?
#define GEN_ANIMAL 2 //charm animals
#define GEN_DEAD 3 //???
#define GEN_UNDEAD 4 //turn
#define GEN_GIANT 5 //???
#define GEN_FROZEN 6 //???
#define GEN_MONSTER 255
//GENDER values
#define SEX_MALE 1
#define SEX_FEMALE 2
#define SEX_OTHER 3
#define SEX_NEITHER 4
#define SEX_BOTH 5
#define SEX_SUMMON 6
#define SEX_ILLUSION 7 // bg2
#define SEX_EXTRA 8 // bg2
#define SEX_EXTRA2 0xa // ToB
#define SEX_MAXEXTRA 0x12 // ToB (extra10)
//alignment values
#define AL_GE_MASK 3 //good / evil
#define AL_GOOD 1
#define AL_GE_NEUTRAL 2
#define AL_EVIL 3
#define AL_LC_MASK 0x30 //lawful / chaotic
#define AL_LAWFUL 0x10
#define AL_LC_NEUTRAL 0x20
#define AL_CHAOTIC 0x30
#define AL_LAWFUL_GOOD (AL_LAWFUL|AL_GOOD)
#define AL_NEUTRAL_GOOD (AL_LC_NEUTRAL|AL_GOOD)
#define AL_CHAOTIC_GOOD (AL_CHAOTIC|AL_GOOD)
#define AL_LAWFUL_NEUTRAL (AL_LAWFUL|AL_GE_NEUTRAL)
#define AL_TRUE_NEUTRAL (AL_LC_NEUTRAL|AL_GE_NEUTRAL)
#define AL_CHAOTIC_NEUTRAL (AL_CHAOTIC|AL_GE_NEUTRAL)
#define AL_LAWFUL_EVIL (AL_LAWFUL|AL_EVIL)
#define AL_NEUTRAL_EVIL (AL_LC_NEUTRAL|AL_EVIL)
#define AL_CHAOTIC_EVIL (AL_CHAOTIC|AL_EVIL)
//state bits (IE_STATE)
#define STATE_SLEEP 0x00000001
#define STATE_BERSERK 0x00000002
#define STATE_PANIC 0x00000004
#define STATE_STUNNED 0x00000008
#define STATE_INVISIBLE 0x00000010
#define STATE_PST_CURSE 0x00000010
#define STATE_HELPLESS 0x00000020
#define STATE_FROZEN 0x00000040
#define STATE_PETRIFIED 0x00000080
#define STATE_D3 0x00000100
#define STATE_PST_MIRROR 0x00000100
#define STATE_D4 0x00000200
#define STATE_D5 0x00000400
#define STATE_DEAD 0x00000800
#define STATE_SILENCED 0x00001000
#define STATE_CHARMED 0x00002000
#define STATE_POISONED 0x00004000
#define STATE_HASTED 0x00008000
#define STATE_CRIT_PROT 0x00008000
#define STATE_SLOWED 0x00010000
#define STATE_CRIT_ENH 0x00010000
#define STATE_INFRA 0x00020000
#define STATE_BLIND 0x00040000
//this appears to be a mistake in the original state.ids
//this flag is the 'deactivate' flag, Activate/Deactivate works on it
#define STATE_DISEASED 0x00080000
#define STATE_DEACTIVATED 0x00080000
#define STATE_FEEBLE 0x00100000
#define STATE_NONDET 0x00200000
#define STATE_INVIS2 0x00400000
#define STATE_EE_DUPL 0x00400000
#define STATE_BLESS 0x00800000
#define STATE_CHANT 0x01000000
#define STATE_DETECT_EVIL 0x01000000
#define STATE_HOLY 0x02000000
#define STATE_PST_INVIS 0x02000000
#define STATE_LUCK 0x04000000
#define STATE_AID 0x08000000
#define STATE_CHANTBAD 0x10000000
#define STATE_ANTIMAGIC 0x10000000
#define STATE_BLUR 0x20000000
#define STATE_MIRROR 0x40000000
#define STATE_EMBALM 0x40000000
#define STATE_CONFUSED 0x80000000
#define STATE_STILL (STATE_STUNNED | STATE_FROZEN | STATE_PETRIFIED) //not animated
#define STATE_CANTMOVE 0x80180fef
#define STATE_CANTLISTEN 0x80080fef
#define STATE_CANTSTEAL 0x00180fc0 //can't steal from
#define STATE_CANTSEE 0x00080fc0 //can't explore (even itself)
#define STATE_NOSAVE 0x00000fc0 //don't save these
#define EXTSTATE_PRAYER 0x00000001
#define EXTSTATE_PRAYER_BAD 0x00000002
#define EXTSTATE_RECITATION 0x00000004
#define EXTSTATE_REC_BAD 0x00000008
#define EXTSTATE_EYE_MIND 0x00000010
#define EXTSTATE_EYE_SWORD 0x00000020
#define EXTSTATE_EYE_MAGE 0x00000040
#define EXTSTATE_EYE_VENOM 0x00000080
#define EXTSTATE_EYE_SPIRIT 0x00000100
#define EXTSTATE_EYE_FORT 0x00000200
#define EXTSTATE_EYE_STONE 0x00000400
#define EXTSTATE_NO_HP 0x00001000 //disable hp info in berserk mode
#define EXTSTATE_NO_BACKSTAB 0x00004000
#define EXTSTATE_FLOATTEXTS 0x00008000 //weapon chatting (IWD)
#define EXTSTATE_DEAF 0x00020000
#define EXTSTATE_NO_WAKEUP 0x80000000 //original HoW engine put this on top of eye_mind
#define EXTSTATE_SEVEN_EYES 0x000007f0
//Multiclass flags
#define MC_SHOWLONGNAME 0x0001
#define MC_REMOVE_CORPSE 0x0002
#define MC_KEEP_CORPSE 0x0004
#define MC_WAS_FIGHTER 0x0008
#define MC_WAS_MAGE 0x0010
#define MC_WAS_CLERIC 0x0020
#define MC_WAS_THIEF 0x0040
#define MC_WAS_DRUID 0x0080
#define MC_WAS_RANGER 0x0100
#define MC_WAS_ANY 0x01f8 // MC_WAS_FIGHTER | ... | MC_WAS_RANGER
#define MC_FALLEN_PALADIN 0x0200
#define MC_FALLEN_RANGER 0x0400
#define MC_EXPORTABLE 0x0800
#define MC_HIDE_HP 0x1000
#define MC_PLOT_CRITICAL 0x2000 //if dies, it means game over
#define MC_BEENINPARTY 0x8000
#define MC_HIDDEN 0x10000 //iwd
#define MC_NO_TALK 0x80000 //ignore dialoginterrupt
//stats
#define IE_HITPOINTS 0
#define IE_MAXHITPOINTS 1
#define IE_ARMORCLASS 2
#define IE_ACCRUSHINGMOD 3
#define IE_ACMISSILEMOD 4
#define IE_ACPIERCINGMOD 5
#define IE_ACSLASHINGMOD 6
#define IE_TOHIT 7
#define IE_NUMBEROFATTACKS 8
#define IE_SAVEVSDEATH 9
#define IE_SAVEVSWANDS 10
#define IE_SAVEVSPOLY 11
#define IE_SAVEVSBREATH 12
#define IE_SAVEVSSPELL 13
#define IE_SAVEFORTITUDE 9
#define IE_SAVEREFLEX 10
#define IE_SAVEWILL 11
#define IE_RESISTFIRE 14
#define IE_RESISTCOLD 15
#define IE_RESISTELECTRICITY 16
#define IE_RESISTACID 17
#define IE_RESISTMAGIC 18
#define IE_RESISTMAGICFIRE 19
#define IE_RESISTMAGICCOLD 20
#define IE_RESISTSLASHING 21
#define IE_RESISTCRUSHING 22
#define IE_RESISTPIERCING 23
#define IE_RESISTMISSILE 24
#define IE_LORE 25
#define IE_LOCKPICKING 26
#define IE_STEALTH 27
#define IE_TRAPS 28
#define IE_PICKPOCKET 29
#define IE_FATIGUE 30
#define IE_INTOXICATION 31
#define IE_LUCK 32
#define IE_TRACKING 33
#define IE_LEVEL 34
#define IE_LEVELFIGHTER 34 //for pst, iwd2
#define IE_SEX 35
#define IE_STR 36
#define IE_STREXTRA 37
#define IE_INT 38
#define IE_WIS 39
#define IE_DEX 40
#define IE_CON 41
#define IE_CHR 42
#define IE_XPVALUE 43
#define IE_CR 43 //for iwd2, not sure if this is a good idea yet
#define IE_XP 44
#define IE_GOLD 45
#define IE_MORALEBREAK 46
#define IE_MORALERECOVERYTIME 47
#define IE_REPUTATION 48
#define IE_HATEDRACE 49
#define IE_DAMAGEBONUS 50
#define IE_SPELLFAILUREMAGE 51
#define IE_SPELLFAILUREPRIEST 52
#define IE_SPELLDURATIONMODMAGE 53
#define IE_SPELLDURATIONMODPRIEST 54
#define IE_TURNUNDEADLEVEL 55
#define IE_BACKSTABDAMAGEMULTIPLIER 56
#define IE_LAYONHANDSAMOUNT 57
#define IE_HELD 58
#define IE_POLYMORPHED 59
#define IE_TRANSLUCENT 60
#define IE_IDENTIFYMODE 61
#define IE_ENTANGLE 62
#define IE_SANCTUARY 63
#define IE_MINORGLOBE 64
#define IE_SHIELDGLOBE 65
#define IE_GREASE 66
#define IE_WEB 67
#define IE_LEVEL2 68
#define IE_LEVELMAGE 68 //pst, iwd2
#define IE_LEVEL3 69
#define IE_LEVELTHIEF 69 //pst, iwd2
#define IE_CASTERHOLD 70
#define IE_ENCUMBRANCE 71
#define IE_MISSILEHITBONUS 72
#define IE_MAGICDAMAGERESISTANCE 73
#define IE_RESISTPOISON 74
#define IE_DONOTJUMP 75
#define IE_AURACLEANSING 76
#define IE_MENTALSPEED 77
#define IE_PHYSICALSPEED 78
#define IE_CASTINGLEVELBONUSMAGE 79
#define IE_CASTINGLEVELBONUSCLERIC 80
#define IE_SEEINVISIBLE 81
#define IE_IGNOREDIALOGPAUSE 82
#define IE_MINHITPOINTS 83
#define IE_HITBONUSRIGHT 84
#define IE_HITBONUSLEFT 85
#define IE_DAMAGEBONUSRIGHT 86
#define IE_DAMAGEBONUSLEFT 87
#define IE_STONESKINS 88
#define IE_FEAT_BOW 89
#define IE_FEAT_CROSSBOW 90
#define IE_FEAT_SLING 91
#define IE_FEAT_AXE 92
#define IE_FEAT_MACE 93
#define IE_FEAT_FLAIL 94
#define IE_FEAT_POLEARM 95
#define IE_FEAT_HAMMER 96
#define IE_FEAT_STAFF 97
#define IE_FEAT_GREAT_SWORD 98
#define IE_FEAT_LARGE_SWORD 99
#define IE_FEAT_SMALL_SWORD 100
#define IE_FEAT_TOUGHNESS 101
#define IE_FEAT_ARMORED_ARCANA 102
#define IE_FEAT_CLEAVE 103
#define IE_FEAT_ARMOUR 104
#define IE_FEAT_ENCHANTMENT 105
#define IE_FEAT_EVOCATION 106
#define IE_FEAT_NECROMANCY 107
#define IE_FEAT_TRANSMUTATION 108
#define IE_FEAT_SPELL_PENETRATION 109
#define IE_FEAT_EXTRA_RAGE 110
#define IE_FEAT_EXTRA_SHAPE 111
#define IE_FEAT_EXTRA_SMITING 112
#define IE_FEAT_EXTRA_TURNING 113
#define IE_FEAT_BASTARDSWORD 114
#define IE_PROFICIENCYBASTARDSWORD 89
#define IE_PROFICIENCYLONGSWORD 90
#define IE_PROFICIENCYSHORTSWORD 91
#define IE_PROFICIENCYAXE 92
#define IE_PROFICIENCYTWOHANDEDSWORD 93
#define IE_PROFICIENCYKATANA 94
#define IE_PROFICIENCYSCIMITAR 95 //wakisashininjato
#define IE_PROFICIENCYDAGGER 96
#define IE_PROFICIENCYWARHAMMER 97
#define IE_PROFICIENCYSPEAR 98
#define IE_PROFICIENCYHALBERD 99
#define IE_PROFICIENCYFLAIL 100 //morningstar
#define IE_PROFICIENCYMACE 101
#define IE_PROFICIENCYQUARTERSTAFF 102
#define IE_PROFICIENCYCROSSBOW 103
#define IE_PROFICIENCYLONGBOW 104
#define IE_PROFICIENCYSHORTBOW 105
#define IE_PROFICIENCYDART 106
#define IE_PROFICIENCYSLING 107
#define IE_PROFICIENCYBLACKJACK 108
#define IE_PROFICIENCYGUN 109
#define IE_PROFICIENCYMARTIALARTS 110
#define IE_PROFICIENCY2HANDED 111
#define IE_PROFICIENCYSWORDANDSHIELD 112
#define IE_PROFICIENCYSINGLEWEAPON 113
#define IE_PROFICIENCY2WEAPON 114
#define IE_EXTRAPROFICIENCY1 115
#define IE_ALCHEMY 115
#define IE_EXTRAPROFICIENCY2 116
#define IE_ANIMALS 116
#define IE_EXTRAPROFICIENCY3 117
#define IE_BLUFF 117
#define IE_EXTRAPROFICIENCY4 118
#define IE_CONCENTRATION 118
#define IE_EXTRAPROFICIENCY5 119
#define IE_DIPLOMACY 119
#define IE_EXTRAPROFICIENCY6 120
#define IE_INTIMIDATE 120
#define IE_EXTRAPROFICIENCY7 121
#define IE_SEARCH 121
#define IE_EXTRAPROFICIENCY8 122
#define IE_SPELLCRAFT 122
#define IE_EXTRAPROFICIENCY9 123
#define IE_MAGICDEVICE 123
#define IE_EXTRAPROFICIENCY10 124
#define IE_EXTRAPROFICIENCY11 125
#define IE_EXTRAPROFICIENCY12 126
#define IE_EXTRAPROFICIENCY13 127
#define IE_EXTRAPROFICIENCY14 128
#define IE_EXTRAPROFICIENCY15 129
#define IE_EXTRAPROFICIENCY16 130
#define IE_EXTRAPROFICIENCY17 131
#define IE_FEATS1 131
#define IE_EXTRAPROFICIENCY18 132
#define IE_FEATS2 132
#define IE_EXTRAPROFICIENCY19 133
#define IE_FEATS3 133
#define IE_EXTRAPROFICIENCY20 134
#define IE_FREESLOTS 134 //same as above
#define IE_HIDEINSHADOWS 135
#define IE_DETECTILLUSIONS 136
#define IE_SETTRAPS 137
#define IE_PUPPETMASTERID 138
#define IE_PUPPETMASTERTYPE 139
#define IE_PUPPETTYPE 140
#define IE_PUPPETID 141
#define IE_CHECKFORBERSERK 142
#define IE_BERSERKSTAGE1 143
#define IE_BERSERKSTAGE2 144
#define IE_DAMAGELUCK 145
#define IE_CRITICALHITBONUS 146
#define IE_VISUALRANGE 147
#define IE_EXPLORE 148
#define IE_THRULLCHARM 149
#define IE_SUMMONDISABLE 150
#define IE_HITBONUS 151
#define IE_KIT 152
#define IE_FORCESURGE 153
#define IE_SURGEMOD 154
#define IE_IMPROVEDHASTE 155
#define IE_INTERNAL_0 156
#define IE_INTERNAL_1 157
#define IE_INTERNAL_2 158
#define IE_INTERNAL_3 159
#define IE_INTERNAL_4 160
#define IE_INTERNAL_5 161
#define IE_INTERNAL_6 162
#define IE_INTERNAL_7 163
#define IE_INTERNAL_8 164
#define IE_INTERNAL_9 165
#define IE_SCRIPTINGSTATE1 156
#define IE_SCRIPTINGSTATE2 157
#define IE_SCRIPTINGSTATE3 158
#define IE_SCRIPTINGSTATE4 159
#define IE_SCRIPTINGSTATE5 160
#define IE_SCRIPTINGSTATE6 161
#define IE_SCRIPTINGSTATE7 162
#define IE_SCRIPTINGSTATE8 163
#define IE_SCRIPTINGSTATE9 164
#define IE_SCRIPTINGSTATE10 165
//these are genuine bg2 stats found by research
#define IE_MELEETOHIT 166
#define IE_MELEEDAMAGE 167
#define IE_MISSILEDAMAGE 168
#define IE_NOCIRCLE 169
#define IE_FISTHIT 170
#define IE_FISTDAMAGE 171
#define IE_TITLE1 172
#define IE_TITLE2 173
#define IE_DISABLEOVERLAY 174
#define IE_DISABLEBACKSTAB 175
//these are clashing with GemRB now
//176 IE_OPEN_LOCK_BONUS
//177 IE_MOVE_SILENTLY_BONUS
//178 IE_FIND_TRAPS_BONUS
//179 IE_PICK_POCKETS_BONUS
//180 IE_HIDE_IN_SHADOWS_BONUS
//181 DETECT_ILLUSIONS_BONUS
//182 SET_TRAPS_BONUS
#define IE_ENABLEOFFSCREENAI 183 // bg2 has this on this spot
#define IE_EXISTANCEDELAY 184 // affects the displaying of EXISTANCE strings
#define IE_ATTACKNUMBERDOUBLE 185 // used by haste option 2
#define IE_DISABLECHUNKING 186 // no permanent death
#define IE_NOTURNABLE 187 // immune to turn
//the IE sets this stat the same time as stat 150
//188 IE_SUMMONDISABLE2
#define IE_CHAOSSHIELD 189 // defense against wild surge
#define IE_NPCBUMP 190 // allow npcs to be bumped?
#define IE_CANUSEANYITEM 191
#define IE_ALWAYSBACKSTAB 192
#define IE_SEX_CHANGED 193 // modified by opcode 0x47
#define IE_SPELLFAILUREINNATE 194
#define IE_NOTRACKING 195 // tracking doesn't detect this
#define IE_DEADMAGIC 196
#define IE_DISABLETIMESTOP 197
#define IE_NOSEQUESTER 198 // this doesn't work in IE, but intended
#define IE_STONESKINSGOLEM 199
//actually this stat is not used for level drain
#define IE_LEVELDRAIN 200
#define IE_AVATARREMOVAL 201
//GemRB Specific Defines
//these are temporary only
#define IE_XP_MAGE 176 // XP2
#define IE_XP_THIEF 177 // XP3
#define IE_DIALOGRANGE 178 // iwd2
#define IE_MOVEMENTRATE 179
#define IE_MORALE 180 // this has no place
#define IE_BOUNCE 181 // has projectile bouncing effect
#define IE_MIRRORIMAGES 182
//
#define IE_IMMUNITY 203
#define IE_DISABLEDBUTTON 204
#define IE_ANIMATION_ID 205 //cd
#define IE_STATE_ID 206
#define IE_EXTSTATE_ID 207 //used in how/iwd2
#define IE_METAL_COLOR 208 //d0
#define IE_COLORS 208 //same
#define IE_MINOR_COLOR 209
#define IE_MAJOR_COLOR 210
#define IE_SKIN_COLOR 211
#define IE_LEATHER_COLOR 212
#define IE_ARMOR_COLOR 213
#define IE_HAIR_COLOR 214
#define IE_COLORCOUNT 214 //same
#define IE_MC_FLAGS 215
#define IE_CLASSLEVELSUM 216 //iwd2
#define IE_ALIGNMENT 217
#define IE_CASTING 218
#define IE_ARMOR_TYPE 219
#define IE_TEAM 220
#define IE_FACTION 221
#define IE_SUBRACE 222
#define IE_SPECIES 223
//temporarily here for iwd2
#define IE_HATEDRACE2 224
#define IE_HATEDRACE3 225
#define IE_HATEDRACE4 226
#define IE_HATEDRACE5 227
#define IE_HATEDRACE6 228
#define IE_HATEDRACE7 229
#define IE_HATEDRACE8 230
#define IE_RACE 231
#define IE_CLASS 232
#define IE_GENERAL 233
#define IE_EA 234
#define IE_SPECIFIC 235
#define IE_SAVEDXPOS 236
#define IE_SAVEDYPOS 237
#define IE_SAVEDFACE 238
#define IE_USERSTAT 239 //user defined stat
//These are in IWD2, but in a different place
//core class levels (fighter, mage, thief are already stored)
#define IE_LEVELBARBARIAN 240
#define IE_LEVELBARD 241
#define IE_LEVELCLERIC 242
#define IE_LEVELDRUID 243
#define IE_LEVELMONK 244
#define IE_LEVELPALADIN 245
#define IE_LEVELRANGER 246
#define IE_LEVELSORCEROR 247
// place for 2 more classes
#define IE_LEVELCLASS12 248
#define IE_LEVELCLASS13 249
// these are iwd2 spell states, iwd2 uses ~180, we have place for 192
#define IE_SPLSTATE_ID1 250
#define IE_SPLSTATE_ID2 251
#define IE_SPLSTATE_ID3 252
#define IE_SPLSTATE_ID4 253
#define IE_SPLSTATE_ID5 254
#define IE_SPLSTATE_ID6 255
#endif // ! IE_STATS_H
@@ -0,0 +1,70 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file ie_types.h
* Defines data types used to load IE structures
* @author The GemRB Project
*/
#ifndef IE_TYPES_H
#define IE_TYPES_H
#if HAVE_CONFIG_H
#include <config.h>
#endif
//we need this for Windows and Android
#if defined (WIN32) || defined (ANDROID)
#define SIZEOF_INT 4
#define SIZEOF_LONG_INT 4
#endif
//well msvc and Android likes __int64, and me too
#ifndef WIN32
#define __int64 long long
#endif
typedef unsigned char ieByte;
typedef signed char ieByteSigned;
typedef unsigned short ieWord;
typedef signed short ieWordSigned;
#if (SIZEOF_INT == 4)
typedef unsigned int ieDword;
typedef signed int ieDwordSigned;
#elif (SIZE_LONG_INT == 4)
typedef unsigned long int ieDword;
typedef signed long int ieDwordSigned;
#else
typedef unsigned long int ieDword;
typedef signed long int ieDwordSigned;
#endif
/** string reference into TLK file */
typedef ieDword ieStrRef;
/** Resource reference */
typedef char ieResRef[9];
typedef char ieVariable[33];
#endif //! IE_TYPES_H
@@ -0,0 +1,31 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ILESS_H
#define ILESS_H
#include "win32def.h" //for stricmp
struct iless {
bool operator () (const char *lhs, const char* rhs) const
{
return stricmp(lhs, rhs) < 0;
}
};
#endif
@@ -0,0 +1,99 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
* @file logging.h
* Logging definitions.
* @author The GemRB Project
*/
#ifndef LOGGING_H
#define LOGGING_H
#include "exports.h"
#ifdef ANDROID
# include <android/log.h>
#endif
#ifdef WIN32
# define ADV_TEXT
# include <conio.h>
extern GEM_EXPORT HANDLE hConsole;
# define textcolor(i) SetConsoleTextAttribute(hConsole, i)
# ifndef __MINGW32__
# define printf cprintf //broken in mingw !!
# endif
#define BLACK 0
#define RED FOREGROUND_RED
#define GREEN FOREGROUND_GREEN
#define BROWN FOREGROUND_GREEN | FOREGROUND_RED
#define BLUE FOREGROUND_BLUE
#define MAGENTA FOREGROUND_RED | FOREGROUND_BLUE
#define CYAN FOREGROUND_BLUE | FOREGROUND_GREEN
#define WHITE FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED
#define LIGHT_RED (RED | FOREGROUND_INTENSITY)
#define LIGHT_GREEN (GREEN | FOREGROUND_INTENSITY)
#define YELLOW (GREEN | RED | FOREGROUND_INTENSITY)
#define LIGHT_BLUE (BLUE | FOREGROUND_INTENSITY)
#define LIGHT_MAGENTA (MAGENTA | FOREGROUND_INTENSITY)
#define LIGHT_CYAN (CYAN | FOREGROUND_INTENSITY)
#define LIGHT_WHITE (WHITE | FOREGROUND_INTENSITY)
#define DEFAULT WHITE
#else //WIN32
# ifndef ANDROID
# include <config.h>
# endif
# include <cstdio>
# include <cstdlib>
# define textcolor(i) i
#define DEFAULT printf("\033[0m");
#define BLACK printf("\033[0m\033[30;40m");
#define RED printf("\033[0m\033[31;40m");
#define GREEN printf("\033[0m\033[32;40m");
#define BROWN printf("\033[0m\033[33;40m");
#define BLUE printf("\033[0m\033[34;40m");
#define MAGENTA printf("\033[0m\033[35;40m");
#define CYAN printf("\033[0m\033[36;40m");
#define WHITE printf("\033[0m\033[37;40m");
#define LIGHT_RED printf("\033[1m\033[31;40m");
#define LIGHT_GREEN printf("\033[1m\033[32;40m");
#define YELLOW printf("\033[1m\033[33;40m");
#define LIGHT_BLUE printf("\033[1m\033[34;40m");
#define LIGHT_MAGENTA printf("\033[1m\033[35;40m");
#define LIGHT_CYAN printf("\033[1m\033[36;40m");
#define LIGHT_WHITE printf("\033[1m\033[37;40m");
#endif //WIN32
#ifndef ANDROID
#define printBracket(status, color) textcolor(WHITE); printf("["); textcolor(color); printf("%s", status); textcolor(WHITE); printf("]")
#define printStatus(status, color) printBracket(status, color); printf("\n")
#define printMessage(owner, message, color) printBracket(owner, LIGHT_WHITE); printf(": "); textcolor(color); printf("%s", message)
#else
#define printBracket(status, color)
#define printStatus(status, color) __android_log_print(ANDROID_LOG_INFO, "GemRB", "[%s]", status)
#define printMessage(owner, message, color) __android_log_print(ANDROID_LOG_INFO, "GemRB", "%s: %s", owner, message)
#endif
#endif
@@ -0,0 +1,197 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file opcode_params.h
* Definitions for effect opcode parameters
* @author The GemRB Project
*/
#ifndef IE_OPCODE_PARAMS_H
#define IE_OPCODE_PARAMS_H
//regen/poison/disease types
#define RPD_PERCENT 1
#define RPD_POINTS 2
#define RPD_SECONDS 3
//only poison
#define RPD_ROUNDS 4
#define RPD_TURNS 5
//only disease
#define RPD_STR 4
#define RPD_DEX 5
#define RPD_CON 6
#define RPD_INT 7
#define RPD_WIS 8
#define RPD_CHA 9
#define RPD_SLOW 10
//appply spell on condition
#define COND_GOTHIT 0
#define COND_NEAR 1
#define COND_HP_HALF 2
#define COND_HP_QUART 3
#define COND_HP_LOW 4
#define COND_HELPLESS 5
#define COND_POISONED 6
#define COND_ATTACKED 7
#define COND_NEAR4 8
#define COND_NEAR10 9
#define COND_EVERYROUND 10
#define COND_TOOKDAMAGE 11
//resources for the seven eyes effect
#define EYE_MIND 0
#define EYE_SWORD 1
#define EYE_MAGE 2
#define EYE_VENOM 3
#define EYE_SPIRIT 4
#define EYE_FORT 5
#define EYE_STONE 6
//spell states
#define SS_HOPELESSNESS 0
#define SS_PROTFROMEVIL 1
#define SS_ARMOROFFAITH 2
#define SS_NAUSEA 3
#define SS_ENFEEBLED 4
#define SS_FIRESHIELD 5
#define SS_ICESHIELD 6
#define SS_HELD 7
#define SS_DEATHWARD 8
#define SS_HOLYPOWER 9
#define SS_GOODCHANT 10
#define SS_BADCHANT 11
#define SS_GOODPRAYER 12
#define SS_BADPRAYER 13
#define SS_GOODRECIT 14
#define SS_BADRECIT 15
#define SS_RIGHTEOUS 16 //allied
#define SS_RIGHTEOUS2 17 //allied and same alignment
#define SS_STONESKIN 18
#define SS_IRONSKIN 19
#define SS_SANCTUARY 20
#define SS_RESILIENT 21
#define SS_BLESS 22
#define SS_AID 23
#define SS_BARKSKIN 24
#define SS_HOLYMIGHT 25
#define SS_ENTANGLE 26
#define SS_WEB 27
#define SS_GREASE 28
#define SS_FREEACTION 29
#define SS_ENTROPY 30
#define SS_STORMSHELL 31
#define SS_ELEMPROT 32
#define SS_BERSERK 33
#define SS_BLOODRAGE 34
#define SS_NOHPINFO 35
#define SS_NOAWAKE 36
#define SS_AWAKE 37
#define SS_DEAF 38
#define SS_ANIMALRAGE 39
#define SS_NOBACKSTAB 40
#define SS_CHAOTICCMD 41
#define SS_MISCAST 42
#define SS_PAIN 43
#define SS_MALISON 44
//#define SS_CATSGRACE 45 //used explicitly
#define SS_MOLDTOUCH 46
#define SS_FLAMESHROUD 47
#define SS_EYEMIND 48
#define SS_EYESWORD 49
#define SS_EYEMAGE 50
#define SS_EYEVENOM 51
#define SS_EYESPIRIT 52
#define SS_EYEFORTITUDE 53
#define SS_EYESTONE 54
#define SS_AEGIS 55
#define SS_EXECUTIONER 56
#define SS_ENERGYDRAIN 57
#define SS_TORTOISE 58
#define SS_BLINK 59
#define SS_MINORGLOBE 60
#define SS_PROTFROMMISS 61
#define SS_GHOSTARMOR 62
#define SS_REFLECTION 63
#define SS_KAI 64
#define SS_CALLEDSHOT 65
#define SS_MIRRORIMAGE 66
#define SS_TURNED 67
#define SS_BLADEBARRIER 68
#define SS_POISONWEAPON 69
#define SS_STUNNINGBLOW 70
#define SS_QUIVERPALM 71
#define SS_DOMINATION 72
#define SS_MAJORGLOBE 73
#define SS_SHIELD 74
#define SS_ANTIMAGIC 75
#define SS_POWERATTACK 76
//more powerattack
#define SS_EXPERTISE 81
//more expertise
#define SS_ARTERIAL 86
#define SS_HAMSTRING 87
#define SS_RAPIDSHOT 88
#define SS_IRONBODY 89
#define SS_TENSER 90
#define SS_SMITEEVIL 91
#define SS_ALICORNLANCE 92
#define SS_LIGHTNING 93
#define SS_CHAMPIONS 94
#define SS_BONECIRCLE 95
#define SS_CLOAKOFFEAR 96
#define SS_PESTILENCE 97
#define SS_CONTAGION 98
#define SS_BANE 99
#define SS_DEFENSIVE 100
#define SS_DESTRUCTION 101
#define SS_DOLOROUS 102
#define SS_DOOM 103
#define SS_EXALTATION 104
#define SS_FAERIEFIRE 105
#define SS_FINDTRAPS 106
#define SS_GREATERLATH 107
#define SS_MAGICRESIST 108
#define SS_NPROTECTION 109
#define SS_PROTFROMFIRE 110
#define SS_PROTFROMLIGHTNING 111
#define SS_ELEMENTAL 112
#define SS_LATHANDER 113
#define SS_SLOWPOISON 114
#define SS_SPELLSHIELD 115
#define SS_STATICCHARGE 116
#define SS_ACIDARROW 117
#define SS_FREEZING 118
#define SS_PROTFROMACID 119
#define SS_PROTFROMELEC 120
#define SS_PFNMISSILES 121
#define SS_PROTFROMPETR 122
#define SS_ENFEEBLEMENT 123
#define SS_SEVENEYES 124
//#define SS_SOULEATER 125
#define SS_LOWERRESIST 140
#define SS_LUCK 141
//tested for this, splstate is wrong or this entry has two uses
#define SS_DAYBLINDNESS 178
#define SS_REBUKED 179
#endif //IE_OPCODE_PARAMS_H
@@ -0,0 +1,12 @@
#ifndef OPERATORBOOL_H
#define OPERATORBOOL_H
// Copied from boost/smart_ptr/detail/operator_bool.hpp
#ifndef _MSC_VER
#define OPERATOR_BOOL(Class,T,ptr) operator T* Class::*() const { return ptr == NULL ? NULL : &Class::ptr; }
#else // MSVC6
// FIXME: Figure out what version doesn't need this hack.
#define OPERATOR_BOOL(Class,T,ptr) operator bool() const { return ptr != NULL; }
#endif
#endif
@@ -0,0 +1,60 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2007 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file overlays.h
* the possible hardcoded overlays (they got separate stats or bits)
* the numbers are compliant with the internals of IWD2
* @author The GemRB Project
*/
#define OVERLAY_COUNT 32
#define OV_SANCTUARY 0
#define OV_ENTANGLE 1
#define OV_WISP 2 //iwd2
#define OV_SPELLTRAP 2 //bg2
#define OV_SHIELDGLOBE 3
#define OV_GREASE 4
#define OV_WEB 5
#define OV_MINORGLOBE 6
#define OV_GLOBE 7
#define OV_SHROUD 8
#define OV_ANTIMAGIC 9
#define OV_RESILIENT 10
#define OV_NORMALMISS 11
#define OV_CLOAKFEAR 12
#define OV_ENTROPY 13
#define OV_FIREAURA 14
#define OV_FROSTAURA 15
#define OV_INSECT 16
#define OV_STORMSHELL 17
#define OV_LATH1 18
#define OV_LATH2 19
#define OV_GLATH1 20
#define OV_GLATH2 21
#define OV_SEVENEYES 22
#define OV_SEVENEYES2 23
#define OV_BOUNCE 24 //bouncing
#define OV_BOUNCE2 25 //bouncing activated
#define OV_FIRESHIELD1 26
#define OV_FIRESHIELD2 27
#define OV_ICESHIELD1 28
#define OV_ICESHIELD2 29
#define OV_TORTOISE 30
#define OV_DEATHARMOR 31
@@ -0,0 +1,204 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
* @file plugindef.h
* Macros for defining plugins.
* @author The GemRB Project
*
* This file should be included once in each plugin. This file defines several
* entry points to the plugin and a set of macros to describe the contents
* of the plugin.
*
* A typical use is
* @code
* #include "plugindef.h"
*
* GEMRB_PLUGIN(0xD768B1, "BMP File Reader")
* PLUGIN_IE_RESOURCE(BMPImporter, ".bmp", IE_BMP_CLASS_ID)
* END_PLUGIN()
* @endcode
*
* The plugin description block should start with a call to GEMRB_PLUGIN and
* end with a call to END_PLUGIN, and have only calls to PLUGIN_* macros
* defined here in between.
*
* @def GEMRB_PLUGIN
* Starts a plugin declaration block
* @param[in] id Arbitrary unique to distinguish loadable modules.
* @param[in] desc Description of loadable module.
*
* PluginMgr will not load multiple plugins with the same id.
*
* @def PLUGIN_CLASS
* Register a class to be accessed through PluginMgr::GetPlugin
* @param[in] id Identifier to refer to this class.
* @param[in] cls Class to register. Must be a descendent of Plugin.
*
* PluginMgr will not register multiple classes with the same id, but
* will report an error and unload the module.
*
* @def PLUGIN_DRIVER
* Register a class to be accessed through PluginMgr::GetDriver.
* @param[in] cls Class to register. Must be a descendent of Plugin.
* @param[in] name
*
* PluginMgr will not register multiple classes with the same name.
*
* @def PLUGIN_RESOURCE
* Registers a resource through ResourceManager.
* @param[in] cls Class to register.
* @param[in] ext Extension of resource files.
*
* The class given must derive from a subclass of Resource that
* contains a static member ID of type TypeID. Any number of class
* extension pairs can be registerd. They will be tried in turn when a
* resource of the given subclass is requested.
*
* If the resource exists in bif files, then \ref{PLUGIN_IE_RESOURCE}
* should be used instead.
*
* @def PLUGIN_IE_RESOURCE
* Registers a resource through ResourceManager.
* @param[in] ie_id Type id that appears in BIF files.
*
* See \ref{PLUGIN_RESOURCE} for details. The ie_id will be used when
* searching chitin.key.
*
* @def PLUGIN_INITIALIZER
* Registers a function to do global intialization.
* @param[in] func Function to call at startup.
*
* This function is called during Interface initialization.
*
* @def PLUGIN_CLEANUP
* Registers a function to do global cleanup
* @param[in] func Function to call at shutdown.
*
* This function is called during Interface cleanup.
*
* @def END_PLUGIN
* End a plugin declaration block.
*/
#ifndef PLUGINDEF_H
#define PLUGINDEF_H
#include "exports.h"
#include "PluginMgr.h"
template <typename T>
struct CreatePlugin {
static Plugin *func()
{
return new T();
}
};
template <typename Res>
struct CreateResource {
static Resource* func(DataStream *str)
{
Res *res = new Res();
if (res->Open(str)) {
return res;
} else {
delete res;
return NULL;
}
}
};
#ifndef STATIC_LINK
#ifdef WIN32
#include <windows.h>
BOOL APIENTRY DllMain(HANDLE /*hModule*/, DWORD /*ul_reason_for_call*/,
LPVOID /*lpReserved*/)
{
return true;
}
#endif
GEM_EXPORT_DLL const char* GemRBPlugin_Version()
{
return VERSION_GEMRB;
}
#define GEMRB_PLUGIN(id, desc) \
GEM_EXPORT_DLL PluginID GemRBPlugin_ID() { \
return id; \
} \
GEM_EXPORT_DLL const char* GemRBPlugin_Description() { \
return desc; \
} \
GEM_EXPORT_DLL bool GemRBPlugin_Register(PluginMgr *mgr) {
#define PLUGIN_CLASS(id, cls) \
if (!mgr->RegisterPlugin(id, &CreatePlugin<cls>::func ))\
return false;
#define PLUGIN_DRIVER(cls, name) \
mgr->RegisterDriver(&cls::ID, name, &CreatePlugin<cls>::func ); \
#define PLUGIN_RESOURCE(cls, ext) \
mgr->RegisterResource(&cls::ID, &CreateResource<cls>::func, ext);
#define PLUGIN_IE_RESOURCE(cls, ext, ie_id) \
mgr->RegisterResource(&cls::ID, &CreateResource<cls>::func, ext, ie_id);
#define PLUGIN_INITIALIZER(func) \
mgr->RegisterInitializer(func);
#define PLUGIN_CLEANUP(func) \
mgr->RegisterCleanup(func);
/* mgr is not null (this makes mgr used) */
#define END_PLUGIN() \
return mgr!=0; \
}
#else /* STATIC_LINK */
#define GEMRB_PLUGIN(id, desc) \
namespace { bool doRegisterPlugin = (
#define PLUGIN_CLASS(id, cls) \
PluginMgr::Get()->RegisterPlugin(id, &CreatePlugin<cls>::func ),
#define PLUGIN_DRIVER(cls, name) \
PluginMgr::Get()->RegisterDriver(&cls::ID, name, &CreatePlugin<cls>::func ),
#define PLUGIN_RESOURCE(cls, ext) \
PluginMgr::Get()->RegisterResource(&cls::ID, &CreateResource<cls>::func, ext),
#define PLUGIN_IE_RESOURCE(cls, ext, ie_id) \
PluginMgr::Get()->RegisterResource(&cls::ID, &CreateResource<cls>::func, ext, ie_id),
#define PLUGIN_INITIALIZER(func) \
PluginMgr::Get()->RegisterInitializer(func),
#define PLUGIN_CLEANUP(func) \
PluginMgr::Get()->RegisterCleanup(func),
#define END_PLUGIN() \
true); }
#endif /* STATIC_LINK */
#endif
@@ -0,0 +1,197 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file strrefs.h
* Defines indices of "standard" strings in strings.2da files
* @author The GemRB Project
*/
// these symbols should match strings.2da
#ifndef IE_STRINGS_H
#define IE_STRINGS_H
#define STR_SCATTERED 0
#define STR_WHOLEPARTY 1
#define STR_DOORLOCKED 2
#define STR_MAGICTRAP 3
#define STR_NORMALTRAP 4
#define STR_TRAP 5
#define STR_CANNOTGO 6
#define STR_TRAPREMOVED 7
#define STR_OVERSTOCKED 8
#define STR_SLEEP 9
#define STR_AMBUSH 10
#define STR_CONTLOCKED 11
#define STR_NOMONEY 12
#define STR_CURSED 13
#define STR_SPELLDISRUPT 14
#define STR_DIED 15
#define STR_MAYNOTREST 16
#define STR_CANTRESTMONS 17
#define STR_CANTSAVEMONS 18
#define STR_CANTSAVE 19
#define STR_NODIALOG 20
#define STR_CANTSAVEDIALOG 21
#define STR_CANTSAVEDIALOG2 22
#define STR_CANTSAVEMOVIE 23
#define STR_TARGETBUSY 24
#define STR_CANTTALKTRANS 25
#define STR_GOTGOLD 26
#define STR_LOSTGOLD 27
#define STR_GOTXP 28
#define STR_LOSTXP 29
#define STR_GOTITEM 30
#define STR_LOSTITEM 31
#define STR_GOTREP 32
#define STR_LOSTREP 33
#define STR_GOTABILITY 34
#define STR_GOTSPELL 35
#define STR_GOTSONG 36
#define STR_NOTHINGTOSAY 37
#define STR_JOURNALCHANGE 38
#define STR_WORLDMAPCHANGE 39
#define STR_PAUSED 40
#define STR_UNPAUSED 41
#define STR_SCRIPTPAUSED 42
#define STR_AP_UNUSABLE 43
#define STR_AP_ATTACKED 44
#define STR_AP_HIT 45
#define STR_AP_WOUNDED 46
#define STR_AP_DEAD 47
#define STR_AP_NOTARGET 48
#define STR_AP_ENDROUND 49
#define STR_AP_ENEMY 50
#define STR_AP_TRAP 51
#define STR_AP_SPELLCAST 52
#define STR_AP_RESERVED1 53
#define STR_AP_RESERVED2 54
#define STR_AP_RESERVED3 55
#define STR_AP_RESERVED4 56
#define STR_CHARMED 57
#define STR_DIRECHARMED 58
#define STR_CONTROLLED 59
#define STR_EVIL 60
#define STR_GE_NEUTRAL 61
#define STR_GOOD 62
#define STR_LAWFUL 63
#define STR_LC_NEUTRAL 64
#define STR_CHAOTIC 65
#define STR_ACTION_CAST 66
#define STR_ACTION_ATTACK 67
#define STR_ACTION_TURN 68
#define STR_ACTION_SONG 69
#define STR_ACTION_FINDTRAP 70
#define STR_MAGICWEAPON 71
#define STR_OFFHAND_USED 72
#define STR_TWOHANDED_USED 73
#define STR_CANNOT_USE_ITEM 74
#define STR_CANT_DROP_ITEM 75
#define STR_NOT_IN_OFFHAND 76
#define STR_ITEM_IS_CURSED 77
#define STR_NO_CRITICAL 78
#define STR_TRACKING 79
#define STR_TRACKINGFAILED 80
#define STR_DOOR_NOPICK 81
#define STR_CONT_NOPICK 82
#define STR_CANTSAVECOMBAT 83
#define STR_CANTSAVENOCTRL 84
#define STR_LOCKPICK_DONE 85
#define STR_LOCKPICK_FAILED 86
#define STR_STATIC_DISS 87
#define STR_LIGHTNING_DISS 88
#define STR_UNUSABLEITEM 89 //item has no usable ability
#define STR_ITEMID 90 //item needs identify
#define STR_WRONGITEMTYPE 91
#define STR_ITEMEXCL 92
#define STR_PICKPOCKET_DONE 93 //done
#define STR_PICKPOCKET_NONE 94 //no items to steal
#define STR_PICKPOCKET_FAIL 95 //failed, noticed
#define STR_PICKPOCKET_EVIL 96 //can't pick hostiles
#define STR_PICKPOCKET_ARMOR 97 //armor restriction
#define STR_USING_FEAT 98
#define STR_STOPPED_FEAT 99
#define STR_DISARM_DONE 100 //trap disarmed
#define STR_DISARM_FAIL 101 //trap not disarmed
#define STR_DOORBASH_DONE 102
#define STR_DOORBASH_FAIL 103
#define STR_CONTBASH_DONE 104
#define STR_CONTBASH_FAIL 105
#define STR_MAYNOTSETTRAP 106
#define STR_SNAREFAILED 107
#define STR_SNARESUCCEED 108
#define STR_NOMORETRAP 109
#define STR_DISABLEDMAGE 110
#define STR_SAVESUCCEED 111
#define STR_QSAVESUCCEED 112
#define STR_UNINJURED 113 //uninjured
#define STR_INJURED1 114
#define STR_INJURED2 115
#define STR_INJURED3 116
#define STR_INJURED4 117 //near death
#define STR_HOURS 118 //<HOUR> hours
#define STR_HOUR 119
#define STR_DAYS 120 //<GAMEDAYS> days
#define STR_DAY 121
#define STR_REST 122 //You have rested for <DURATION>
#define STR_JOURNEY 123 //The journey took <DURATION>
#define STR_PST_REST 124 //You have rested for <HOUR> <DURATION>
#define STR_PST_HOUR 125
#define STR_PST_HOURS 126
#define STR_DAMAGE_IMMUNITY 127
#define STR_DAMAGE1 128
#define STR_DAMAGE2 129
#define STR_DAMAGE3 130
#define STR_DMG_POISON 131
#define STR_DMG_MAGIC 132
#define STR_DMG_MISSILE 133
#define STR_DMG_SLASHING 134
#define STR_DMG_PIERCING 135
#define STR_DMG_CRUSHING 136
#define STR_DMG_FIRE 137
#define STR_DMG_ELECTRIC 138
#define STR_DMG_COLD 139
#define STR_DMG_ACID 140
#define STR_DMG_OTHER 141
#define STR_GOTQUESTXP 142
#define STR_LEVELUP 143
#define STR_INVFULL_ITEMDROP 144
#define STR_CONTDUP 145
#define STR_CONTTRIG 146
#define STR_CONTFAIL 147
#define STR_SEQDUP 148
#define STR_CRITICAL_HIT 149
#define STR_CRITICAL_MISS 150
#define STR_DEATH 151
#define STR_BACKSTAB 152
#define STR_BACKSTAB_BAD 153
#define STR_BACKSTAB_FAIL 154
#define STR_CASTER_LVL_INC 155 // caster level bonus (wild mages)
#define STR_CASTER_LVL_DEC 156
#define STR_EXPORTED 157 // characters exported (iwd)
#define STR_PALADIN_FALL 158
#define STR_RANGER_FALL 159
#define STR_RES_RESISTED 160
#define STRREF_COUNT 161
#endif //! IE_STRINGS_H
@@ -0,0 +1,92 @@
/* GemRB - Infinity Engine Emulator
* Copyright (C) 2003 The GemRB Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
/**
* @file win32def.h
* Some global definitions, mostly for Un*x vs. MS Windows compatibility
* @author The GemRB Project
*/
#ifndef WIN32DEF_H
#define WIN32DEF_H
#include "exports.h"
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# if _MSC_VER >= 1000
// 4251 disables the annoying warning about missing dll interface in templates
# pragma warning( disable: 4251 521 )
# pragma warning( disable: 4275 )
//disables annoying warning caused by STL:Map in msvc 6.0
# if _MSC_VER < 7000
# pragma warning(disable:4786)
# endif
# endif
# if defined(__MINGW32__) && ! defined(HAVE_SNPRINTF)
# define HAVE_SNPRINTF 1
# endif
#else //WIN32
# ifndef ANDROID
# include <config.h>
# endif
# include <cstdio>
# include <cstdlib>
# include <cstring>
# define stricmp strcasecmp
# define strnicmp strncasecmp
#endif //WIN32
#ifdef ANDROID
# define HAVE_SNPRINTF 1
#endif
#ifndef HAVE_SNPRINTF
# ifdef WIN32
# define snprintf _snprintf
# define HAVE_SNPRINTF 1
# else
# include "System/snprintf.h"
# endif
#endif
#include "System/VFS.h"
#ifdef _MSC_VER
# ifndef round
# define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
# endif
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846 // pi
#endif
#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923 // pi/2
#endif
#include "logging.h"
#endif //! WIN32DEF_H