From fb3e12faf1776490d1d580dfd6cffacf50288899 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sun, 1 Dec 2002 21:33:23 +0000 Subject: [PATCH] Changed Uint32 to DWORD to avoid SDL namespace collisions git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@284 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/planets/pl_stuff.c | 2 +- sc2/src/sc2code/planets/planets.h | 3 +-- sc2/src/sc2code/planets/plangen.c | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/sc2/src/sc2code/planets/pl_stuff.c b/sc2/src/sc2code/planets/pl_stuff.c index ee3990038..e06336690 100644 --- a/sc2/src/sc2code/planets/pl_stuff.c +++ b/sc2/src/sc2code/planets/pl_stuff.c @@ -807,7 +807,7 @@ DrawPlanet (int x, int y, int dy, unsigned int rgb) else tint_ccb[i].ccb_YPos = my << 16; tint_ccb[i].ccb_XPos = x << 16; - *((Uint32 *)tint_ccb[i].ccb_SourcePtr) = rgb | (rgb << 16) | 0x80008000; + *((DWORD *)tint_ccb[i].ccb_SourcePtr) = rgb | (rgb << 16) | 0x80008000; add_cel (&tint_ccb[i]); } } diff --git a/sc2/src/sc2code/planets/planets.h b/sc2/src/sc2code/planets/planets.h index 61ca16e17..eb5a9f246 100644 --- a/sc2/src/sc2code/planets/planets.h +++ b/sc2/src/sc2code/planets/planets.h @@ -20,7 +20,6 @@ #define _PLANETS_H #define END_INTERPLANETARY START_INTERPLANETARY -typedef unsigned int Uint32; enum { @@ -168,7 +167,7 @@ typedef struct solarsys_state FRAME ScaleFrame[2]; FRAME ShieldFrame; BYTE *isPFADefined; - Uint32 **lpTopoMap; + DWORD **lpTopoMap; } SOLARSYS_STATE; typedef SOLARSYS_STATE *PSOLARSYS_STATE; diff --git a/sc2/src/sc2code/planets/plangen.c b/sc2/src/sc2code/planets/plangen.c index 3b83c563d..61e744548 100644 --- a/sc2/src/sc2code/planets/plangen.c +++ b/sc2/src/sc2code/planets/plangen.c @@ -34,13 +34,13 @@ void RepairBackRect (PRECT pRect); int RotatePlanet (int x, int angle, int dx, int dy,int zoom); -Uint32 frame_mapRGBA (FRAME FramePtr,UBYTE r, UBYTE g, UBYTE b, UBYTE a); +DWORD frame_mapRGBA (FRAME FramePtr,UBYTE r, UBYTE g, UBYTE b, UBYTE a); -void process_rgb_bmp (FRAME FramePtr, Uint32 **rgba, int maxx, int maxy); +void process_rgb_bmp (FRAME FramePtr, DWORD **rgba, int maxx, int maxy); FRAME stretch_frame (FRAME FramePtr, int neww, int newh,int destroy); -Uint32 **getpixelarray(FRAME FramePtr,int width, int height); +DWORD **getpixelarray(FRAME FramePtr,int width, int height); #define NUM_BATCH_POINTS 64 #define USE_3D_PLANET 1 @@ -63,7 +63,7 @@ Uint32 **getpixelarray(FRAME FramePtr,int width, int height); #define M_DEG2RAD (M_TWOPI / 360.0) #endif -Uint32 phong[DIAMETER][DIAMETER]; +DWORD phong[DIAMETER][DIAMETER]; POINT map_rotate[DIAMETER][DIAMETER]; void @@ -215,7 +215,7 @@ RenderPhongMask (POINT loc) for (pt.x = 0; pt.x <= TWORADIUS; ++pt.x) { int x,y,rad; - Uint32 stepint; + DWORD stepint; double lrad2; double intens; x=pt.x-RADIUS; @@ -230,7 +230,7 @@ RenderPhongMask (POINT loc) intens=1*cos((3.1416/2)*(double)lrad2/(double)lmag2); if(intensPlanetFrameArray[offset]; pixels=pSolarSysState->lpTopoMap; for (pt.y = 0, y=-RADIUS; pt.y <= TWORADIUS; ++pt.y,++y) { - rgba[pt.y]=malloc(sizeof(Uint32)*(DIAMETER)); + rgba[pt.y]=malloc(sizeof(DWORD)*(DIAMETER)); for (pt.x = 0, x=-RADIUS; pt.x <= TWORADIUS; ++pt.x,++x) { int c1,c2,c3;