From 5a234e06f108ec2c4dba7392258a4fa0b25b19c2 Mon Sep 17 00:00:00 2001 From: ergz Date: Mon, 27 Mar 2023 02:00:41 -0700 Subject: [PATCH] initial commit --- build.bat | 12 ++++++++++++ debug.rdbg | Bin 0 -> 355 bytes main.cpp | 30 ++++++++++++++++++++++++++++++ subl-proj.sublime-project | 23 +++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 build.bat create mode 100644 debug.rdbg create mode 100644 main.cpp create mode 100644 subl-proj.sublime-project diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..8f101a2 --- /dev/null +++ b/build.bat @@ -0,0 +1,12 @@ +@echo off + +echo ~~~~ starting build ~~~~~ + +REM call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" + +REM INCLUDES +set sdl_inc_path="D:\dev\libraries\SDL2-devel-2.24.2-VC\SDL2-2.24.2\include" +set sdl_lib_path="D:\dev\libraries\SDL2-devel-2.24.2-VC\SDL2-2.24.2\lib\x64" +set output_dir="build\" + +cl /nologo /Zi /Fd"build/" /Fo"build/" /Fe"build/app.exe" /I %sdl_inc_path% *.cpp SDL2.lib SDL2main.lib shell32.lib /link /SUBSYSTEM:CONSOLE /LIBPATH:%sdl_lib_path% diff --git a/debug.rdbg b/debug.rdbg new file mode 100644 index 0000000000000000000000000000000000000000..553e8fd55ffb08b814fd04b2f7001e384ac69437 GIT binary patch literal 355 zcmWG?adOvZU|?{uib+W=izz8B$uG)G%qfm3PRY?tN-WMy)-BJ>OUW;fNh;0ENr_1; zD9}r-NCoNu14baJ1;m84=O$+6=_MBwfOLQW={g0Vx_E$eN@j6EPGV(zZhlHC$fPpu llX5VVfn133AetRS-~k{_V2q+0hX$}h4yX + +SDL_Window *window; + +int main(int argc, char *argv[]) +{ + if (SDL_Init(SDL_INIT_EVERYTHING) != 0) { + fprintf(stderr, "there was an error attempting to initilizer SDL"); + } + + // create a display mode + SDL_DisplayMode display_mode; + + // and store in it current display mode settings + SDL_GetCurrentDisplayMode(0, &display_mode); + + // create an sdl window object + window = SDL_CreateWindow( + "Cool new window", + SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, + display_mode.w, display_mode.h, + SDL_WINDOW_RESIZABLE + ); + + printf("hello there"); + + return(0); +} \ No newline at end of file diff --git a/subl-proj.sublime-project b/subl-proj.sublime-project new file mode 100644 index 0000000..276e383 --- /dev/null +++ b/subl-proj.sublime-project @@ -0,0 +1,23 @@ +{ + "folders": + [ + { + "path": "." + }, + { + "name": "SDL", + "path": "D:/dev/libraries/SDL2-devel-2.24.2-VC/SDL2-2.24.2/include" + } + ], + + "build_systems": + [ + { + "name": "build.bat", + "shell_cmd": "build.bat", + "selector": "source.c++", + "working_dir": "$project_path", + "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", + } + ] +}