diff --git a/src/miscc.c b/src/miscc.c
index 4f5a302458bda126792daa857a8fb9fb14917e0e..3479689db3e6481c86bb0469a6748147162b019e 100644 (file)
--- a/src/miscc.c
+++ b/src/miscc.c
void Z_splash(obj_t *p,int n) {
Z_sound(bulsnd[0],128);
DOT_water(p->x,p->y-p->h/2,p->xv+p->vx,p->yv+p->vy,n,
- (int)walp[wfront]-1);
+ (intptr_t)walp[wfront]-1);
}
void Z_calc_time(dword t,word *h,word *m,word *s)
#define SWAP_VAR(a, b) do { unsigned char t = a; a = b; b = t; } while(0)
-uint16_t short2swap (uint16_t x) {
+int16_t short2swap (int16_t x) {
union {
uint8_t a[2];
- uint16_t x;
+ int16_t x;
} y;
y.x = x;
SWAP_VAR(y.a[0], y.a[1]);
return y.x;
}
-uint32_t int2swap (uint32_t x) {
+int32_t int2swap (int32_t x) {
union {
uint8_t a[4];
- uint32_t x;
+ int32_t x;
} y;
y.x = x;
SWAP_VAR(y.a[0], y.a[3]);
#undef SWAP_VAR
-uint16_t short2host (uint16_t x) {
+int16_t short2host (int16_t x) {
#if __BIG_ENDIAN__
return short2swap(x);
#else
#endif
}
-uint32_t int2host (uint32_t x) {
+int32_t int2host (int32_t x) {
#if __BIG_ENDIAN__
return int2swap(x);
#else
return x;
#endif
-}
\ No newline at end of file
+}