Commit Graph

25 Commits

Author SHA1 Message Date
Azamat H. Hackimov
8fd119bd3d MVE: Make timer code crossplatform 2024-07-09 03:40:49 +03:00
Azamat H. Hackimov
de49da0e9a DDIO: Remove unused platform-dependent functions
Remove ddio_CreateDir(), ddio_RemoveDir(), ddio_SaveWorkingDir(), ddio_RestoreWorkingDir(), ddio_DirExists(). Replace them in code with std::fs alternatives.
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
81555afd15 CFILE: convert cf_Diff() to use std::fs::path
Convert cf_Diff() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c47210be75 CFILE: convert cf_CopyFile() cf_CopyFileTime() to use std::fs::path
Convert cf_CopyFile() cf_CopyFileTime() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Louis Gombert
74c7b2cb0c Fix bad rebase for sdlmain.cpp 2024-06-29 18:28:23 +02:00
Louis Gombert
99a39d645d Remove unused DirectX-related files 2024-06-29 18:21:38 +02:00
Louis Gombert
91c18fefc5 Windows SDL2 compilation 2024-06-29 18:21:37 +02:00
Azamat H. Hackimov
59487976f6 Isolate misc module
Isolate misc module for better dependency handling.
2024-06-27 01:26:35 +03:00
Louis Gombert
ed79350a13
Merge pull request #462 from tophyr/gno-gnu-glob
Remove GLOB_PERIOD from ddio_FindFileStart
2024-06-24 19:59:51 +00:00
Chris Sarbora
652ef55f9a
Remove GLOB_PERIOD from ddio_FindFileStart
GLOB_PERIOD is a GNU extension and is not supported on non-glibc
2024-06-24 02:08:36 -05:00
Louis Gombert
c515189300
Merge pull request #448 from winterheart/mem-module
Make mem module isolated from project
2024-06-22 12:48:18 +00:00
Louis Gombert
4fd2d3768b Remove the CD-ROM asset loading logic and -cdrom option
CD-ROM code needs specific hardware to be tested and maintained, and does not fit with the modernization this project envisions.
I doubt the Mac hardware we now target have built-in CDrom readers anymore.

To play using data from a CD-ROM, it needs to be mounted, and the mount address to be provided to the -setdir argument
2024-06-21 20:36:43 +02:00
Azamat H. Hackimov
db8aa64d2f Make mem module isolated from project
Properly define MEM_USE_RTL definition only for mem library. Link other dependant modules with mem.
2024-06-20 00:43:51 +03:00
Azamat H. Hackimov
908f490396 Remove unused ddio_RenameFile() 2024-06-17 22:30:42 +03:00
Azamat H. Hackimov
b53e4a51a0 Refactoring ddio_*LockFile() functions
Cleanup, use C++ iostreams.
2024-06-17 22:30:42 +03:00
Azamat H. Hackimov
7db03a4ebf Make lockfile functions cross-platform
Unify all ddio_*LockFile() functions using std::filesystem.
2024-06-17 21:32:01 +03:00
Ryan C. Gordon
393a39b709
opengl: use SDL_WINDOW_FULLSCREEN_DESKTOP and an FBO.
This now renders to an OpenGL Framebuffer Object at the game's resolution,
and blits it to the window at whatever resolution it is currently using,
scaling and letterboxing if necessary.

Which is to say: display resolutions are now imaginary, and we never change
the physical display mode now. A smaller resolution is simply drawing less
pixels and scaling them up with the GPU for display. This solves a few
problems: no more resizing background windows or desktop icons shuffling
around, no more being stuck in a weird resolution when debugging or if the
game crashes, no more waiting on monitors to click over to a new mode, and
no more weird rendering when the display didn't exactly support the requested
mode.

This also means the game doesn't have to drop down to 640x480 for the config
menu screen when it was otherwise using some other resolution.

Some caveats:

- This _requires_ OpenGL Framebuffer Object support; there is currently no
fallback if it's missing and the game will refuse to start. But any desktop
hardware of the last ~20 years should support it. For weird embedded things
or whatnot, it will be possible to add a fallback.

- This currently requires SDL. The OpenGL pieces should work on Windows, but
someone would need to adjust the existing win32 code to create a fullscreen
window and not change the physical display mode. It should still compile on
windows and work as before (untested by me, though).

- This is only OpenGL; it does not touch the Direct3D renderer, which should
continue to work as before (again, untested by me).
2024-06-14 03:56:49 -04:00
Louis Gombert
15dce81bd1
Merge pull request #396 from GravisZro/cleanup
More clean up
2024-06-04 07:25:15 +00:00
Azamat H. Hackimov
9416458f9c Cleanup mono debugging code
Remove unused mono debug code.
2024-06-03 01:40:33 +03:00
GravisZro
1c7e3053f2 Replace "PSPATHNAME_LEN" and "MAX_PATH" with "_MAX_PATH" 2024-06-01 22:19:41 -04:00
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
Azamat H. Hackimov
683cac5ea5 Remove unused lorestimer arg option
lorestimer was required only for Windows (9x, I guess?), and now with chrono library, that can provide any resolution, it's redundant. Removing related field of ddio_init_info struct.
2024-05-27 10:31:45 +03:00
Azamat H. Hackimov
24e0c315e1 Use chrono steady_clock for time measurement
Implementing static ChronoTimer class based on C++11 chrono library that replaces platform dependent time measurement implementation.
2024-05-27 10:31:42 +03:00
GravisZro
9cf9781369 Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
Azamat H. Hackimov
a0929aefe2 Rename ddio_common to ddio 2024-05-24 22:18:14 +03:00