diff options
author | click <none@none> | 2010-06-05 00:59:25 +0200 |
---|---|---|
committer | click <none@none> | 2010-06-05 00:59:25 +0200 |
commit | e77716188861d4aa83b227a90e04a66b63baeb1f (patch) | |
tree | ce72764181a760314ec851f7535052dcf75649db /dep/src/g3dlite/MemoryManager.cpp | |
parent | 1426c2970f42a2d065198806f750bf5dd28d580b (diff) |
HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISK
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier)
+ reduced Vmap size to less than one third, and improve precision
+ indoor/outdoor check which allows automatic unmounting of players
+ additional area information from WMOAreaTable.dbc, removed existing "hacks"
+ WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!)
- buildfiles for windows are not properly done, and will need to be sorted out
NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault !
THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK!
--HG--
branch : trunk
Diffstat (limited to 'dep/src/g3dlite/MemoryManager.cpp')
-rw-r--r-- | dep/src/g3dlite/MemoryManager.cpp | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/dep/src/g3dlite/MemoryManager.cpp b/dep/src/g3dlite/MemoryManager.cpp new file mode 100644 index 00000000000..240188a1f0e --- /dev/null +++ b/dep/src/g3dlite/MemoryManager.cpp @@ -0,0 +1,91 @@ +/** + @file MemoryManager.cpp + + @maintainer Morgan McGuire, http://graphics.cs.williams.edu + @created 2009-04-20 + @edited 2009-05-29 + + Copyright 2000-2009, Morgan McGuire. + All rights reserved. + */ + +#include "G3D/MemoryManager.h" +#include "G3D/System.h" + +namespace G3D { + +MemoryManager::MemoryManager() {} + + +void* MemoryManager::alloc(size_t s) { + return System::malloc(s); +} + + +void MemoryManager::free(void* ptr) { + System::free(ptr); +} + + +bool MemoryManager::isThreadsafe() const { + return true; +} + + +MemoryManager::Ref MemoryManager::create() { + static MemoryManager::Ref m = new MemoryManager(); + return m; +} + + +/////////////////////////////////////////////////// + +AlignedMemoryManager::AlignedMemoryManager() {} + + +void* AlignedMemoryManager::alloc(size_t s) { + return System::alignedMalloc(s, 16); +} + + +void AlignedMemoryManager::free(void* ptr) { + System::alignedFree(ptr); +} + + +bool AlignedMemoryManager::isThreadsafe() const { + return true; +} + + +AlignedMemoryManager::Ref AlignedMemoryManager::create() { + static AlignedMemoryManager::Ref m = new AlignedMemoryManager(); + return m; +} + + +/////////////////////////////////////////////////// + +CRTMemoryManager::CRTMemoryManager() {} + + +void* CRTMemoryManager::alloc(size_t s) { + return ::malloc(s); +} + + +void CRTMemoryManager::free(void* ptr) { + return ::free(ptr); +} + + +bool CRTMemoryManager::isThreadsafe() const { + return true; +} + + +CRTMemoryManager::Ref CRTMemoryManager::create() { + static CRTMemoryManager::Ref m = new CRTMemoryManager(); + return m; +} +} |