Commit Graph

1394 Commits

Author SHA1 Message Date
halprin
f3f8d1e5fa
Set-up brew path correctly before bundle install 2024-12-15 17:23:07 -07:00
halprin
b7b410fe73
try installing Rosetta and build for Intel 2024-12-15 17:05:00 -07:00
Louis Gombert
6583bfe575
Merge pull request #655 from NateEag/patch-1
fix typo in USAGE.md
2024-12-14 13:42:40 +01:00
Nate Eagleson
ec07a53d45
fix typo in USAGE.md 2024-12-14 01:51:44 -05:00
Louis Gombert
0bdca225e2
Merge pull request #652 from sebholt/fix_array_size_computation
Fix two array size computations
2024-12-05 22:03:42 +01:00
Louis Gombert
584ac21f5e
Merge pull request #644 from winterheart/credits-update
Add git-contributors.py to regenerate opensource contributors list
2024-12-05 21:52:39 +01:00
Sebastian Holtermann
8ffbc6c5ea Fix array size computation
This fixes an array size computation that assumed that the array elements
are char * when in fact they are char arrays.
2024-12-02 18:01:00 +01:00
Sebastian Holtermann
73bf2ebeaa Fix array size computation
This fixes an array size computation that assumed that the array elements
are char * when in fact they are char arrays.
2024-12-02 17:56:30 +01:00
Louis Gombert
8823c1cb53
Merge pull request #643 from sebholt/2dlib_fixes
Fix some compiler warnings in the 2dlib directory
2024-12-01 12:34:32 +00:00
Azamat H. Hackimov
0d1265ce35 Add oscredits.txt to credit lines 2024-11-29 17:14:09 +03:00
Azamat H. Hackimov
2c8081e832 Implement git-contributors.py
Add tool for creating credits file from git history.
2024-11-29 17:14:09 +03:00
Azamat H. Hackimov
90fa0fb8d7 Rewrite credits.cpp to use std::vector
Simplify code, convert most global variables to local.
2024-11-29 17:14:05 +03:00
Azamat H. Hackimov
b07f2353ae Properly declare ShowStaticScreen() 2024-11-29 17:13:20 +03:00
Azamat H. Hackimov
f79e02c638 Cleanup credits.cpp 2024-11-29 17:13:20 +03:00
Azamat H. Hackimov
7fe52ecb97
Merge pull request #642 from Lgt2x/arm64-cross
Introduce cross-compiled ARM64 build
2024-11-29 16:15:01 +03:00
Sebastian Holtermann
0e8980ea13 2dlib: Fix set but not used compiler warning in font.cpp
This fixes a set but not used compiler warning in Release builds in
2dlib/font.cpp.
2024-11-27 16:13:00 +01:00
Sebastian Holtermann
b43a5bb039 2dlib: Fix unused variable compiler warning in memsurf.cpp
This fixes an unused variable compiler warning in Release builds in
2dlib/memsurf.cpp.
2024-11-27 16:13:00 +01:00
Sebastian Holtermann
3ac2cb8382 2dlib: Fix uninitialized bool compiler warning in surface.cpp 2024-11-27 15:56:33 +01:00
Sebastian Holtermann
987a51d38d 2dlib: Fix another set but not used variable compiler warning in surface.cpp 2024-11-27 15:56:33 +01:00
Sebastian Holtermann
d49691143c 2dlib: Fix another set but not used variable compiler warning in surface.cpp 2024-11-27 15:56:33 +01:00
Sebastian Holtermann
a97416fc28 2dlib: Fix set but not used variable compiler warning in surface.cpp 2024-11-27 15:56:33 +01:00
Sebastian Holtermann
e122a16804 2dlib: Fix integer signedness missmatch in comparison in font.cpp 2024-11-27 15:56:33 +01:00
Sebastian Holtermann
10dae4d65b 2dlib: Fix an integer signedness compiler warning in pentext.cpp
This fixes an integer signedness compiler warning and cleans up the
grViewport::draw_text_line method in 2dlib/pentext.cpp.
2024-11-27 15:56:13 +01:00
Sebastian Holtermann
9af8c16b6b 2dlib: Fix unused variable compiler warning in pen.cpp
This removes some unused variables in 2dlib/pen.cpp.
2024-11-27 15:56:13 +01:00
Louis Gombert
836dd4d382
Merge pull request #645 from jengelh/master
Resolve 3301 compiler warnings
2024-11-26 22:24:13 +00:00
Louis Gombert
1803f66f75
Merge pull request #651 from Lgt2x/macos-13
MacOS CI builds: use MacOS-13 instead of the deprecated MacOS-12
2024-11-26 19:23:29 +00:00
Louis Gombert
d77383f8ab MacOS CI builds: use MacOS-13 instead of the deprecated MacOS-12 2024-11-26 20:44:29 +01:00
Louis Gombert
78c1e61a27 Fix USAGE.md instructions with updated file locations 2024-11-25 22:44:37 +01:00
Louis Gombert
390b36ba84 VCPKG: bump SDL2 from 2.30.3 to 2.30.8 2024-11-25 22:44:37 +01:00
Louis Gombert
601765a18f Add ARM64 build to github actions 2024-11-25 22:44:37 +01:00
Louis Gombert
f7efa4b8dc
Merge pull request #648 from jengelh/lv12
d3: fix game crash in Retribution level 12's big matcen room
2024-11-25 21:37:00 +00:00
Louis Gombert
238aead057
Merge pull request #646 from jengelh/spello
Fix spellos in comments/strings
2024-11-25 21:26:54 +00:00
Louis Gombert
f7e6dd92fd
Merge pull request #647 from jengelh/inventory
Resolve crash on inventory pickup
2024-11-25 21:25:17 +00:00
Louis Gombert
1b2f51400a
Merge pull request #649 from halprin/patch-1
Update macOS Usage Documentation
2024-11-25 20:57:25 +00:00
halprin
d26cedf8c2
Add macOS step to xattr the netgames folder 2024-11-10 09:07:33 -07:00
Jan Engelhardt
0b7989b65a d3: fix game crash in Retribution level 12's big matcen room
When activating switches in the room with 6 matcens,
this happens after a short while:

