diff options
| -rw-r--r-- | build.bat | 7 | ||||
| -rw-r--r-- | icon.ico | bin | 0 -> 3160 bytes | |||
| -rw-r--r-- | icon.rc | 26 | ||||
| -rw-r--r-- | icon.res | bin | 0 -> 4200 bytes | |||
| -rw-r--r-- | project-base/src/windows/platform.c | 2 | ||||
| -rw-r--r-- | src/main.c | 5 |
6 files changed, 37 insertions, 3 deletions
@@ -1,3 +1,6 @@ robocopy "data/" "build/data" /s /e -gcc.exe -m64 -w -g -DMODE_DEBUG src/main.c -o build/truckerx2.exe -Llibs/ -lSDL2 -lSDL2_mixer -call build\truckerx2.exe
\ No newline at end of file + +windres icon.rc -O coff -o icon.res + +gcc.exe -m64 -w -g -DMODE_DEBUG src/main.c icon.res -o build/truckerx.exe -Llibs/ -lSDL2 -lSDL2_mixer -mwindows +call build\truckerx.exe
\ No newline at end of file diff --git a/icon.ico b/icon.ico Binary files differnew file mode 100644 index 0000000..fdf6161 --- /dev/null +++ b/icon.ico @@ -0,0 +1,26 @@ + +101 ICON "icon.ico" + +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904E4" + BEGIN + VALUE "CompanyName", "Aldrik Ramaekers" + VALUE "FileDescription", "TruckerX" + VALUE "FileVersion", "1.0.0" + VALUE "InternalName", "TruckerX" + VALUE "LegalCopyright", "Aldrik Ramaekers" + VALUE "OriginalFilename", "truckerX.exe" + VALUE "ProductName", "TruckerX" + VALUE "ProductVersion", "1.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1252 + END +END diff --git a/icon.res b/icon.res Binary files differnew file mode 100644 index 0000000..20c5ef4 --- /dev/null +++ b/icon.res diff --git a/project-base/src/windows/platform.c b/project-base/src/windows/platform.c index 52bf1df..119e08e 100644 --- a/project-base/src/windows/platform.c +++ b/project-base/src/windows/platform.c @@ -930,7 +930,7 @@ platform_window* platform_open_window_ex(char *name, u16 width, u16 height, u16 window->window_class.lpfnWndProc = main_window_callback; window->window_class.hInstance = instance; window->window_class.lpszClassName = name; - window->window_class.hIcon = LoadIcon(NULL, IDI_WINLOGO); + window->window_class.hIcon = LoadIcon(instance, MAKEINTRESOURCE(101)); //window->window_class.hCursor = LoadCursor(NULL, IDC_ARROW); ATOM success = RegisterClass(&window->window_class); @@ -137,6 +137,11 @@ void update_render_game(platform_window* window) update_music();
}
+int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char* ignore, int nShowCmd)
+{
+ return main(__argc, __argv);
+}
+
int main(int argc, char** argv)
{
platform_init(argc, argv, CONFIG_DIRECTORY);
|
