Azamat H. Hackimov
79db9aa3e2
Move platform-specific defines and macros to own file crossplat.h
2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
54f9d75e62
Reduce linux_fix.h usage in project
2024-08-20 23:08:10 +03:00
Azamat H. Hackimov
16a6866885
DDIO: new crossplatform SleepMS() function
...
Use C++ chrono and thread for crossplatform sleep function.
2024-08-20 23:08:10 +03:00
Thomas Roß
cce73891fa
[Keyboard] Fixed a bug, where when a keyboard action has a 2nd key binding, both keys need to be hit to trigger the action.
...
(cherry picked from commit 7f4da73dc8a20202b25a5e2e901684ca08c95018)
2024-08-18 21:21:00 +02:00
Azamat H. Hackimov
0ba3828a13
LINUX: minor cleanup on lnxcontroller.cpp
2024-08-15 11:47:43 +03:00
Azamat H. Hackimov
b911d81c2a
LINUX: Use ddio_DoForeachFile()
...
Replace ddio_FindFileStart() with ddio_DoForeachFile().
2024-08-15 11:47:43 +03:00
Louis Gombert
60c5dbf1fe
CMake: add all headers to target sources
...
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00
Louis Gombert
10de36c0e4
Merge pull request #469 from tophyr/vcpkg-all-thethings
...
Use vcpkg on all presets
2024-08-04 14:10:09 +02:00
Chris Sarbora
e5dcce3c9f
Use vcpkg for all platform presets
2024-08-03 23:38:01 -05:00
Azamat H. Hackimov
cb9e0f8828
Remove unused osTask class
2024-07-28 16:50:43 +03:00
Azamat H. Hackimov
91354d5b9a
Merge pull request #492 from tophyr/pr/posix-defines
...
Use `POSIX` instead of `__LINUX__` for general OS checks
2024-07-15 23:33:10 +03:00
Chris Sarbora
822a411433
Remove loki_utils
...
Inline the only usage of `loki_getprefpath()`, and use `Base_directory` (controlled by `-setdir`) instead of `loki_getdatapath()`.
Inline or eliminate some other code that became empty/unused with loki removal.
2024-07-13 03:23:10 -05:00
Chris Sarbora
3da53e567f
Programmatically replace all __LINUX__
with POSIX
...
Steps:
```sh
srcs=$(mktemp)
find . -name "*.cpp" -or -name "*.c" -or -name "*.h" -or -name "*.hpp" -or -name "*.cc" -or -name "*.hh" > $srcs
xargs sed -i 's/ifndef __LINUX__/if !defined(POSIX)/' < $srcs
xargs sed -i 's/ifdef __LINUX__/if defined(POSIX)/' < $srcs
xargs sed -i 's/defined(__LINUX__)/defined(POSIX)/' < $srcs
```
2024-07-12 18:11:54 -05:00
Louis Gombert
5d413b9f30
Fix bad __LINUX__ checks
2024-06-29 18:28:22 +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
Azamat H. Hackimov
c41c3a7cb1
Replace Global* memory functions
...
Replace Global* memory functions with mem_* equivalents from mem.h, remove compatibility functions on Linux / macOS platforms.
2024-06-15 22:07:45 +03: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
4795388500
Merge pull request #416 from GravisZro/update/finite
...
Replace _finite with std::isfinite
2024-06-02 23:26:36 +03:00
Louis Gombert
66923d5bc7
Merge pull request #407 from winterheart/remove-ncurses
...
Remove ncurses usage dependency
2024-06-02 20:11:39 +00:00
GravisZro
4e599257a0
Replace _finite with std::isfinite
...
A simple drop in replacement that is multiplatform which means the
defintion in `linux_fix.h` is no longer required.
2024-06-02 14:50:51 -04:00
GravisZro
691dc6487d
Remove one unused macro definition and fix another
2024-06-01 22:21:51 -04:00
Azamat H. Hackimov
09823f9b40
Cleanup linux console code
...
Unify all commands into function interface, which simplifies code.
2024-06-02 03:41:50 +03:00
Azamat H. Hackimov
95caa7b6c3
Remove ncurses enabled console
...
This type of console is enabled only with `-svgalib` and `-dedicated` options. Since there no svgalib direct support (which is pretty old and too specific to Linux tech), it's better completely remove this code for simplicity and reducing external dependencies.
Removed `-svgalib` option as unused now.
2024-05-31 13:12:28 +03:00
GravisZro
f7ae658fe2
Modernize struct/enum/unions type declarations
2024-05-30 03:35:17 -04: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
Azamat H. Hackimov
6bc3c71a83
Reordering ddio_common module
...
Merge ddio_lnx and ddio_win into ddio_common module.
2024-05-24 22:17:44 +03:00
GravisZro
dc91b22635
Fix rebase breakage
2024-05-24 09:13:36 -04:00
GravisZro
6a9ddd8736
Replace _vsnprintf
/vsnprintf
with std::vsnprintf
2024-05-24 08:52:59 -04:00
GravisZro
13ed05cf6c
Remove unused macros
2024-05-24 08:50:59 -04:00
GravisZro
76e86fed8c
Replace strcmpi
with stricmp
2024-05-24 08:49:04 -04:00
GravisZro
5e5e0c99c3
Replace "short" with "int16_t" and fix missing headers
2024-05-23 23:49:31 -04:00
GravisZro
aebe1bbbb6
Replace "ushort" with "uint16_t" and fix missing includes
2024-05-23 23:16:40 -04:00
GravisZro
26b7776f43
Replace "ubyte" with "uint8_t"
2024-05-23 23:07:26 -04:00
GravisZro
9d3e361a35
Replace "sbyte" with "int8_t"
2024-05-23 23:05:05 -04:00
GravisZro
3dcd21b717
Replace "unsigned short" with "uint16_t"
2024-05-23 23:03:29 -04:00
GravisZro
1618040db5
Replace "unsigned char" with "uint8_t"
2024-05-23 22:58:46 -04:00
GravisZro
2147cfa68b
Replace "unsigned int" with "uint32_t"
2024-05-23 22:51:16 -04:00
Louis Gombert
a1a8056afc
Merge pull request #355 from GravisZro/fix/64bit
...
64-bit fixes
2024-05-23 07:21:36 +00:00
GravisZro
9ebd567178
Utilize Windows types
...
For whatever reason they decided to switch a bunch of Windows types to their
underlying types which causes problems when replacing possibly problematic
32-bit long types. This restores the use of the Windows defined types.
2024-05-22 18:30:56 -04:00
GravisZro
dec9de7456
64-bit fixes
...
Switch all the (u)long types to (u)int32_t where appropriate.
2024-05-22 18:14:45 -04:00
Azamat H. Hackimov
3fa32ff386
Reorder headers related to linux module
2024-05-19 12:21:43 +03:00
Azamat H. Hackimov
bde23461ea
Replace non-portable itoa with sprintf
...
Minor fixes and header cleanup.
2024-05-19 02:34:09 +03:00
Azamat H. Hackimov
cd1e33baa4
Move lnxcontroller to linux submodule
2024-05-19 02:31:50 +03:00
Louis Gombert
dc138e4912
Remove DDAccess.h header, and associated DD_ACCESS_RING definition
...
This definition was used to control the accessibility of some class members, changing protected qualifiers to public. This introduced unnecessary coupling between components and headers.
All conditional access specifiers have been set to public, which should not be a problem given the low number of classes that actually used affected members. Another albeit more complex solution could have been to use friend classes.
2024-05-13 23:21:05 +02:00
JeodC
a4ab78192c
Join license header with historical commentrs
...
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.
Also use .gitattributes to ensure all files are LF.
2024-05-08 14:41:19 -04:00
Louis Gombert
0e69bf465f
Merge pull request #241 from icculus/ryan-sdl2-port
...
Initial SDL2 port
2024-05-06 08:57:20 +00:00
Louis Gombert
321145c28f
Remove usage of DECLARE_POINTERS in dyna_curses.h
2024-05-03 19:43:41 -04:00
Ryan C. Gordon
001a533399
Initial migration from SDL 1.2 to SDL2.
2024-05-02 08:29:21 -04:00