```
Assertion failure at TERRAIN_REGION (Descent3/terrain.h:218), triggered 1 time:
  'x != -1 && "invalid/unset room number (-1)!"'

f0  TERRAIN_REGION (x=-1) at Descent3/terrain.h:222
f1  AIPathAllocPath (obj=0x3d304b0 <Objects+150000>, ai_info=0x520000444080, goal_ptr=0x520000444250, start_room=0x3d304cc <Objects+150028>, start_pos=0x3d304d0 <Objects+150032>, end_room=0x7fb115dbe830, end_pos=0x52000044427c, rad=0, flags=0, handle=28822, ignore_obj=-1) at Descent3/aipath.cpp:1066
f2  GoalDoFrame (obj=0x3d304b0 <Objects+150000>) at Descent3/AIGoal.cpp:823
f3  AIDoFrame (obj=0x3d304b0 <Objects+150000>) at Descent3/AImain.cpp:6214
f4  ObjDoFrame (obj=0x3d304b0 <Objects+150000>) at Descent3/object.cpp:2674
f5  ObjDoFrameAll () at Descent3/object.cpp:2988
f6  GameFrame () at Descent3/GameLoop.cpp:2981
f7  GameSequencer () at Descent3/gamesequence.cpp:1221
f8  PlayGame () at Descent3/game.cpp:834
f9  MainLoop () at Descent3/descent.cpp:550
f10 Descent3 () at Descent3/descent.cpp:508
f11 oeD3LnxApp::run (this=0x7fb115a0db50) at Descent3/sdlmain.cpp:151

(gdb) up
    start_room=0x3d304cc <Objects+150028>, start_pos=0x3d304d0 <Objects+150032>, end_room=0x7fb115dbe830, end_pos=0x52000044427c, rad=0, flags=0,
    handle=28822, ignore_obj=-1) at Descent3/aipath.cpp:1066
1066          } else if (BOA_Array[BOA_INDEX(*start_room)][BOA_INDEX(*end_room)] & BOAF_TOO_SMALL_FOR_ROBOT) {
(gdb) p *start_room
$2 = 171
(gdb) p *end_room
$3 = -1
```

The return type of ``BOA_GetNextPath`` is int; but inside the
function, ``false`` is returned, which does not fit the scheme.
Judging from callsites, ``BOA_NO_PATH`` is expected instead.

In some functions related to AI pathfinding, add handling or
assertions for invalid room numbers.
2024-11-06 19:03:53 +01:00
Jan Engelhardt
61439b379d net: resolve 1 instance of -Wdelete-incomplete
Descent3/multi_dll_mgr.cpp:974:43: warning: deleting "void*" is
undefined [-Wdelete-incomplete]

