1
0
forked from pool/crispy-doom

2 Commits

Author SHA256 Message Date
27ded5275a Add c99.patch, c23-gcc15.patch 2025-06-17 12:11:16 +02:00
8ecdf3c6a9 crispy-doom 7.0 2024-08-10 01:23:46 +02:00
6 changed files with 154 additions and 9 deletions

68
c23-gcc15.patch Normal file
View File

@@ -0,0 +1,68 @@
From a45ae121549f6e589eddc64d3a038b19d5b20de1 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Tue, 29 Apr 2025 08:19:06 +0200
Subject: [PATCH] fix gcc-15 (i.e. -std=gnu23) build
---
src/doom/f_finale.c | 8 ++++----
src/doom/p_bexptr.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/doom/f_finale.c b/src/doom/f_finale.c
index f1fe24e1..2568836e 100644
--- a/src/doom/f_finale.c
+++ b/src/doom/f_finale.c
@@ -113,7 +113,7 @@ void F_CastTicker (void);
boolean F_CastResponder (event_t *ev);
void F_CastDrawer (void);
-extern void A_RandomJump();
+extern void A_RandomJump(void *, void *, void *);
//
// F_StartFinale
@@ -562,7 +562,7 @@ void F_CastTicker (void)
goto stopattack; // Oh, gross hack!
*/
// [crispy] Allow A_RandomJump() in deaths in cast sequence
- if (caststate->action.acp1 == A_RandomJump && Crispy_Random() < caststate->misc2)
+ if (caststate->action.acp3 == A_RandomJump && Crispy_Random() < caststate->misc2)
{
st = caststate->misc1;
}
@@ -655,7 +655,7 @@ void F_CastTicker (void)
if (casttics == -1)
{
// [crispy] Allow A_RandomJump() in deaths in cast sequence
- if (caststate->action.acp1 == A_RandomJump)
+ if (caststate->action.acp3 == A_RandomJump)
{
if (Crispy_Random() < caststate->misc2)
{
@@ -730,7 +730,7 @@ boolean F_CastResponder (event_t* ev)
caststate = &states[mobjinfo[castorder[castnum].type].deathstate];
casttics = caststate->tics;
// [crispy] Allow A_RandomJump() in deaths in cast sequence
- if (casttics == -1 && caststate->action.acp1 == A_RandomJump)
+ if (casttics == -1 && caststate->action.acp3 == A_RandomJump)
{
if (Crispy_Random() < caststate->misc2)
{
diff --git a/src/doom/p_bexptr.c b/src/doom/p_bexptr.c
index 0212a4f1..d4256ded 100644
--- a/src/doom/p_bexptr.c
+++ b/src/doom/p_bexptr.c
@@ -22,8 +22,8 @@
#include "m_random.h"
#include "s_sound.h"
-extern void A_Explode();
-extern void A_FaceTarget();
+extern void A_Explode(mobj_t* thingy);
+extern void A_FaceTarget(mobj_t* actor);
extern boolean P_CheckMeleeRange (mobj_t *actor);
extern void P_Thrust (player_t* player, angle_t angle, fixed_t move);
--
2.49.0

63
c99.patch Normal file
View File

@@ -0,0 +1,63 @@
From 57e0cdf606bcf9a518f2cad99831133396c015fa Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Mon, 20 Jan 2025 17:22:48 +0100
Subject: [PATCH] declare code as C99 compliant, include stdbool.h
unconditionally (#1723)
* declare code as C99 compliant, include stdbool.h unconditionally
* add a comment why `boolean` must be an `int` type
---
CMakeLists.txt | 2 ++
configure.ac | 2 +-
src/doomtype.h | 7 +++++--
3 files changed, 8 insertions(+), 3 deletions(-)
Index: crispy-doom-crispy-doom-7.0/CMakeLists.txt
===================================================================
--- crispy-doom-crispy-doom-7.0.orig/CMakeLists.txt
+++ crispy-doom-crispy-doom-7.0/CMakeLists.txt
@@ -3,6 +3,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_S
cmake_minimum_required(VERSION 3.7.2)
project("Crispy Doom" VERSION 7.0.0 LANGUAGES C)
+set(CMAKE_C_STANDARD 99)
+
# Autotools variables
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
set(top_builddir ${CMAKE_CURRENT_BINARY_DIR})
Index: crispy-doom-crispy-doom-7.0/configure.ac
===================================================================
--- crispy-doom-crispy-doom-7.0.orig/configure.ac
+++ crispy-doom-crispy-doom-7.0/configure.ac
@@ -16,7 +16,7 @@ AC_CANONICAL_HOST
orig_CFLAGS="$CFLAGS"
AM_PROG_AR
-AC_PROG_CC
+AC_PROG_CC_C99
AC_PROG_RANLIB
AC_CHECK_PROG(HAVE_PYTHON, python3, true, false)
Index: crispy-doom-crispy-doom-7.0/src/doomtype.h
===================================================================
--- crispy-doom-crispy-doom-7.0.orig/src/doomtype.h
+++ crispy-doom-crispy-doom-7.0/src/doomtype.h
@@ -99,12 +99,15 @@
// standard and defined to include stdint.h, so include this.
#include <inttypes.h>
+#include <stdbool.h>
#if defined(__cplusplus) || defined(__bool_true_false_are_defined)
-// Use builtin bool type with C++.
+// The C++/C99 bool type (or _Bool that is) can only have two values:
+// 0 or 1. However, the Doom source code assumes any non-zero value
+// to evaluate to true, so we have to use an int type here.
-typedef bool boolean;
+typedef int boolean;
#else

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b85649c615efeac7573883370e9434255af301222b323120692cb9649b7f420
size 2499918

BIN
crispy-doom-7.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Jun 17 10:11:01 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Add c99.patch, c23-gcc15.patch
-------------------------------------------------------------------
Fri Aug 9 23:14:00 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 7.0
* True color rendering support (from Chocolate Doom 3.1.0 base)
* Improve display of secret sector coloring in automap when
custom PLAYPALs are used.
* Use PWAD-provided color translation tables for colored blood.
* Allow non-power-of-2 wide sky textures.
* Add support for Sigil II.
-------------------------------------------------------------------
Sun Jul 16 18:33:39 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package crispy-doom
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: crispy-doom
Version: 6.0
Version: 7.0
Release: 0
Summary: Higher resolution DOOM/Heretic/Hexen/Strife source port
License: GPL-2.0-or-later
@@ -25,6 +25,8 @@ Group: Amusements/Games/3D/Shoot
URL: https://github.com/fabiangreffrath/crispy-doom
Source: https://github.com/fabiangreffrath/crispy-doom/archive/refs/tags/crispy-doom-%version.tar.gz
Patch1: chdoom-iwaddir.diff
Patch2: c99.patch
Patch3: c23-gcc15.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
@@ -67,10 +69,6 @@ b="%buildroot"
docdir="%_docdir/%name"
mkdir -p "$b/%_bindir"
rm -f "$b/%_docdir/%name/INSTALL"
pushd "$b/%_mandir/man5"
for i in default heretic hexen; do
mv "$i.cfg.5" "crispy-doom-$i.cfg.5"
done
%fdupes %buildroot/%_prefix
%post