commit 5a234e06f108ec2c4dba7392258a4fa0b25b19c2 Author: ergz Date: Mon Mar 27 02:00:41 2023 -0700 initial commit 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 0000000..553e8fd Binary files /dev/null and b/debug.rdbg differ diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..18de8d4 --- /dev/null +++ b/main.cpp @@ -0,0 +1,30 @@ +#include "SDL.h" +#include + +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]+)?:? (.*)$", + } + ] +}