(``delete`` requires that types are _complete_, so as to find the
right destructor to call; ``void`` is incomplete by definition.)
2024-11-06 18:19:08 +01:00
Jan Engelhardt
48953868df build: resolve 101 instances of -Wunused-variable 2024-11-04 22:20:18 +01:00
Jan Engelhardt
8d4addecfa d3: resolve 175 instances of -Wunused-variable 2024-11-04 22:20:17 +01:00
Jan Engelhardt
8e30eea951 Resolve crash on inventory pickup
Commit d185ab9514 broke the
pointer-moving logic. When the allweapons cheat is executed or when
e.g. the afterburner is picked up, ASAN terminates the program with:

```
==8330==ERROR: AddressSanitizer: heap-use-after-free on address 0x50f00007ab60
at pc 0x7f23334f6843 bp 0x7ffe724d2b10 sp 0x7ffe724d22d0
READ of size 3 at 0x50f00007ab60 thread T0
    f0 strdup
    f1 Inventory::AddCounterMeasure(int, int, int, int, char const*) Descent3/Inventory.cpp:575
    f2 Inventory::Add(int, int, object*, int, int, int, char const*) Descent3/Inventory.cpp:520
    f3 DemoCheats(int) Descent3/GameCheat.cpp:606
    f4 ProcessKeys() Descent3/GameLoop.cpp:2420
    f5 GameFrame() Descent3/GameLoop.cpp:2956
    f6 GameSequencer() Descent3/gamesequence.cpp:1212
    f7 PlayGame() Descent3/game.cpp:826
    f8 MainLoop() Descent3/descent.cpp:554
    f9 Descent3() Descent3/descent.cpp:507
    f10 oeD3LnxApp::run() Descent3/sdlmain.cpp:142
    f11 main Descent3/sdlmain.cpp:323

0x50f00007ab60 is located 0 bytes inside of 175-byte region [0x50f00007ab60,0x50f00007ac0f)
freed by thread T0 here:
    f1 mng_LoadNetGenericPage(CFILE*, bool) manage/generic.cpp:2216
    f2 mng_LoadNetPages(int) manage/manage.cpp:1281
    f3 mng_LoadTableFiles(int) manage/manage.cpp:648
    f4 InitD3Systems2(bool) Descent3/init.cpp:1891
    f5 Descent3() Descent3/descent.cpp:503
    f6 oeD3LnxApp::run() Descent3/sdlmain.cpp:142
    f7 main Descent3/sdlmain.cpp:323

previously allocated by thread T0 here:
    f0 malloc
    f1 mem_rmalloc<char> mem/mem.h:138
    f2 mng_ReadNewGenericPage(CFILE*, mngs_generic_page*) manage/generic.cpp:1145
    f3 mng_LoadNetGenericPage(CFILE*, bool) manage/generic.cpp:2196
    f4 mng_LoadNetPages(int) manage/manage.cpp:1281
    f5 mng_LoadTableFiles(int) manage/manage.cpp:648
    f6 InitD3Systems2(bool) Descent3/init.cpp:1891
    f7 Descent3() Descent3/descent.cpp:503
    f8 oeD3LnxApp::run() Descent3/sdlmain.cpp:142
    f9 main Descent3/sdlmain.cpp:323
```

The pointer value of mngs_generic_page::description was copied to
object_info::description (by function
``mng_AssignGenericPageToObjInfo``) and then the page was freed in
``mng_LoadNetGenericPage``, leaving object_info::description non-NULL
and dangling.

Fixes: d185ab9514
2024-11-04 11:02:57 +01:00
Jan Engelhardt
6fb7684a85 Fix spello "rturns" 2024-11-04 10:20:54 +01:00
Jan Engelhardt
9b2675b1f7 Fix spello "~full" 2024-11-04 10:20:15 +01:00
Jan Engelhardt
0e6110e78b scripts: resolve 917 instances of -Wunused-variable
scripts/LEVEL0.cpp:1036:27: warning: unused variable "event_data" [-Wunused-variable]
and a lot more.
2024-11-03 23:39:38 +01:00
Jan Engelhardt
c9bf214ede d3: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
9687cd5e27 ui: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
ab0e1c7f5b scripts: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
7fa31b3aa3 scripts: consistent initialization of memory member
Some classes did set it to nullptr and others did not.
For the sake of consistency, initialize it explicitly everywhere.
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
Jan Engelhardt
a6d37b68e5 ui: replace in-constructor assignments by initializations 2024-11-03 23:39:37 +01:00
Jan Engelhardt
b7838c1a85 scripts: replace in-constructor assignments by initializations 2024-11-03 23:39:37 +01:00