22 #ifndef ULTIMA8_WORLD_WORLD_H 23 #define ULTIMA8_WORLD_WORLD_H 58 #include "ultima/ultima8/misc/common_types.h" 59 #include "ultima/ultima8/usecode/intrinsics.h" 60 #include "ultima/shared/std/containers.h" 77 static World *get_instance() {
113 return _ethereal.
empty();
118 return _ethereal.
front();
141 bool isAlertActive()
const {
145 void setAlertActive(
bool active);
147 uint8 getGameDifficulty()
const {
151 void setGameDifficulty(uint8 difficulty);
153 uint16 getControlledNPCNum()
const {
154 return _controlledNPCNum;
156 void setControlledNPCNum(uint16 num);
158 uint32 getVargasShield()
const {
159 return _vargasShield;
161 void setVargasShield(uint32 val) {
165 INTRINSIC(I_getAlertActive);
166 INTRINSIC(I_setAlertActive);
167 INTRINSIC(I_clrAlertActive);
168 INTRINSIC(I_gameDifficulty);
169 INTRINSIC(I_getControlledNPCNum);
170 INTRINSIC(I_setControlledNPCNum);
171 INTRINSIC(I_resetVargasShield);
175 void setAlertActiveRemorse(
bool active);
176 void setAlertActiveRegret(
bool active);
178 static World *_world;
187 uint16 _controlledNPCNum;
193 uint32 _vargasShield;
void reset()
reset the world (clear everything and re-initialize maps)
void loadNonFixed(Common::SeekableReadStream *rs)
load U8's nonfixed.dat into the Maps
CurrentMap * getCurrentMap() const
get the CurrentMap
Definition: world.h:97
bool switchMap(uint32 newmap)
void saveMaps(Common::WriteStream *ws)
save the Maps in World.
void push_front(const t_T &element)
Definition: list.h:135
void clear()
clear the world (maps, currentmap, ethereal items)
Definition: detection.h:27
bool etherealEmpty() const
check if the ethereal void is empty
Definition: world.h:112
void worldStats() const
output some statistics about the world
void initMaps()
create (empty) maps, currentmap
void remove(const t_T &val)
Definition: list.h:125
t_T & front()
Definition: list.h:157
bool load(Common::ReadStream *rs, uint32 version)
load World data
void etherealRemove(ObjId objid)
remove an item from the ethereal void
Definition: world.h:122
void loadItemCachNPCData(Common::SeekableReadStream *itemcach, Common::SeekableReadStream *npcdata)
load U8's itemcach.dat, npcdata.dat into the world
Definition: current_map.h:44
bool empty() const
Definition: list.h:219
bool loadMaps(Common::ReadStream *rs, uint32 version)
load Maps
Definition: containers.h:38
ObjId etherealPeek() const
return (but don't remove) the top item from the ethereal void
Definition: world.h:117
void etherealPush(ObjId objid)
push an item onto the ethereal void
Definition: world.h:107
void save(Common::WriteStream *ws)
save the rest of the World data (ethereal items, current map number).