1
0
forked from pool/prboom-plus

Restore/update sanitation script

restore patches
restore spec syntax
restore suggests:freedoom
trim description a bit

OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=19
This commit is contained in:
Jan Engelhardt 2016-03-29 23:46:33 +00:00 committed by Git OBS Bridge
parent 95b4803569
commit fe064aae55
10 changed files with 483 additions and 40 deletions

17
clean_source.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/sh -ex
# Remove Wolfenstein dogs from source; they belong to another game
# with incompatible licensing.
: ${DOOMWADDIR:=/usr/share/doom};
version=$(perl -lne 'if(/^Version\s*:\s*(\S+)/){print$1;exit}' <prboom-plus.spec)
rm -Rf "prboom-plus-$version"
tar -xf "prboom-plus-$version.tar.gz"
pushd "prboom-plus-$version/"
# retain files so automake won't complain
for i in data/sounds/dsdg*.wav data/sprites/dogs*.ppm; do
>"$i"
done
popd
find "prboom-plus-$version" -print0 | sort -z | \
tar --no-r --null --use=xz -T- -cvf "prboom-plus-$version+.tar.xz"

View File

@ -0,0 +1,27 @@
Date: 2011-08-03 18:36:44+0200
From: Jan Engelhardt <jengelh@inai.de>
Upstream: sent
Always do tesselation, because otherwise, map hacks like
self-referencing sectors (cf.
http://doom.wikia.com/wiki/Making_a_self-referencing_sector) will not
be rendered.
---
src/gl_main.c | 3 +++
1 file changed, 3 insertions(+)
Index: prboom-plus-2.5.1.4/src/gl_main.c
===================================================================
--- prboom-plus-2.5.1.4.orig/src/gl_main.c
+++ prboom-plus-2.5.1.4/src/gl_main.c
@@ -36,6 +36,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#ifndef USE_GLU_TESS
+# define USE_GLU_TESS 1
+#endif
#include "gl_opengl.h"

26
prboom-hbar-all.diff Normal file
View File

@ -0,0 +1,26 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-05-01 09:53:49.000000000 +0200
Category: improvement
Status: sent Wed, 1 May 2013 14:28:44 +0200
Show the health bar for all destructible items (including
barrels and Lost Souls).
---
src/gl_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: prboom2/src/gl_main.c
===================================================================
--- prboom2.orig/src/gl_main.c
+++ prboom2/src/gl_main.c
@@ -2399,7 +2399,8 @@ static void gld_DrawSprite(GLSprite *spr
static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite)
{
- if (((thing->flags & (MF_COUNTKILL | MF_CORPSE)) == MF_COUNTKILL) && (thing->health > 0))
+ if ((thing->flags & MF_SHOOTABLE) && thing->info->spawnhealth > 0 &&
+ thing->health > 0)
{
GLHealthBar hbar;
int health_percent = thing->health * 100 / thing->info->spawnhealth;

31
prboom-hbar-color.diff Normal file
View File

@ -0,0 +1,31 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-05-01 09:42:45.000000000 +0200
Category: improvement
Status: sent Wed, 1 May 2013 14:28:44 +0200
With the current value of health_hbar_green=0, green will never
be shown for monsters, which feels incorrect.
---
src/m_misc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: prboom2/src/m_misc.c
===================================================================
--- prboom2.orig/src/m_misc.c
+++ prboom2/src/m_misc.c
@@ -953,11 +953,11 @@ default_t defaults[] =
def_bool,ss_stat},
{"health_bar_full_length", {&health_bar_full_length}, {1},0,1,
def_bool,ss_stat},
- {"health_bar_red", {&health_bar_red}, {50},0,100,
+ {"health_bar_red", {&health_bar_red}, {25},0,100,
def_int,ss_stat},
- {"health_bar_yellow", {&health_bar_yellow}, {99},0,100,
+ {"health_bar_yellow", {&health_bar_yellow}, {50},0,100,
def_int,ss_stat},
- {"health_bar_green", {&health_bar_green}, {0},0,100,
+ {"health_bar_green", {&health_bar_green}, {99},0,100,
def_int,ss_stat},
#endif

120
prboom-hbar-gradient.diff Normal file
View File

@ -0,0 +1,120 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-05-01 14:27:39.000000000 +0200
Category: improvement
Status: sent Wed, 1 May 2013 14:28:44 +0200
This makes the health bar above shootables use gradiented color.
---
src/gl_drawinfo.c | 4 ++--
src/gl_intern.h | 2 +-
src/gl_main.c | 44 +++++++++++++++++---------------------------
3 files changed, 20 insertions(+), 30 deletions(-)
Index: prboom-plus-2.5.1.4/src/gl_drawinfo.c
===================================================================
--- prboom-plus-2.5.1.4.orig/src/gl_drawinfo.c
+++ prboom-plus-2.5.1.4/src/gl_drawinfo.c
@@ -112,10 +112,10 @@ static void gld_AddDrawRange(int size)
#define SIZEOF8(type) ((sizeof(type)+7)&~7)
void gld_AddDrawItem(GLDrawItemType itemtype, void *itemdata)
{
- int itemsize = 0;
+ unsigned int itemsize = 0;
byte *item_p = NULL;
- static int itemsizes[GLDIT_TYPES] = {
+ static const unsigned int itemsizes[GLDIT_TYPES] = {
0,
SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall),
SIZEOF8(GLWall), SIZEOF8(GLWall),
Index: prboom-plus-2.5.1.4/src/gl_intern.h
===================================================================
--- prboom-plus-2.5.1.4.orig/src/gl_intern.h
+++ prboom-plus-2.5.1.4/src/gl_intern.h
@@ -218,7 +218,7 @@ typedef struct
typedef struct
{
- int cm;
+ float r,g;
float x1, x2, x3;
float z1, z2, z3;
Index: prboom-plus-2.5.1.4/src/gl_main.c
===================================================================
--- prboom-plus-2.5.1.4.orig/src/gl_main.c
+++ prboom-plus-2.5.1.4/src/gl_main.c
@@ -2339,15 +2339,20 @@ static void gld_AddHealthBar(mobj_t* thi
GLHealthBar hbar;
int health_percent = thing->health * 100 / thing->info->spawnhealth;
- hbar.cm = -1;
- if (health_percent <= health_bar_red)
- hbar.cm = CR_RED;
- else if (health_percent <= health_bar_yellow)
- hbar.cm = CR_YELLOW;
- else if (health_percent <= health_bar_green)
- hbar.cm = CR_GREEN;
+ if (health_percent <= health_bar_red) {
+ hbar.r = 1;
+ hbar.g = 0;
+ } else if (health_percent <= health_bar_yellow) {
+ hbar.r = 1;
+ hbar.g = (double)(health_percent - health_bar_red) /
+ (health_bar_yellow - health_bar_red);
+ } else if (health_percent <= health_bar_green) {
+ /* FullSimplify[1-((percent-yellow)/(green-yellow))] */
+ hbar.r = (double)(health_bar_green - health_percent) /
+ (health_bar_green - health_bar_yellow);
+ hbar.g = 1;
+ }
- if (hbar.cm >= 0)
{
float sx2 = (float)thing->radius / 2.0f / MAP_SCALE;
float sx1 = sx2 - (float)health_percent * (float)thing->radius / 100.0f / MAP_SCALE;
@@ -2371,7 +2376,6 @@ static void gld_AddHealthBar(mobj_t* thi
static void gld_DrawHealthBars(void)
{
int i, count;
- int cm = -1;
count = gld_drawinfo.num_items[GLDIT_HBAR];
if (count > 0)
@@ -2382,31 +2386,17 @@ static void gld_DrawHealthBars(void)
for (i = count - 1; i >= 0; i--)
{
GLHealthBar *hbar = gld_drawinfo.items[GLDIT_HBAR][i].item.hbar;
- if (hbar->cm != cm)
- {
- cm = hbar->cm;
- glColor4f(cm2RGB[cm][0], cm2RGB[cm][1], cm2RGB[cm][2], 1.0f);
- }
+ glColor4f(hbar->r, hbar->g, 0, 1);
glVertex3f(hbar->x1, hbar->y, hbar->z1);
glVertex3f(hbar->x2, hbar->y, hbar->z2);
- }
- glEnd();
-
- if (health_bar_full_length)
- {
- glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
- glBegin(GL_LINES);
- for (i = count - 1; i >= 0; i--)
- {
- GLHealthBar *hbar = gld_drawinfo.items[GLDIT_HBAR][i].item.hbar;
-
+ if (health_bar_full_length) {
+ glColor4f(0.5f, 0.5f, 0.5f, 1.0f);
glVertex3f(hbar->x1, hbar->y, hbar->z1);
glVertex3f(hbar->x3, hbar->y, hbar->z3);
}
- glEnd();
}
-
+ glEnd();
gld_EnableTexture2D(GL_TEXTURE0_ARB, true);
}
}

View File

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

View File

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

View File

@ -22,69 +22,68 @@ Release: 0
Summary: Open source port of the DOOM game engine
License: GPL-2.0+
Group: Amusements/Games/3D/Shoot
Url: http://prboom-plus.sourceforge.net/
Source: http://downloads.sourceforge.net/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE avoid unnecessary rebuilds
Url: http://prboom-plus.sf.net/
#SVN-Clone: https://svn.prboom.org/repos/branches/prboom-plus-24/prboom2
#DL-URL: http://downloads.sf.net/prboom-plus/prboom-plus-2.5.1.4.tar.gz
Source: %name-%version+.tar.xz
Source2: clean_source.sh
Patch1: prboom-nodatetime.diff
Patch2: prboom-types1.diff
Patch3: prboom-types2.diff
Patch5: prboom-enable-tessellation.diff
Patch6: prboom-hbar-color.diff
Patch7: prboom-hbar-all.diff
Patch8: prboom-hbar-gradient.diff
BuildRequires: Mesa-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bash-completion
BuildRequires: fluidsynth-devel
BuildRequires: hicolor-icon-theme
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_mixer-devel
BuildRequires: libSDL_net-devel
BuildRequires: libdumb-devel
BuildRequires: libpng-devel
BuildRequires: libvorbis-devel
#BuildRequires: libmad-devel
BuildRequires: bash-completion
BuildRequires: hicolor-icon-theme
BuildRequires: pcre-devel
BuildRequires: portmidi-devel
BuildRequires: update-desktop-files
Recommends: freedoom
Suggests: freedoom
Provides: prboom = 2.5.0plus
Obsoletes: prboom <= 2.5.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
PrBoom+ is a Doom source port developed from the original PrBoom
project.
project, an open-source port of Doom, the classic 3D first-person
shooter game which outclassed any 3D world games that preceded
it, with amazing speed, flexibility, and outstanding gameplay.
PrBoom is an open-source port of Doom, the classic 3D first-person
shooter game. It totally outclassed any 3D world games that preceded
it, with amazing speed, flexibility, and outstanding gameplay. The
specs to the game were released, and thousands of extra levels were
written by fans of the game; even today new levels are written for
Doom faster then any one person could play them.
The target of the prboom-plus project is to extend the original port
with features that are necessary or useful to the developers and all
those interested in their work. It is worth noting that all changes
introduced in no way break PrBoom's compatibility with the original
Doom/Doom2 engines, and it is possible to be confident this will
never happen in the future since compatibility is as important.
prboom(-plus) focuses heavily on retaining compatibility with the
original Doom engines, which plays a big role in demo recording and
playback.
%prep
%setup -q
%patch1 -p1
%patch -P 1 -P 2 -P 3 -P 5 -P 6 -P 7 -P 8 -p1
%build
# rpm has its own optimizations, so turn off shipped defaults
%configure --enable-gl --disable-cpu-opt --program-prefix='' \
--with-waddir=%{_datadir}/doom --disable-dogs
%configure --enable-gl --disable-cpu-opt --program-prefix="" \
--with-waddir="%_datadir/doom" --disable-dogs
make %{?_smp_mflags}
%install
%make_install gamesdir=%{_bindir}
%make_install gamesdir="%_bindir"
# convenience symlink
ln -s prboom-plus %{buildroot}%{_bindir}/prboom
ln -s prboom-plus "%buildroot/%_bindir/prboom"
install -Dm644 ICONS/prboom-plus.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg
install -Dm644 ICONS/prboom-plus.desktop %{buildroot}%{_datadir}/applications/prboom-plus.desktop
install -Dm0644 ICONS/prboom-plus.svg "%buildroot/%_datadir/icons/hicolor/scalable/apps/prboom-plus.svg"
install -Dm0644 ICONS/prboom-plus.desktop "%buildroot/%_datadir/applications/prboom-plus.desktop"
install -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/completions/prboom-plus.bash
install -Dm0644 ICONS/prboom-plus.bash "%buildroot/%_datadir/bash-completion/completions/prboom-plus.bash"
%post
%desktop_database_post
@ -96,12 +95,12 @@ install -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/co
%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/doom
%{_datadir}/doc/%{name}-%{version}
%{_mandir}/*/*
%{_datadir}/applications/prboom-plus.desktop
%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg
%{_datadir}/bash-completion/completions/*
%_bindir/*
%_datadir/doom/
%_datadir/doc/%name-%version/
%_mandir/*/*
%_datadir/applications/prboom-plus.desktop
%_datadir/icons/hicolor/scalable/apps/prboom-plus.svg
%_datadir/bash-completion/completions/*
%changelog

29
prboom-types1.diff Normal file
View File

@ -0,0 +1,29 @@
From: Jan Engelhardt <jengelh@medozas.de>
build: fix compiler warnings
oplplayer.c:1347:9: warning: format '%i' expects type 'int', but
argument 3 has type 'size_t'
gl_main.c:1307:5: warning: format '%i' expects type 'int', but
argument 3 has type 'long int'
size_t requires %z; the second instance actually has type ptrdiff_t,
so %t is required.
---
src/MUSIC/oplplayer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c
===================================================================
--- prboom-plus-2.5.1.3.orig/src/MUSIC/oplplayer.c
+++ prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c
@@ -1356,7 +1356,7 @@ static const void *I_OPL_RegisterSong(co
// time numbers we have to traverse the tracks and everything
if (mf.len < 100)
{
- lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%i bytes)\n", mf.len);
+ lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%zu bytes)\n", mf.len);
return NULL;
}

194
prboom-types2.diff Normal file
View File

@ -0,0 +1,194 @@
From: Jan Engelhardt <jengelh@medozas.de>
build: fix compiler warnings about casting across different-size types
p_saveg.c: In function 'P_ArchivePlayers':
p_saveg.c:66:9: warning: cast from pointer to integer of different size
[...]
---
src/g_overflow.c | 3 ++-
src/p_saveg.c | 31 ++++++++++++++++---------------
src/r_drawflush.inl | 4 +++-
3 files changed, 21 insertions(+), 17 deletions(-)
Index: prboom2/src/g_overflow.c
===================================================================
--- prboom2.orig/src/g_overflow.c
+++ prboom2/src/g_overflow.c
@@ -35,6 +35,7 @@
#include "config.h"
#endif
+#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
@@ -170,7 +171,7 @@ void InterceptsOverrun(int num_intercept
InterceptsMemoryOverrun(location, intercept->frac);
InterceptsMemoryOverrun(location + 4, intercept->isaline);
- InterceptsMemoryOverrun(location + 8, (int) intercept->d.thing);
+ InterceptsMemoryOverrun(location + 8, (uintptr_t) intercept->d.thing);
}
}
}
Index: prboom2/src/p_saveg.c
===================================================================
--- prboom2.orig/src/p_saveg.c
+++ prboom2/src/p_saveg.c
@@ -31,6 +31,7 @@
*
*-----------------------------------------------------------------------------*/
+#include <stdint.h>
#include "doomstat.h"
#include "r_main.h"
#include "p_maputl.h"
@@ -48,7 +49,7 @@ byte *save_p;
// Pads save_p to a 4-byte boundary
// so that the load/save works on SGI&Gecko.
-#define PADSAVEP() do { save_p += (4 - ((int) save_p & 3)) & 3; } while (0)
+#define PADSAVEP() do { save_p += (4 - ((uintptr_t) save_p & 3)) & 3; } while (0)
//
// P_ArchivePlayers
//
@@ -99,7 +100,7 @@ void P_UnArchivePlayers (void)
for (j=0 ; j<NUMPSPRITES ; j++)
if (players[i]. psprites[j].state)
players[i]. psprites[j].state =
- &states[ (int)players[i].psprites[j].state ];
+ &states[ (uintptr_t)players[i].psprites[j].state ];
}
}
@@ -279,7 +280,7 @@ void P_ThinkerToIndex(void)
number_of_thinkers = 0;
for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
if (th->function == P_MobjThinker)
- th->prev = (thinker_t *) ++number_of_thinkers;
+ th->prev = (thinker_t *)(uintptr_t) ++number_of_thinkers;
}
// phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the
@@ -474,10 +475,10 @@ void P_UnArchiveThinkers (void)
memcpy (mobj, save_p, sizeof(mobj_t));
save_p += sizeof(mobj_t);
- mobj->state = states + (int) mobj->state;
+ mobj->state = states + (uintptr_t) mobj->state;
if (mobj->player)
- (mobj->player = &players[(int) mobj->player - 1]) -> mo = mobj;
+ (mobj->player = &players[(uintptr_t) mobj->player - 1]) -> mo = mobj;
P_SetThingPosition (mobj);
mobj->info = &mobjinfo[mobj->type];
@@ -799,7 +800,7 @@ void P_UnArchiveSpecials (void)
ceiling_t *ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL);
memcpy (ceiling, save_p, sizeof(*ceiling));
save_p += sizeof(*ceiling);
- ceiling->sector = &sectors[(int)ceiling->sector];
+ ceiling->sector = &sectors[(uintptr_t)ceiling->sector];
ceiling->sector->ceilingdata = ceiling; //jff 2/22/98
if (ceiling->thinker.function)
@@ -816,10 +817,10 @@ void P_UnArchiveSpecials (void)
vldoor_t *door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL);
memcpy (door, save_p, sizeof(*door));
save_p += sizeof(*door);
- door->sector = &sectors[(int)door->sector];
+ door->sector = &sectors[(uintptr_t)door->sector];
//jff 1/31/98 unarchive line remembered by door as well
- door->line = (int)door->line!=-1? &lines[(int)door->line] : NULL;
+ door->line = (uintptr_t)door->line!=-1? &lines[(uintptr_t)door->line] : NULL;
door->sector->ceilingdata = door; //jff 2/22/98
door->thinker.function = T_VerticalDoor;
@@ -833,7 +834,7 @@ void P_UnArchiveSpecials (void)
floormove_t *floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL);
memcpy (floor, save_p, sizeof(*floor));
save_p += sizeof(*floor);
- floor->sector = &sectors[(int)floor->sector];
+ floor->sector = &sectors[(uintptr_t)floor->sector];
floor->sector->floordata = floor; //jff 2/22/98
floor->thinker.function = T_MoveFloor;
P_AddThinker (&floor->thinker);
@@ -846,7 +847,7 @@ void P_UnArchiveSpecials (void)
plat_t *plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL);
memcpy (plat, save_p, sizeof(*plat));
save_p += sizeof(*plat);
- plat->sector = &sectors[(int)plat->sector];
+ plat->sector = &sectors[(uintptr_t)plat->sector];
plat->sector->floordata = plat; //jff 2/22/98
if (plat->thinker.function)
@@ -863,7 +864,7 @@ void P_UnArchiveSpecials (void)
lightflash_t *flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL);
memcpy (flash, save_p, sizeof(*flash));
save_p += sizeof(*flash);
- flash->sector = &sectors[(int)flash->sector];
+ flash->sector = &sectors[(uintptr_t)flash->sector];
flash->thinker.function = T_LightFlash;
P_AddThinker (&flash->thinker);
break;
@@ -875,7 +876,7 @@ void P_UnArchiveSpecials (void)
strobe_t *strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL);
memcpy (strobe, save_p, sizeof(*strobe));
save_p += sizeof(*strobe);
- strobe->sector = &sectors[(int)strobe->sector];
+ strobe->sector = &sectors[(uintptr_t)strobe->sector];
strobe->thinker.function = T_StrobeFlash;
P_AddThinker (&strobe->thinker);
break;
@@ -887,7 +888,7 @@ void P_UnArchiveSpecials (void)
glow_t *glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL);
memcpy (glow, save_p, sizeof(*glow));
save_p += sizeof(*glow);
- glow->sector = &sectors[(int)glow->sector];
+ glow->sector = &sectors[(uintptr_t)glow->sector];
glow->thinker.function = T_Glow;
P_AddThinker (&glow->thinker);
break;
@@ -899,7 +900,7 @@ void P_UnArchiveSpecials (void)
fireflicker_t *flicker = Z_Malloc (sizeof(*flicker), PU_LEVEL, NULL);
memcpy (flicker, save_p, sizeof(*flicker));
save_p += sizeof(*flicker);
- flicker->sector = &sectors[(int)flicker->sector];
+ flicker->sector = &sectors[(uintptr_t)flicker->sector];
flicker->thinker.function = T_FireFlicker;
P_AddThinker (&flicker->thinker);
break;
@@ -912,7 +913,7 @@ void P_UnArchiveSpecials (void)
elevator_t *elevator = Z_Malloc (sizeof(*elevator), PU_LEVEL, NULL);
memcpy (elevator, save_p, sizeof(*elevator));
save_p += sizeof(*elevator);
- elevator->sector = &sectors[(int)elevator->sector];
+ elevator->sector = &sectors[(uintptr_t)elevator->sector];
elevator->sector->floordata = elevator; //jff 2/22/98
elevator->sector->ceilingdata = elevator; //jff 2/22/98
elevator->thinker.function = T_MoveElevator;
Index: prboom2/src/r_drawflush.inl
===================================================================
--- prboom2.orig/src/r_drawflush.inl
+++ prboom2/src/r_drawflush.inl
@@ -28,6 +28,8 @@
*
*-----------------------------------------------------------------------------*/
+#include <stdint.h>
+
#if (R_DRAWCOLUMN_PIPELINE_BITS == 8)
#define SCREENTYPE byte
#define TOPLEFT byte_topleft
@@ -250,7 +252,7 @@ static void R_FLUSHQUAD_FUNCNAME(void)
}
#else
#if (R_DRAWCOLUMN_PIPELINE_BITS == 8)
- if ((sizeof(int) == 4) && (((int)source % 4) == 0) && (((int)dest % 4) == 0)) {
+ if ((sizeof(int) == 4) && (((uintptr_t)source % 4) == 0) && (((uintptr_t)dest % 4) == 0)) {
while(--count >= 0)
{
*(int *)dest = *(int *)source;