1
0
forked from pool/prboom-plus

Accepting request 380193 from home:Mailaender:branches:games

new stable upstream release

OBS-URL: https://build.opensuse.org/request/show/380193
OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=17
This commit is contained in:
Ferdinand Thiessen 2016-03-26 21:57:51 +00:00 committed by Git OBS Bridge
parent 440bc74069
commit 75b653e5f7
11 changed files with 46 additions and 483 deletions

View File

@ -1,19 +0,0 @@
#!/bin/sh -ex
# Remove Wolfenstein dogs from source
: ${DOOMWADDIR:=/usr/share/doom};
version=$(perl -lne 'if(/^Version\s*:\s*(\S+)/){print$1;exit}' <prboom-plus.spec);
tar -xf "prboom-plus-$version.tar.xz";
pushd "prboom-plus-$version/data/";
deutex -doom2 "$DOOMWADDIR" -extract prboom-plus.wad;
touch lumps/{b,c}_{start,end}.lmp;
grep -Ev '^DOG|^DSDG' <prboom.txt >wadinfo.txt;
rm -f prboom-plus.wad;
deutex -doom2 "$DOOMWADDIR" -create wadinfo.txt prboom-plus.wad;
find . -mindepth 1 -type d -print0 | xargs -0 rm -Rf;
mv wadinfo.txt prboom.txt;
rm -f error.txt output.txt;
popd;
find "prboom-plus-$version" -print0 | sort -z | \
tar -T- --null --use=xz -cvf "prboom-plus-$version+.tar.xz";

View File

@ -1,27 +0,0 @@
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.3/src/gl_main.c
===================================================================
--- prboom-plus-2.5.1.3.orig/src/gl_main.c
+++ prboom-plus-2.5.1.3/src/gl_main.c
@@ -73,6 +73,9 @@
#ifdef USE_CUSTOM_QSORT
#include "qsort.h"
#endif
+#ifndef USE_GLU_TESS
+# define USE_GLU_TESS 1
+#endif
// All OpenGL extentions will be disabled in gl_compatibility mode
int gl_compatibility = 0;

View File

@ -1,26 +0,0 @@
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;

View File

@ -1,31 +0,0 @@
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

View File

@ -1,120 +0,0 @@
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: prboom2/src/gl_drawinfo.c
===================================================================
--- prboom2.orig/src/gl_drawinfo.c
+++ prboom2/src/gl_drawinfo.c
@@ -111,10 +111,10 @@ static void gld_AddDrawRange(int size)
#define NEWSIZE (MAX(64 * 1024, itemsize))
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,
sizeof(GLWall), sizeof(GLWall), sizeof(GLWall), sizeof(GLWall), sizeof(GLWall),
sizeof(GLWall), sizeof(GLWall),
Index: prboom2/src/gl_intern.h
===================================================================
--- prboom2.orig/src/gl_intern.h
+++ prboom2/src/gl_intern.h
@@ -220,7 +220,7 @@ typedef struct
typedef struct
{
- int cm;
+ float r,g;
float x1, x2, x3;
float z1, z2, z3;
Index: prboom2/src/gl_main.c
===================================================================
--- prboom2.orig/src/gl_main.c
+++ prboom2/src/gl_main.c
@@ -2405,15 +2405,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;
@@ -2437,7 +2442,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)
@@ -2448,31 +2452,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:e0e2241d174839b107f1a42b191aa9895dc6749e477cbc850ad520fba2353b94
size 1627558

View File

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Mar 26 09:54:56 UTC 2016 - mailaender@opensuse.org
- Update to version 2.5.1.4
-------------------------------------------------------------------
Sun Mar 29 19:19:54 UTC 2015 - jengelh@inai.de

View File

@ -1,7 +1,7 @@
#
# spec file for package prboom-plus
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,35 +17,32 @@
Name: prboom-plus
Version: 2.5.1.4~test4355
Version: 2.5.1.4
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/
#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.3.tar.gz
Source: %name-%version.tar.xz
Source: http://downloads.sourceforge.net/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE avoid unnecessary rebuilds
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
Source2: clean_source.sh
BuildRequires: Mesa-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fluidsynth-devel
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: xz
Suggests: freedoom
BuildRequires: portmidi-devel
BuildRequires: update-desktop-files
Recommends: freedoom
Provides: prboom = 2.5.0plus
Obsoletes: prboom <= 2.5.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -54,7 +51,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
PrBoom+ is a Doom source port developed from the original PrBoom
project.
prboom is an open-source port of Doom, the classic 3D first-person
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
@ -69,35 +66,42 @@ Doom/Doom2 engines, and it is possible to be confident this will
never happen in the future since compatibility is as important.
%prep
%setup -qn prboom2
%patch -P 1 -P 2 -P 3 -P 5 -P 6 -P 7 -P 8 -p1
%setup -q
%patch1 -p1
%build
./bootstrap;
# rpm has its own optimizations, so turn off shipped defaults
%configure --enable-gl --disable-cpu-opt --program-prefix='' \
--with-waddir=%_datadir/doom --disable-dogs
--with-waddir=%{_datadir}/doom --disable-dogs
make %{?_smp_mflags}
%install
b="%buildroot";
make install DESTDIR="$b";
# Will manually package docs (see %%files)
rm -Rf "$b/%_datadir/doc";
mkdir -p "$b/%_bindir";
mv "$b/%_prefix/games"/* "$b/%_bindir/";
# Convenience symlink
ln -s prboom-plus "$b/%_bindir/prboom";
%make_install gamesdir=%{_bindir}
# convenience symlink
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 -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/completions/prboom-plus.bash
%post
echo "INFO: %name: The global IWAD directory is %_datadir/doom.";
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc NEWS AUTHORS README
%doc doc/MBF.txt doc/MBFFAQ.txt doc/README.compat doc/README.demos doc/boom.txt
%_bindir/*
%_datadir/doom
%_mandir/*/*
%{_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

View File

@ -1,29 +0,0 @@
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;
}

View File

@ -1,194 +0,0 @@
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;