X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fmiscc.c;h=3479689db3e6481c86bb0469a6748147162b019e;hb=d4b977521ea85ba1d4a7e876aa73d072945c287d;hp=4f5a302458bda126792daa857a8fb9fb14917e0e;hpb=da79be9b6a4134aa9cd19e6f5909fedb20d318cb;p=flatwaifu.git diff --git a/src/miscc.c b/src/miscc.c index 4f5a302..3479689 100644 --- a/src/miscc.c +++ b/src/miscc.c @@ -597,7 +597,7 @@ int Z_moveobj(obj_t *p) { 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) @@ -615,20 +615,20 @@ 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]); @@ -638,7 +638,7 @@ uint32_t int2swap (uint32_t x) { #undef SWAP_VAR -uint16_t short2host (uint16_t x) { +int16_t short2host (int16_t x) { #if __BIG_ENDIAN__ return short2swap(x); #else @@ -646,10 +646,10 @@ uint16_t short2host (uint16_t x) { #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 +}