1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | diff -r ba92a84dd948 -r fcef0eb84ce4 .hgignore --- a/.hgignore Wed Sep 09 19:18:38 2015 +0200 +++ b/.hgignore Wed Sep 09 19:39:55 2015 +0200 @@ -0,0 +1,3 @@ +syntax: glob +build/ +handmade/data/*.hha diff -r ba92a84dd948 -r fcef0eb84ce4 handmade/code/build.bat --- a/handmade/code/build.bat Wed Sep 09 19:18:38 2015 +0200 +++ b/handmade/code/build.bat Wed Sep 09 19:39:55 2015 +0200 @@ -1,6 +1,6 @@ @echo off -set CommonCompilerFlags=-Od -MTd -nologo -fp:fast -fp:except- -Gm- -GR- -EHa- -Zo -Oi -WX -W4 -wd4201 -wd4100 -wd4189 -wd4505 -wd4127 -DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1 -DHANDMADE_WIN32=1 -FC -Z7 +set CommonCompilerFlags=-Od -MTd -nologo -fp:fast -fp:except- -Gm- -GR- -EHa- -Zo -Oi -WX -W4 -wd4201 -wd4100 -wd4189 -wd4505 -wd4127 -wd4456 -wd4457 -DHANDMADE_INTERNAL=1 -DHANDMADE_SLOW=1 -DHANDMADE_WIN32=1 -FC -Z7 set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib REM TODO - can we just build both with one exe? @@ -19,8 +19,7 @@ REM 64-bit build REM Optimization switches /wO2 echo WAITING FOR PDB > lock.tmp -cl %CommonCompilerFlags% -DDebugRecordArray=DebugRecords_Optimized -O2 -I..\iaca-win64\ -c ..\handmade\code\handmade_optimized.cpp -Fohandmade_optimized.obj -LD -cl %CommonCompilerFlags% -DDebugRecordArray=DebugRecords_Main -I..\iaca-win64\ ..\handmade\code\handmade.cpp handmade_optimized.obj -Fmhandmade.map -LD /link -incremental:no -opt:ref -PDB:handmade_%random%.pdb -EXPORT:GameGetSoundSamples -EXPORT:GameUpdateAndRender -EXPORT:DEBUGGameFrameEnd +cl %CommonCompilerFlags% -DDebugRecordArray=DebugRecords_Main -O2 -I..\iaca-win64\ ..\handmade\code\handmade.cpp -Fmhandmade.map -LD /link -incremental:no -opt:ref -PDB:handmade_%random%.pdb -EXPORT:GameGetSoundSamples -EXPORT:GameUpdateAndRender -EXPORT:DEBUGGameFrameEnd del lock.tmp cl %CommonCompilerFlags% ..\handmade\code\win32_handmade.cpp -Fmwin32_handmade.map /link %CommonLinkerFlags% popd diff -r ba92a84dd948 -r fcef0eb84ce4 handmade/code/handmade.cpp --- a/handmade/code/handmade.cpp Wed Sep 09 19:18:38 2015 +0200 +++ b/handmade/code/handmade.cpp Wed Sep 09 19:39:55 2015 +0200 @@ -1,3 +1,4 @@ +#pragma optimize("", off) /* ======================================================================== $File: $ $Date: $ @@ -1697,4 +1698,8 @@ OutputPlayingSounds(&GameState->AudioState, SoundBuffer, TranState->Assets, &TranState->TranArena); } +#pragma optimize("", on) +#include "handmade_optimized.cpp" +#pragma optimize("", off) + #include "handmade_debug.cpp" diff -r ba92a84dd948 -r fcef0eb84ce4 handmade/code/handmade_debug.cpp --- a/handmade/code/handmade_debug.cpp Wed Sep 09 19:18:38 2015 +0200 +++ b/handmade/code/handmade_debug.cpp Wed Sep 09 19:39:55 2015 +0200 @@ -342,16 +342,12 @@ debug_record DebugRecordArray[__COUNTER__]; -extern u32 const DebugRecords_Optimized_Count; -debug_record DebugRecords_Optimized[]; - extern "C" DEBUG_GAME_FRAME_END(DEBUGGameFrameEnd) { debug_state *DebugState = (debug_state *)Memory->DebugStorage; if(DebugState) { DebugState->CounterCount = 0; - UpdateDebugRecords(DebugState, DebugRecords_Optimized_Count, DebugRecords_Optimized); UpdateDebugRecords(DebugState, ArrayCount(DebugRecords_Main), DebugRecords_Main); DebugState->FrameEndInfos[DebugState->SnapshotIndex] = *Info; diff -r ba92a84dd948 -r fcef0eb84ce4 handmade/code/handmade_intrinsics.h --- a/handmade/code/handmade_intrinsics.h Wed Sep 09 19:18:38 2015 +0200 +++ b/handmade/code/handmade_intrinsics.h Wed Sep 09 19:39:55 2015 +0200 @@ -74,7 +74,7 @@ inline real32 AbsoluteValue(real32 Real32) { - real32 Result = fabs(Real32); + real32 Result = fabsf(Real32); return(Result); } diff -r ba92a84dd948 -r fcef0eb84ce4 handmade/code/handmade_optimized.cpp --- a/handmade/code/handmade_optimized.cpp Wed Sep 09 19:18:38 2015 +0200 +++ b/handmade/code/handmade_optimized.cpp Wed Sep 09 19:39:55 2015 +0200 @@ -6,9 +6,6 @@ $Notice: (C) Copyright 2015 by Molly Rocket, Inc. All Rights Reserved. $ ======================================================================== */ -#define internal -#include "handmade.h" - #if 0 #include <iacaMarks.h> #else @@ -372,6 +369,3 @@ } } } - -extern u32 const DebugRecords_Optimized_Count = __COUNTER__; -debug_record DebugRecords_Optimized[DebugRecords_Optimized_Count]; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #pragma optimize ("", off) /* ======================================================================== $File: $ $Date: $ $Revision: $ $Creator: Casey Muratori $ $Notice: (C) Copyright 2014 by Molly Rocket, Inc. All Rights Reserved. $ ======================================================================== */ #include "handmade.h" #pragma optimize ("", on) #include "handmade_render_group.h" #include "handmade_render_group.cpp" #pragma optimize ("", off) #include "handmade_world.cpp" #include "handmade_random.h" #include "handmade_sim_region.cpp" #include "handmade_entity.cpp" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #pragma optimize ("", off) /* ======================================================================== $File: $ $Date: $ $Revision: $ $Creator: Casey Muratori $ $Notice: (C) Copyright 2014 by Molly Rocket, Inc. All Rights Reserved. $ ======================================================================== */ #pragma optimize ("", on) #include "handmade.h" #include "handmade_render_group.h" #include "handmade_render_group.cpp" #pragma optimize ("", off) #include "handmade_world.cpp" #include "handmade_random.h" #include "handmade_sim_region.cpp" #include "handmade_entity.cpp" |
1 | #pragma optimze("", off) |
1 | #pragma optimize("", on) |