mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-27 06:42:23 +00:00
replace several long casts with intptr_t and include stdint.h for it.
This commit is contained in:
parent
c43e944a3d
commit
51200b3e6b
1 changed files with 6 additions and 5 deletions
|
@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
// r_rast.c
|
||||
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "r_local.h"
|
||||
|
@ -489,7 +490,7 @@ void R_EmitCachedEdge (void)
|
|||
{
|
||||
edge_t *pedge_t;
|
||||
|
||||
pedge_t = (edge_t *)((unsigned long)r_edges + r_pedge->cachededgeoffset);
|
||||
pedge_t = (edge_t *)((uintptr_t)r_edges + r_pedge->cachededgeoffset);
|
||||
|
||||
if (!pedge_t->surfs[0])
|
||||
pedge_t->surfs[0] = surface_p - surfaces;
|
||||
|
@ -594,9 +595,9 @@ void R_RenderFace (msurface_t *fa, int clipflags)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((((unsigned long)edge_p - (unsigned long)r_edges) >
|
||||
if ((((uintptr_t)edge_p - (uintptr_t)r_edges) >
|
||||
r_pedge->cachededgeoffset) &&
|
||||
(((edge_t *)((unsigned long)r_edges +
|
||||
(((edge_t *)((uintptr_t)r_edges +
|
||||
r_pedge->cachededgeoffset))->owner == r_pedge))
|
||||
{
|
||||
R_EmitCachedEdge ();
|
||||
|
@ -640,9 +641,9 @@ void R_RenderFace (msurface_t *fa, int clipflags)
|
|||
{
|
||||
// it's cached if the cached edge is valid and is owned
|
||||
// by this medge_t
|
||||
if ((((unsigned long)edge_p - (unsigned long)r_edges) >
|
||||
if ((((uintptr_t)edge_p - (uintptr_t)r_edges) >
|
||||
r_pedge->cachededgeoffset) &&
|
||||
(((edge_t *)((unsigned long)r_edges +
|
||||
(((edge_t *)((uintptr_t)r_edges +
|
||||
r_pedge->cachededgeoffset))->owner == r_pedge))
|
||||
{
|
||||
R_EmitCachedEdge ();
|
||||
|
|
Loading…
Reference in a new issue