Commit Graph

233 Commits

Author SHA1 Message Date
Louis Gombert
836dd4d382
Merge pull request #645 from jengelh/master
Resolve 3301 compiler warnings
2024-11-26 22:24:13 +00:00
Jan Engelhardt
9b2675b1f7 Fix spello "~full" 2024-11-04 10:20:15 +01:00
Jan Engelhardt
c9bf214ede d3: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
46fcae00a2 d3: replace in-constructor assignments by initializations 2024-11-03 23:39:38 +01:00
Azamat H. Hackimov
1f1b0d2d88 Convert some functions of Mission.cpp to std::fs::path 2024-10-18 02:06:52 +03:00
Azamat H. Hackimov
6f81ca4f9f Replace cf_LibraryFindFirst cf_DoForeachFileInLibrary()
Simplify code, fix some minor issues.
2024-09-26 01:49:55 +03:00
Louis Gombert
0e228aa9db
Merge pull request #591 from winterheart/ddio-update
Update DDIO and related to it's code OSIRIS
2024-09-23 22:37:14 +02:00
Azamat H. Hackimov
eb0f6a2865 Remove dd_video module
Functions from module are stubbed and unused.
2024-09-23 00:37:25 +03:00
Azamat H. Hackimov
39e128cb0f
Merge pull request #582 from jengelh/master
ASAN/UBSAN fixes
2024-09-21 21:25:46 +03:00
Louis Gombert
b33cc21dce
Merge pull request #587 from winterheart/module-fixes
Update module, add logger module
2024-09-18 22:18:13 +02:00
Azamat H. Hackimov
dc0cd880e4 Add logger module
Implementing separated logger module.
2024-09-18 22:50:08 +03:00
Louis Gombert
6c533364f6 Remove outdated '-slowkey', '-alternatejoy' & '-directinput' options
Removes key_emulation and joy_emulation toggles from ddio_init_info structures, that were not used in the SDL implementation.
All input is now handled using SDL for all platforms, alternatejoy/directinput options were only relevant for Windows-specific DirectInput. 'slowkey' was an unimplemented feature.
2024-09-18 22:32:56 +02:00
Louis Gombert
d7063e7ff7 Remove leftover wincontroller.h 2024-09-18 22:32:56 +02:00
Louis Gombert
387ef339f4 Rename lnxcontroller to sdlcontroller 2024-09-18 22:32:09 +02:00
Louis Gombert
ef113543ab Merge WinController and lnxcontroller files
move controller IO processing to the DDIO module
2024-09-18 22:32:09 +02:00
Azamat H. Hackimov
3e402d78d5 Replace ddio_GetTempFileName() with ddio_GetTmpFileName()
Convert global variable Descent3_temp_directory to std::fs::path.
2024-09-18 21:23:18 +03:00
Azamat H. Hackimov
4f4ab3bd20 Isolate module submodule 2024-09-17 23:16:58 +03:00
Jan Engelhardt
72fc5c6784 Add member initializers for struct lnxController/wincontroller
lnxgameController::flush accesses this->m_MouseActive before that
member being initialized with something sensible, making ASAN report:

linux/lnxcontroller.cpp:259:8: runtime error: load of value 190, which is not a valid value for type 'bool'
linux/lnxcontroller.cpp:259:33: runtime error: load of value 190, which is not a valid value for type 'bool'

Thanks to the introduction of mem_rmalloc, it has been established
that struct lnxgameController is not malloc'd anywhere, so any
instantiation runs its constructor properly.
2024-09-16 22:12:14 +02:00
Jan Engelhardt
46787709d7 lib: avoid shifting negative values in GR_RGB
$GIT/lib/grdefs.h:85:67: runtime error: left shift of negative value -1
$GIT/lib/grdefs.h:85:79: runtime error: left shift of negative value -1

This happens because of:

grtext/grtext.cpp:966
966           col = GR_RGB(str[i + 1], str[i + 2], str[i + 3]);
(gdb) p str
$2 = 0x46437fe <Grtext_buffer+62> "\001\377\377\377Max. Trans-Atmospheric"
(gdb) ptyp str
type = char *

