Skip to content

Commit 3e2e868

Browse files
author
imdex
committed
xrCore: remove redundant files.
Some __asm int 3 replaced with __debugbreak. xrRender_R*: sincosf asm replaced by standard sinf and cosf calls.
1 parent a24c242 commit 3e2e868

File tree

9 files changed

+15
-350
lines changed

9 files changed

+15
-350
lines changed

code/engine/xrCore/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ set(MATH_EXT_BUFFER_VECTOR buffer_vector.h buffer_vector_inline.h)
4848
set(MATH_STLEXT FixedMap.h FixedSet.h FixedVector.h xrPool.h)
4949

5050
set(MEM_MGR memory_allocation_stats.cpp memory_usage.cpp xrMemory.cpp xrMemory.h xrMemory_align.h
51-
xrMemory_align.cpp xrMemory_debug.cpp xrMemory_POOL.cpp xrMEMORY_POOL.h xrMemory_pso_Copy.cpp
52-
xrMemory_pso_Fill.cpp xrMemory_pso_Fill32.cpp xrMemory_pure.h xrMemory_subst_borland.h
53-
xrMemory_subst_borland.cpp xrMemory_subst_msvc.h xrMemory_subst_msvc.cpp)
51+
xrMemory_align.cpp xrMemory_debug.cpp xrMemory_POOL.cpp xrMEMORY_POOL.h xrMemory_pure.h
52+
xrMemory_subst_borland.h xrMemory_subst_borland.cpp xrMemory_subst_msvc.h xrMemory_subst_msvc.cpp)
5453
set(MEM_MGR_DLMALLOC_ALLOCATOR ptmalloc3/malloc.c ptmalloc3/malloc-2.8.3.h ptmalloc3/sysdeps/win32/win32.c)
5554
set_source_files_properties(ptmalloc3/malloc.c ptmalloc3/sysdeps/win32/win32.c PROPERTIES COMPILE_FLAGS /Y-)
5655
set(MEM_MGR_DLMALLOC_WRAPPER doug_lea_allocator.h doug_lea_allocator.cpp memory_allocator_options.h)

code/engine/xrCore/_random.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
#ifndef _LOCAL_RAND
22
#define _LOCAL_RAND
33

4-
/*
5-
u32 dwRandSeed;
6-
IC u32 dwfRandom(u32 dwRange)
7-
{
8-
u32 dwResult;
9-
__asm {
10-
mov eax,dwRange _eax = dwRange
11-
imul edx,dwRandSeed,08088405H
12-
inc edx
13-
mov dwRandSeed,edx dwRandSeed = (dwRandSeed * 08088405H)+1
14-
mul edx return (u64(dwRange) * u64(dwRandSeed)) >> 32
15-
mov dwResult,edx
16-
}
17-
return(dwResult);
18-
}
19-
*/
20-
214
class CRandom
225
{
236
private:

code/engine/xrCore/xrMemory_pso_Copy.cpp

Lines changed: 0 additions & 224 deletions
This file was deleted.

code/engine/xrCore/xrMemory_pso_Fill.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

code/engine/xrCore/xrMemory_pso_Fill32.cpp

Lines changed: 0 additions & 78 deletions
This file was deleted.

code/engine/xrCore/xrMemory_subst_msvc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ void* xrMemory::mem_alloc (size_t size
110110
if (debug_mode) dbg_register (_ptr,size,_name);
111111
if (mem_initialized) debug_cs.Leave ();
112112
//if(g_globalCheckAddr==_ptr){
113-
// __asm int 3;
113+
// __debugbreak();
114114
//}
115115
//if (_name && (0==strcmp(_name,"class ISpatial *")) && (size==376))
116116
//{
117-
// __asm int 3;
117+
// __debugbreak();
118118
//}
119119
#endif // DEBUG_MEMORY_MANAGER
120120
#ifdef USE_MEMORY_MONITOR
@@ -139,7 +139,7 @@ void xrMemory::mem_free (void* P)
139139

140140
#ifdef DEBUG_MEMORY_MANAGER
141141
if(g_globalCheckAddr==P)
142-
__asm int 3;
142+
__debugbreak();
143143
#endif // DEBUG_MEMORY_MANAGER
144144

145145
#ifdef DEBUG_MEMORY_MANAGER
@@ -191,7 +191,7 @@ void* xrMemory::mem_realloc (void* P, size_t size
191191

192192
#ifdef DEBUG_MEMORY_MANAGER
193193
if(g_globalCheckAddr==P)
194-
__asm int 3;
194+
__debugbreak();
195195
#endif // DEBUG_MEMORY_MANAGER
196196

197197
#ifdef DEBUG_MEMORY_MANAGER
@@ -267,7 +267,7 @@ void* xrMemory::mem_realloc (void* P, size_t size
267267
if (mem_initialized) debug_cs.Leave ();
268268

269269
if(g_globalCheckAddr==_ptr)
270-
__asm int 3;
270+
__debugbreak();
271271
#endif // DEBUG_MEMORY_MANAGER
272272

273273
return _ptr;

code/engine/xrGame/Level_Bullet_Manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ void CBulletManager::RegisterEvent (EventType Type, BOOL _dynamic, SBullet* bu
10511051
if (m_Events.size() > 1000) {
10521052
static bool breakpoint = true;
10531053
if (breakpoint)
1054-
__asm int 3;
1054+
__debugbreak();
10551055
}
10561056
#endif // #ifdef DEBUG
10571057

0 commit comments

Comments
 (0)