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"
80 static World *get_instance() {
116 return _ethereal.
empty();
121 return _ethereal.
front();
144 bool isAlertActive()
const {
148 void setAlertActive(
bool active);
150 uint8 getGameDifficulty()
const {
154 void setGameDifficulty(uint8 difficulty);
156 uint16 getControlledNPCNum()
const {
157 return _controlledNPCNum;
159 void setControlledNPCNum(uint16 num);
161 uint32 getVargasShield()
const {
162 return _vargasShield;
164 void setVargasShield(uint32 val) {
168 INTRINSIC(I_getAlertActive);
169 INTRINSIC(I_setAlertActive);
170 INTRINSIC(I_clrAlertActive);
171 INTRINSIC(I_gameDifficulty);
172 INTRINSIC(I_getControlledNPCNum);
173 INTRINSIC(I_setControlledNPCNum);
174 INTRINSIC(I_resetVargasShield);
178 void setAlertActiveRemorse(
bool active);
179 void setAlertActiveRegret(
bool active);
181 static World *_world;
184 CurrentMap *_currentMap;
190 uint16 _controlledNPCNum;
196 uint32 _vargasShield;
t_T & front()
Definition: list.h:196
void push_front(const t_T &element)
Definition: list.h:158
void remove(const t_T &val)
Definition: list.h:142
bool empty() const
Definition: list.h:258
Definition: current_map.h:45
void reset()
reset the world (clear everything and re-initialize maps)
void loadNonFixed(Common::SeekableReadStream *rs)
load U8's nonfixed.dat into the Maps
bool switchMap(uint32 newmap)
void loadItemCachNPCData(Common::SeekableReadStream *itemcach, Common::SeekableReadStream *npcdata)
load U8's itemcach.dat, npcdata.dat into the world
void etherealPush(ObjId objid)
push an item onto the ethereal void
Definition: world.h:110
ObjId etherealPeek() const
return (but don't remove) the top item from the ethereal void
Definition: world.h:120
bool etherealEmpty() const
check if the ethereal void is empty
Definition: world.h:115
CurrentMap * getCurrentMap() const
get the CurrentMap
Definition: world.h:100
void save(Common::WriteStream *ws)
save the rest of the World data (ethereal items, current map number).
void initMaps()
create (empty) maps, currentmap
void worldStats() const
output some statistics about the world
void etherealRemove(ObjId objid)
remove an item from the ethereal void
Definition: world.h:125
void saveMaps(Common::WriteStream *ws)
save the Maps in World.
bool loadMaps(Common::ReadStream *rs, uint32 version)
load Maps
bool load(Common::ReadStream *rs, uint32 version)
load World data
void clear()
clear the world (maps, currentmap, ethereal items)
Definition: algorithm.h:29