mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
msvc compile fix
git-svn-id: https://svn.eduke32.com/eduke32@1705 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ed17c7af80
commit
a7c95286c2
3 changed files with 28 additions and 9 deletions
|
@ -77,7 +77,6 @@
|
||||||
# endif
|
# endif
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <stdint.h>
|
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
@ -95,6 +94,20 @@
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# define inline __inline
|
# define inline __inline
|
||||||
# define longlong(x) x##i64
|
# define longlong(x) x##i64
|
||||||
|
static inline float nearbyintf(float x)
|
||||||
|
{
|
||||||
|
uint32_t w1, w2;
|
||||||
|
__asm fnstcw w1
|
||||||
|
w2 = w1 | 0x00000020;
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
fldcw w2
|
||||||
|
fld x
|
||||||
|
frndint
|
||||||
|
fclex
|
||||||
|
fldcw w1
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
# define longlong(x) x##ll
|
# define longlong(x) x##ll
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3622,15 +3622,21 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i
|
||||||
y2=min(y2, ydim-1);
|
y2=min(y2, ydim-1);
|
||||||
|
|
||||||
// box
|
// box
|
||||||
plotlines2d((int32_t[]){x1, x1, x2, x2, x1},
|
|
||||||
(int32_t[]){y1, y2, y2, y1, y1}, 5, iTile==iSelected ? whitecol : markedcol);
|
{
|
||||||
|
int32_t xx[] = {x1, x1, x2, x2, x1};
|
||||||
|
int32_t yy[] = {y1, y2, y2, y1, y1};
|
||||||
|
plotlines2d(xx, yy, 5, iTile==iSelected ? whitecol : markedcol);
|
||||||
|
}
|
||||||
// cross
|
// cross
|
||||||
if (marked)
|
if (marked)
|
||||||
{
|
{
|
||||||
plotlines2d((int32_t[]){x1, x2},
|
int32_t xx[] = {x1, x2};
|
||||||
(int32_t[]){y1, y2}, 2, markedcol);
|
int32_t yy[] = {y1, y2};
|
||||||
plotlines2d((int32_t[]){x1, x2},
|
|
||||||
(int32_t[]){y2, y1}, 2, markedcol);
|
plotlines2d(xx, yy, 2, markedcol);
|
||||||
|
swaplong(&yy[0], &yy[1]);
|
||||||
|
plotlines2d(xx, yy, 2, markedcol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,11 +262,11 @@ int32_t __fastcall Gv_GetVarN(register int32_t id) // 'N' for "no side-effects"
|
||||||
|
|
||||||
int32_t __fastcall Gv_GetVarX(register int32_t id)
|
int32_t __fastcall Gv_GetVarX(register int32_t id)
|
||||||
{
|
{
|
||||||
|
register int32_t negateResult = !!(id&M32_FLAG_NEGATE);
|
||||||
|
|
||||||
if (id == M32_THISACTOR_VAR_ID)
|
if (id == M32_THISACTOR_VAR_ID)
|
||||||
return vm.g_i;
|
return vm.g_i;
|
||||||
|
|
||||||
register int32_t negateResult = !!(id&M32_FLAG_NEGATE);
|
|
||||||
|
|
||||||
if ((id & M32_BITS_MASK) == M32_FLAG_CONSTANT)
|
if ((id & M32_BITS_MASK) == M32_FLAG_CONSTANT)
|
||||||
{
|
{
|
||||||
switch (id&3)
|
switch (id&3)
|
||||||
|
|
Loading…
Reference in a new issue