1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 // TlkOverride.h: interface for the CTlkOverride class.
22 //////////////////////////////////////////////////////////////////////
29 #include "FileStream.h"
30 #include "Interface.h"
32 #ifdef CACHE_TLK_OVERRIDE
35 typedef std::map
<ieStrRef
, char *> StringMapType
;
38 #define STRREF_START 300000
39 #define SEGMENT_SIZE 512
40 #define TOH_HEADER_SIZE 20
42 //the original games used these strings for custom biography (another quirk of the IE)
43 #define BIO_START 62016 //first BIO string
44 #define BIO_END (BIO_START+5) //last BIO string
56 #ifdef CACHE_TLK_OVERRIDE
57 StringMapType stringmap
;
64 void UpdateFreeOffset(ieDword NewFree
);
65 void CloseResources();
66 DataStream
*GetAuxHdr(bool create
);
67 DataStream
*GetAuxTlk(bool create
);
68 ieStrRef
GetNewStrRef();
69 ieDword
LocateString(ieStrRef strref
);
70 char* LocateString2(ieDword offset
);
74 virtual ~CTlkOverride();
77 char *ResolveAuxString(ieStrRef strref
, int &Length
);
78 ieStrRef
UpdateString(ieStrRef strref
, const char *newvalue
);
79 char *CS(const char *src
);
82 #endif //TLKOVERRIDE_H