2 # GemRB - Infinity Engine Emulator
3 # Copyright (C) 2003 The GemRB Project
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # the place for preloading the most commonly used tables
21 from ie_restype
import RES_2DA
23 # these two are only used in SetEncumbranceLabels, but that is called very often
24 StrMod
= StrModEx
= None
25 Classes
= KitList
= ClassSkills
= Races
= NextLevel
= None
29 global Classes
, KitList
, ClassSkills
, Races
, NextLevel
30 global Pdolls
, StrModEx
, StrMod
32 print # so the following output isn't appended to an existing line
34 Classes
= GemRB
.LoadTable ("classes")
35 if not KitList
and GemRB
.HasResource("kitlist", RES_2DA
):
36 KitList
= GemRB
.LoadTable ("kitlist")
38 ClassSkills
= GemRB
.LoadTable ("clskills")
40 Races
= GemRB
.LoadTable ("races")
42 NextLevel
= GemRB
.LoadTable ("xplevel")
43 if not Pdolls
and GemRB
.HasResource("pdolls", RES_2DA
):
44 Pdolls
= GemRB
.LoadTable ("pdolls")
46 StrMod
= GemRB
.LoadTable ("strmod")
47 StrModEx
= GemRB
.LoadTable ("strmodex")