Make GR_RGB take uint8_ts, which causes the desired conversion at
GR_RGB callsites.
2024-09-12 14:25:04 +02:00
Louis Gombert
705c67a1be
Merge pull request #546 from winterheart/logging
Enhance logging facility
2024-09-10 09:27:13 +02:00
Azamat H. Hackimov
c6ab519652 Add plog library as logging facility
Added additional cmake option `USE_SYSTEM_PLOG`.
2024-09-10 03:00:23 +03:00
Jan Engelhardt
765f616d7c Force makeshort/makeword to treat inputs as unsigned
ASAN says:

linux/lnxcontroller.cpp:484:12: runtime error: left shift of negative value -1
(in other words, "-1 << x", not "x << (-1)")

Bitwise AND/OR often only make sense for unsigned quantities, so
enforce exactly that kind of treatment.
2024-09-07 23:02:13 +02:00
Jan Engelhardt
5f0bdf8184 Fix spello "it's" 2024-09-03 13:26:51 +02:00
Jan Engelhardt
38b835a03b Fix spello "its" 2024-09-03 13:26:51 +02:00
Jan Engelhardt
a3a31c77a2 Fix spello "seperate.." 2024-09-03 13:26:51 +02:00
Jan Engelhardt
4d9ff9cdc6 Fix some one-off spellos 2024-09-03 13:26:51 +02:00
Jan Engelhardt
b14470bbff Fix spello "independan.." 2024-09-03 13:26:51 +02:00
Louis Gombert
672a82ec6f
Merge pull request #544 from winterheart/reactivate-editor
Reactivate editor
2024-08-26 22:17:12 +02:00
Azamat H. Hackimov
4aa17f36d4 Minor cleanups to HardwareOpenGL.cpp 2024-08-21 15:29:05 +03:00
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
c6d31f3820 MODULE: rewrite mod_LoadModule() to use std::fs::path 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
739409a653 MODULE: rewrite mod_GetRealModuleName()
Drop DDIO dependency.
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
Thomas Roß
b3cc92d0c2 [Cleanup] Remove unused code. 2024-08-20 20:03:02 +02:00
Thomas Roß
7b71873a69 [Cleanup] Removed function declarations that are not implemented. 2024-08-20 20:03:02 +02:00
Thomas Roß
a637f1e883 [Lib] Deleted unused header files. 2024-08-20 20:03:02 +02:00
Azamat H. Hackimov
1026a6e80b
Merge pull request #527 from tophyr/pr/modernize-renderer
Modernize Renderer
2024-08-20 19:00:43 +03:00
Chris Sarbora
256898dfc6
Move fog into shader 2024-08-18 03:26:06 -05:00
Chris Sarbora
a5081982f6
Always use Multitexture 2024-08-18 03:26:06 -05:00
Chris Sarbora
0d5aa9df1d
g3_Init and g3_Close do nothing 2024-08-18 02:49:07 -05:00
Chris Sarbora
fb2dbe8c92
Delete empty method 2024-08-18 02:49:07 -05:00
Chris Sarbora
8d26df7b25
Delete written-only fields 2024-08-18 02:49:07 -05:00
Chris Sarbora
41a04aedd2
dead code 2024-08-18 02:49:06 -05:00
Azamat H. Hackimov
6cbf4c9d20 Remove unused DemoPlayAutoDemo() 2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
4bf097d0ff Use std::fs::path in demofiles 2024-08-15 11:48:16 +03:00
Azamat H. Hackimov
39f971e325 VECMAT: Silence "unknown pragma" warning on gcc/clang
There no double to float conversion anymore, so in Windows this pragma is useless.
2024-08-11 04:06:43 +03:00
Louis Gombert
ae5840f314
Merge pull request #502 from winterheart/modules-split
Splitting submodules of project
2024-07-30 23:17:47 +02:00
Louis Gombert
ae58bb674f Remove leftover glide renderer references 2024-07-28 17:52:01 +02:00
Azamat H. Hackimov
cb9e0f8828 Remove unused osTask class 2024-07-28 16:50:43 +03:00
Azamat H. Hackimov
fc209ddba4 Remove unused texture.h 2024-07-28 16:50:43 +03:00