Fix 64 bit problems after viewing a security cam.

git-svn-id: https://svn.eduke32.com/eduke32@1539 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
qbix79 2009-11-04 08:11:21 +00:00
parent 73d0b92d92
commit 1573ee6e17
2 changed files with 16 additions and 13 deletions

View file

@ -59,11 +59,12 @@ void setupslopevlin(int32_t logylogx, intptr_t bufplc, int32_t pinc)
} }
void slopevlin(intptr_t p, int32_t i, intptr_t slopaloffs, int32_t cnt, int32_t bx, int32_t by) void slopevlin(intptr_t p, int32_t i, intptr_t slopaloffs, int32_t cnt, int32_t bx, int32_t by)
{ {
int32_t *slopalptr, bz, bzinc; intptr_t* slopalptr;
int32_t bz, bzinc;
uint32_t u, v; uint32_t u, v;
bz = asm3; bzinc = (asm1>>3); bz = asm3; bzinc = (asm1>>3);
slopalptr = (int32_t*)slopaloffs; slopalptr = (intptr_t*)slopaloffs;
for (; cnt>0; cnt--) for (; cnt>0; cnt--)
{ {
i = krecip(bz>>6); bz += bzinc; i = krecip(bz>>6); bz += bzinc;

View file

@ -88,7 +88,7 @@ static int16_t *dotp1[MAXYDIM], *dotp2[MAXYDIM];
static int8_t tempbuf[MAXWALLS]; static int8_t tempbuf[MAXWALLS];
int32_t ebpbak, espbak; int32_t ebpbak, espbak;
int32_t slopalookup[16384]; // was 2048 intptr_t slopalookup[16384]; // was 2048
#if defined(USE_OPENGL) #if defined(USE_OPENGL)
palette_t palookupfog[MAXPALOOKUPS]; palette_t palookupfog[MAXPALOOKUPS];
#endif #endif
@ -453,8 +453,8 @@ char globparaceilclip, globparaflorclip;
int32_t xyaspect, viewingrangerecip; int32_t xyaspect, viewingrangerecip;
intptr_t asm1, asm2, asm3, asm4; intptr_t asm1, asm2, asm3, asm4,palookupoffse[4];
int32_t vplce[4], vince[4], palookupoffse[4], bufplce[4]; int32_t vplce[4], vince[4], bufplce[4];
char globalxshift, globalyshift; char globalxshift, globalyshift;
int32_t globalxpanning, globalypanning, globalshade; int32_t globalxpanning, globalypanning, globalshade;
int16_t globalpicnum, globalshiftval; int16_t globalpicnum, globalshiftval;
@ -709,8 +709,8 @@ skipitaddwall:
// //
static void maskwallscan(int32_t x1, int32_t x2, int16_t *uwal, int16_t *dwal, int32_t *swal, int32_t *lwal) static void maskwallscan(int32_t x1, int32_t x2, int16_t *uwal, int16_t *dwal, int32_t *swal, int32_t *lwal)
{ {
int32_t x,/* startx,*/ xnice, ynice, fpalookup; int32_t x,/* startx,*/ xnice, ynice;
intptr_t startx, p; intptr_t startx, p, fpalookup;
int32_t y1ve[4], y2ve[4], /* p,*/ tsizx, tsizy; int32_t y1ve[4], y2ve[4], /* p,*/ tsizx, tsizy;
#ifndef ENGINE_USING_A_C #ifndef ENGINE_USING_A_C
char bad; char bad;
@ -1737,7 +1737,8 @@ static void florscan(int32_t x1, int32_t x2, int32_t sectnum)
// //
static void wallscan(int32_t x1, int32_t x2, int16_t *uwal, int16_t *dwal, int32_t *swal, int32_t *lwal) static void wallscan(int32_t x1, int32_t x2, int16_t *uwal, int16_t *dwal, int32_t *swal, int32_t *lwal)
{ {
int32_t x, xnice, ynice, fpalookup; int32_t x, xnice, ynice;
intptr_t fpalookup;
int32_t y1ve[4], y2ve[4], tsizx, tsizy; int32_t y1ve[4], y2ve[4], tsizx, tsizy;
#ifndef ENGINE_USING_A_C #ifndef ENGINE_USING_A_C
char bad; char bad;
@ -2092,9 +2093,10 @@ static inline void ceilspritescan(int32_t x1, int32_t x2)
#define BITSOFPRECISION 3 //Don't forget to change this in A.ASM also! #define BITSOFPRECISION 3 //Don't forget to change this in A.ASM also!
static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat) static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
{ {
int32_t i, j, l, x, y, dx, dy, wx, wy, y1, y2, daz; int32_t i, l, x, y, dx, dy, wx, wy, y1, y2, daz;
int32_t daslope, dasqr; int32_t daslope, dasqr;
int32_t shoffs, shinc, m1, m2, *mptr1, *mptr2, *nptr1, *nptr2; int32_t shoffs, shinc, m1, m2;
intptr_t *mptr1, *mptr2, *nptr1, *nptr2,j;
walltype *wal; walltype *wal;
sectortype *sec; sectortype *sec;
@ -2213,7 +2215,7 @@ static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
//Avoid visibility overflow by crossing horizon //Avoid visibility overflow by crossing horizon
if (globalzd > 0) m1 += (globalzd>>16); else m1 -= (globalzd>>16); if (globalzd > 0) m1 += (globalzd>>16); else m1 -= (globalzd>>16);
m2 = m1+l; m2 = m1+l;
mptr1 = (int32_t *)&slopalookup[y1+(shoffs>>15)]; mptr2 = mptr1+1; mptr1 = (intptr_t *)&slopalookup[y1+(shoffs>>15)]; mptr2 = mptr1+1;
for (x=dax1; x<=dax2; x++) for (x=dax1; x<=dax2; x++)
{ {
@ -2221,8 +2223,8 @@ static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
else { y1 = max(umost[x],dplc[x]); y2 = dmost[x]-1; } else { y1 = max(umost[x],dplc[x]); y2 = dmost[x]-1; }
if (y1 <= y2) if (y1 <= y2)
{ {
nptr1 = (int32_t *)&slopalookup[y1+(shoffs>>15)]; nptr1 = (intptr_t *)&slopalookup[y1+(shoffs>>15)];
nptr2 = (int32_t *)&slopalookup[y2+(shoffs>>15)]; nptr2 = (intptr_t *)&slopalookup[y2+(shoffs>>15)];
while (nptr1 <= mptr1) while (nptr1 <= mptr1)
{ {
*mptr1-- = j + (getpalookup((int32_t)mulscale24(krecipasm(m1),globvis),globalshade)<<8); *mptr1-- = j + (getpalookup((int32_t)mulscale24(krecipasm(m1),globvis),globalshade)<<8);