Commit graph

188 commits

Author SHA1 Message Date
Edoardo Lolletti
94a01db16f make free functions taking irr::IrrlichtDevice* take it by raw pointer 2026-08-20 00:22:17 +02:00
Edoardo Lolletti
2d1cda5e4c move osx objc code under OSX subfolder in porting namespace 2026-08-19 19:36:05 +02:00
Edoardo Lolletti
b068a9b5c9 use freopen_s only on msvc, freopen otherwise 2026-03-23 11:01:38 +01:00
Edoardo Lolletti
9b9de5fda6 Add user storage directory option 2025-09-26 10:50:20 +02:00
Edoardo Lolletti
5a92753925 Remove atexit usage
Use struct destructor approach
2025-06-22 11:33:32 +02:00
Edoardo Lolletti
c8aff82554 Don't close stdio buffers but reopen them on NUL device on win32
Prevents crash when printf and co were used
2025-04-05 06:58:12 +02:00
Edoardo Lolletti
f06feb70d7 Move duplicate TriggerEvent functions to GUIUtils 2025-03-30 22:41:39 +02:00
Edoardo Lolletti
9469edf0b2 Add curl.h header including a formatter for CURLCode 2025-01-31 00:13:18 +01:00
Edoardo Lolletti
8e3e8c8341 Handle irrlicht device destruction via shared pointer in DataHandler
Slightly cleaner code and fixes an issue when using sdl mixer audio backend and sdl device in irrlicht, where irrlicht's device was being terminated before the audio backend, thus calling SDL_Quit before the audio backend could do its cleanup
2024-12-03 21:25:07 +01:00
Edoardo Lolletti
b4f2414fad Call ThreadsCleanup from atexit handler 2024-12-03 21:05:31 +01:00
Edoardo Lolletti
7b36b8484a Don't include fmt.h in text_types.h 2024-09-06 14:56:15 +02:00
Edoardo Lolletti
92d8471e6e Remove nonstd::string_view
Use stl's
2024-09-01 01:52:27 +02:00
Edoardo Lolletti
3d8827ca07 Separate cli arguments parsing
Put them in a separate source file, also add a WinMain entrypoint that will be used on windows if the application is not built as a console application
2024-06-13 11:50:14 +02:00
Edoardo Lolletti
1ffc90a36d Don't call directly "main"
Declare the entrypoint as edopro_main on android as well, since calling "main" is non standard
2023-11-18 00:11:02 +01:00
Edoardo Lolletti
57e9778708 Prevent the game from running if launched with elevated priviledges
Display an error message if the game is run as administrator on windows or as root on *nix systems, if the user wants to still run it with those priviledges, the option i-want-to-be-admin has been added
2023-08-08 15:48:29 +02:00
Edoardo Lolletti
c5c43b0db6 Remove show_changelog cli option
It was still being kept in case the client was updated from a version from before 39.3.X, now it can be safely removed
2023-08-08 15:48:29 +02:00
Edoardo Lolletti
0a739a5f29 Update places where unique_ptr was being created manually
Use make_unique
2023-06-18 17:00:06 +02:00
Edoardo Lolletti
1108eab5e7 Account for the removal of adl lookup in fmt 10
Fmt 10 completely removed the adl lookup that was being used to handle custom string types, work around by manually "converting" those string beforehand via templates
2023-05-18 22:35:28 +02:00
Edoardo Lolletti
e4396209ba Ignore SIGCHLD on posix
This prevents the creation of zombie children
2023-04-15 22:40:48 +02:00
Edoardo Lolletti
009f0c41e9
Add `EDOPRO_platform` conditionals macro (#263)
No longer use compiler specific macros in the code to check for a specific target.
2023-04-15 20:11:49 +02:00
Edoardo Lolletti
cd00f787fe Fix more warnings and enable extra warning level 2023-02-08 20:13:06 +01:00
Edoardo Lolletti
2f708735d9 Update gframe.cpp 2022-12-28 21:37:25 +01:00
Edoardo Lolletti
3d661f527d Automatically create a crash dump file on windows 2022-12-24 15:58:18 +01:00
Edoardo Lolletti
d34326c468 Minor updates
For now make edopro still compile on vs2015, as long as the "breaking" changes aren't really an hindrance
2022-11-04 01:21:47 +01:00
Edoardo Lolletti
72ae89ca25 Minor cleanups 2022-11-03 18:24:16 +01:00
Edoardo Lolletti
ad81d4d9e2 Move needed format and sprintf into `epro namespace instead of using them from the fmt` namespace
In b6d8cbde94, specialized ``format`` functions to work for fmt 9.x.x were put in the fmt namespace, avoid possible undefined behaviour and instead redefine those functions to the epro namespace
2022-10-07 20:27:52 +02:00
Edoardo Lolletti
395e316677 Static cast curl error codes to underlying type before printign them via fmt 2022-10-07 15:48:09 +02:00
Edoardo Lolletti
008dd89e32 Ensure all the libraries to be manually initialized are initialized properly 2022-09-21 20:45:34 +02:00
Edoardo Lolletti
5a77d3efe2
Ad basic ios support (#245)
Still incomplete but builds and boots to something (at least on the simulator).
Also slightly updated the premake scripts to properly generate build files for various architectures without renaming the vcpkg packages
2022-08-20 22:29:13 +02:00
Edoardo Lolletti
64934935ee Manually set guienv relative position in Game::Initialize
On android it starts with an arbitrary window position, so it would break the positioning of the elements like in the earlier case where the envirionment was reloaded in game after changing the scaling.
2022-08-14 12:40:23 +02:00
Edoardo Lolletti
fa141356f6
Update settings window (#244)
Revamp the settings window by using the new windowed tab widget, split the various options in subcategories to keep them more organized.
Now every config that before was only modifiable my manually editing the config file should be changeable in game as well.
Probably will need other cleanups down the line to make things look nicer, but for now it's enough to merge.
2022-08-13 19:35:20 +02:00
Edoardo Lolletti
b43b03689e Store error string from errno/GetLastError when system function fails 2022-06-06 11:45:06 +02:00
Edoardo Lolletti
e850810154 Change a time(0) instance to time(nullptr) 2022-03-26 17:02:22 +01:00
Edoardo Lolletti
8d9d1b2127 Update handling of workin_dir
Set it directly when Utils::SetWorkingDirectory is called, and add function Utils::GetWorkingDirectory to retrieve it when needed
2022-03-12 11:50:00 +01:00
Edoardo Lolletti
92700a11d8 Rename ChangeDirectory to SetWorkingDirectory 2022-03-12 11:44:13 +01:00
Edoardo Lolletti
32a9bc8fe1 Remove no longer used exit_on_return 2022-02-11 21:22:57 +01:00
Edoardo Lolletti
d87d891856 Add `-u` cli flag to override client update url 2021-11-28 15:06:19 +01:00
Edoardo Lolletti
fdc8737425 Update cli parameters
Updated their handling, and removed all the unused arguments, keeping only the essential and working ones, those being:
``-C`` (working directory)
``-m`` (launch muted)
``-l`` (show changelog)
``-D`` (launched from discord, currently not used but kept for possible future needs)
2021-11-28 14:22:17 +01:00
Edoardo Lolletti
8873fa31d4 Missing header 2021-11-05 19:38:10 +01:00
Edoardo Lolletti
f988e9de36 Print edopro version to console output at startup 2021-11-05 19:33:21 +01:00
Edoardo Lolletti
a236b7d839 Call curl_global_init after WSAStartup 2021-10-14 13:59:47 +02:00
Edoardo Lolletti
446abd3530 Simplify old clang workadound for ygo::Game constructor
No longer uses manual allocations and object lifetime management.
2021-09-17 19:13:11 +02:00
Edoardo Lolletti
7f7d40d5c8 Update cli argument parsing 2021-08-21 13:40:29 +02:00
Edoardo Lolletti
86a1d64432
typo 2021-08-06 16:27:03 +02:00
Edoardo Lolletti
d279800267 Update to clang workaround for game construction
Use a wrapper class to make thing nicer to look at and remove teh manual memory management in main
2021-08-05 18:40:15 +02:00
Edoardo Lolletti
0ef36f0eda Properly detect mac os instead of using __APPLE__ 2021-08-01 13:30:46 +02:00
Edoardo Lolletti
82ec04b6aa
Add workaround to build under clang <11 (llvm 8) 2021-08-01 02:23:55 +02:00
Edoardo Lolletti
8314abdf3b Terminate the program if it fails to change directory 2021-06-30 21:56:37 +02:00
Edoardo Lolletti
1bf3578d0a Print directory that the program should have changed to if failed 2021-03-26 00:24:01 +01:00
Edoardo Lolletti
4eeb54adf8 Drop irrlicht device on program close 2021-03-25 16:10:50 +01:00