Skip to content

Commit

Permalink
games/zdoom: fix the build with llvm16 in base
Browse files Browse the repository at this point in the history
The 'register' keyword now raises an error, so patch out those parts.
Patch generally taken from gzdoom commit 3c044ebd5eae343.  No functional
change as a result of this.
  • Loading branch information
kevans91 committed Jun 26, 2023
1 parent 19eba9d commit 10aecf3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions games/zdoom/files/patch-src_am__map.cpp
@@ -0,0 +1,15 @@
--- src/am_map.cpp.orig 2016-02-22 02:11:13 UTC
+++ src/am_map.cpp
@@ -1692,9 +1692,9 @@ bool AM_clipMline (mline_t *ml, fline_t *fl)
TOP =8
};

- register int outcode1 = 0;
- register int outcode2 = 0;
- register int outside;
+ int outcode1 = 0;
+ int outcode2 = 0;
+ int outside;

fpoint_t tmp = { 0, 0 };
int dx;
11 changes: 11 additions & 0 deletions games/zdoom/files/patch-src_md5.cpp
@@ -0,0 +1,11 @@
--- src/md5.cpp.orig 2016-02-22 02:11:13 UTC
+++ src/md5.cpp
@@ -166,7 +166,7 @@ MD5Transform(DWORD buf[4], const DWORD in[16])
void
MD5Transform(DWORD buf[4], const DWORD in[16])
{
- register DWORD a, b, c, d;
+ DWORD a, b, c, d;

a = buf[0];
b = buf[1];
18 changes: 18 additions & 0 deletions games/zdoom/files/patch-src_p__spec.cpp
Expand Up @@ -9,3 +9,21 @@
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
@@ -1826,7 +1826,7 @@ static void P_SpawnScrollers(void)

switch (special)
{
- register int s;
+ int s;

case Scroll_Ceiling:
{
@@ -2357,7 +2357,7 @@ static void P_SpawnPushers ()
{
int i;
line_t *l = lines;
- register int s;
+ int s;

for (i = 0; i < numlines; i++, l++)
{

0 comments on commit 10aecf3

Please sign in to comment.