mojo_client/src/Client/GUI/DrawObjMgr.h
False.Genesis 3100f68a30 last changes before 2.1.3:
* added script to support /me-like emotes (scriptname is "me")
* changed the permission system: now a script cant be used as game command f no permission is explicitly set
* implemented threadsafe CLI queue to solve crashes with short-intervalled events that ran on 2 threads
* fixed name return at "getitemprotovalue" script
* iplemented DrawObject class and a Mgr for those objects; they will ease object drawing once implemented. the Mgr works under control of the GUI thread and is threadsafe.
* implemented auto-loading of SCP files if a name-tag is present somewhere in the file ("#dbname=...") and no explicit db name was passed to "loadscp" script.
* changed internal ObjMgr storage to std::map (instead of list) for faster access
* fixed call of "_enterworld" script
* fixed handling of MyCharacter(), which could cause crashes after newly changes
* fixed GetFileList() func in tools.cpp (this fixes also related "lgetfiles" script func). now it will only parse files, not directories. might still need some fixing for linux.
2007-08-01 19:09:17 +00:00

28 lines
583 B
C++

#ifndef DRAWOBJMGR_H
#define DRAWOBJMGR_H
#include <utility>
class DrawObject;
typedef std::map<uint64,DrawObject*> DrawObjStorage;
class DrawObjMgr
{
public:
DrawObjMgr();
~DrawObjMgr();
void Add(uint64,DrawObject*);
void Delete(uint64);
void Update(void); // Threadsafe! delete code must be called from here!
uint32 StorageSize(void) { return _storage.size(); }
private:
DrawObjStorage _storage;
ZThread::LockedQueue<uint64,ZThread::FastMutex> _del;
ZThread::LockedQueue<std::pair<uint64,DrawObject*>,ZThread::FastMutex > _add;
};
#endif