From 437b69e83217821dc2177045e582f769c50bcb4a Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 5 Mar 2016 03:13:19 -0500 Subject: [PATCH] 4coder_handmade_hero.cpp ready to go part2 --- 4coder_custom.cpp | 2 +- 4coder_handmade_hero.cpp | 8 ++++++-- buildsuper.bat | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/4coder_custom.cpp b/4coder_custom.cpp index e42ed10d..95d9dbf7 100644 --- a/4coder_custom.cpp +++ b/4coder_custom.cpp @@ -2,7 +2,7 @@ #define Custom_Default 0 #define Custom_HandmadeHero 1 -#define Custom_Current Custom_Default +#define Custom_Current Custom_HandmadeHero #include "4coder_custom.h" diff --git a/4coder_handmade_hero.cpp b/4coder_handmade_hero.cpp index d5885578..3b3a21c9 100644 --- a/4coder_handmade_hero.cpp +++ b/4coder_handmade_hero.cpp @@ -43,7 +43,6 @@ #include #include -#include #define UseHack4Coder 0 @@ -54,10 +53,15 @@ static bool GlobalEditMode; static char *GlobalCompilationBufferName = "*compilation*"; + + +#if UseHack4Coder +#include static HWND GlobalModalIndicator; static HBRUSH GlobalEditModeBrush; static HBRUSH GlobalNormalModeBrush; static WNDPROC global_old_4coder_winproc; +#endif // TODO(casey): If 4coder gets variables at some point, this would go in a variable. static char BuildDirectory[4096] = "./"; @@ -636,7 +640,7 @@ CUSTOM_COMMAND_SIG(casey_goto_next_error) ErrorParsingPosition += (int)(ColonToken.Text - ParsingRegion); View_Summary compilation_view = - get_first_view_for_buffer(app, Buffer.buffer_id); + get_first_view_with_buffer(app, Buffer.buffer_id); if(compilation_view.exists) { app->view_set_cursor(app, &compilation_view, seek_pos(ErrorParsingPosition), 1); diff --git a/buildsuper.bat b/buildsuper.bat index 28350c9b..20a80a32 100644 --- a/buildsuper.bat +++ b/buildsuper.bat @@ -9,8 +9,8 @@ SET STUFF=/GR- /nologo SET DEBUG=/Zi SET EXPORTS=/EXPORT:get_bindings SET SRC=4coder_custom.cpp -SET LINKS=user32.lib gdi32.lib -REM SET LINKS= +REM SET LINKS=user32.lib gdi32.lib +SET LINKS= cl %WARNINGS% %STUFF% %DEBUG% %SRC% %LINKS% /Fe4coder_custom /LD /link /INCREMENTAL:NO /OPT:REF %EXPORTS%