From: Holger Schemel Date: Mon, 4 Dec 2000 23:07:16 +0000 (+0100) Subject: rnd-20001205-1-src X-Git-Tag: 2.0.0^2~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1100054eec7c45458359fd56072341bd661f4a9c;p=rocksndiamonds.git rnd-20001205-1-src --- diff --git a/src/cartoons.c b/src/cartoons.c index 2ef229f1..164fcf22 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -18,7 +18,7 @@ static void HandleAnimation(int); static boolean AnimateToon(int, boolean); -static void DrawAnim(Bitmap, GC, int, int, int, int, int, int, int, int); +static void DrawAnim(Bitmap *, GC, int, int, int, int, int, int, int, int); struct AnimInfo { @@ -397,7 +397,7 @@ boolean AnimateToon(int toon_nr, boolean restart) }; struct AnimInfo *anim = &toon[toon_nr]; int anim_bitmap_nr = (toon_nr < 6 ? PIX_TOONS : PIX_HEROES); - Bitmap anim_bitmap = pix[anim_bitmap_nr]; + Bitmap *anim_bitmap = pix[anim_bitmap_nr]; GC anim_clip_gc = pix[anim_bitmap_nr]->stored_clip_gc; if (restart) @@ -530,7 +530,7 @@ boolean AnimateToon(int toon_nr, boolean restart) return(FALSE); } -void DrawAnim(Bitmap toon_bitmap, GC toon_clip_gc, +void DrawAnim(Bitmap *toon_bitmap, GC toon_clip_gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y, int pad_x, int pad_y) { diff --git a/src/editor.c b/src/editor.c index f6bd6181..6003fc91 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1305,7 +1305,7 @@ static void ScrollMiniLevel(int from_x, int from_y, int scroll) static void CreateControlButtons() { - Bitmap gd_bitmap = pix[PIX_DOOR]; + Bitmap *gd_bitmap = pix[PIX_DOOR]; struct GadgetInfo *gi; unsigned long event_mask; int i; @@ -1465,7 +1465,7 @@ static void CreateControlButtons() /* create buttons for element list */ for (i=0; idesign[GD_BUTTON_UNPRESSED].bitmap = va_arg(ap, Bitmap); + gi->design[GD_BUTTON_UNPRESSED].bitmap = va_arg(ap, Bitmap *); gi->design[GD_BUTTON_UNPRESSED].x = va_arg(ap, int); gi->design[GD_BUTTON_UNPRESSED].y = va_arg(ap, int); break; case GDI_DESIGN_PRESSED: - gi->design[GD_BUTTON_PRESSED].bitmap = va_arg(ap, Bitmap); + gi->design[GD_BUTTON_PRESSED].bitmap = va_arg(ap, Bitmap *); gi->design[GD_BUTTON_PRESSED].x = va_arg(ap, int); gi->design[GD_BUTTON_PRESSED].y = va_arg(ap, int); break; case GDI_ALT_DESIGN_UNPRESSED: - gi->alt_design[GD_BUTTON_UNPRESSED].bitmap= va_arg(ap, Bitmap); + gi->alt_design[GD_BUTTON_UNPRESSED].bitmap= va_arg(ap, Bitmap *); gi->alt_design[GD_BUTTON_UNPRESSED].x = va_arg(ap, int); gi->alt_design[GD_BUTTON_UNPRESSED].y = va_arg(ap, int); break; case GDI_ALT_DESIGN_PRESSED: - gi->alt_design[GD_BUTTON_PRESSED].bitmap = va_arg(ap, Bitmap); + gi->alt_design[GD_BUTTON_PRESSED].bitmap = va_arg(ap, Bitmap *); gi->alt_design[GD_BUTTON_PRESSED].x = va_arg(ap, int); gi->alt_design[GD_BUTTON_PRESSED].y = va_arg(ap, int); break; @@ -400,7 +400,7 @@ static void HandleGadgetTags(struct GadgetInfo *gi, int first_tag, va_list ap) break; case GDI_DECORATION_DESIGN: - gi->deco.design.bitmap = va_arg(ap, Bitmap); + gi->deco.design.bitmap = va_arg(ap, Bitmap *); gi->deco.design.x = va_arg(ap, int); gi->deco.design.y = va_arg(ap, int); break; diff --git a/src/libgame/gadgets.h b/src/libgame/gadgets.h index eae5e490..faa7c9d4 100644 --- a/src/libgame/gadgets.h +++ b/src/libgame/gadgets.h @@ -103,7 +103,7 @@ struct GadgetBorder struct GadgetDesign { - Bitmap bitmap; /* Bitmap with gadget surface */ + Bitmap *bitmap; /* Bitmap with gadget surface */ int x, y; /* position of rectangle in Bitmap */ }; diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 97f8503f..8f6fdee5 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -34,7 +34,7 @@ inline void SDLInitVideoDisplay(void) atexit(SDL_Quit); } -inline void SDLInitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, +inline void SDLInitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window, boolean fullscreen) { /* open SDL video output device (window or fullscreen mode) */ @@ -61,7 +61,7 @@ inline void SDLInitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, *window = CreateBitmap(video.width, video.height, video.depth); } -inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) +inline boolean SDLSetVideoMode(DrawBuffer **backbuffer, boolean fullscreen) { boolean success = TRUE; int surface_flags = SDL_HWSURFACE | (fullscreen ? SDL_FULLSCREEN : 0); @@ -69,8 +69,8 @@ inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) if (fullscreen && !video.fullscreen_enabled && video.fullscreen_available) { /* switch display to fullscreen mode, if available */ - DrawWindow window_old = *backbuffer; - DrawWindow window_new = CreateBitmapStruct(); + DrawWindow *window_old = *backbuffer; + DrawWindow *window_new = CreateBitmapStruct(); if ((window_new->surface = SDL_SetVideoMode(video.width, video.height, video.depth, surface_flags)) @@ -97,8 +97,8 @@ inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) if ((!fullscreen && video.fullscreen_enabled) || !*backbuffer) { /* switch display to window mode */ - DrawWindow window_old = *backbuffer; - DrawWindow window_new = CreateBitmapStruct(); + DrawWindow *window_old = *backbuffer; + DrawWindow *window_new = CreateBitmapStruct(); if ((window_new->surface = SDL_SetVideoMode(video.width, video.height, video.depth, surface_flags)) @@ -123,12 +123,12 @@ inline boolean SDLSetVideoMode(DrawBuffer *backbuffer, boolean fullscreen) return success; } -inline void SDLCopyArea(Bitmap src_bitmap, Bitmap dst_bitmap, +inline void SDLCopyArea(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y, int copy_mode) { - Bitmap real_dst_bitmap = (dst_bitmap == window ? backbuffer : dst_bitmap); + Bitmap *real_dst_bitmap = (dst_bitmap == window ? backbuffer : dst_bitmap); SDL_Rect src_rect, dst_rect; src_rect.x = src_x; @@ -150,10 +150,10 @@ inline void SDLCopyArea(Bitmap src_bitmap, Bitmap dst_bitmap, SDL_UpdateRect(backbuffer->surface, dst_x, dst_y, width, height); } -inline void SDLFillRectangle(Bitmap dst_bitmap, int x, int y, +inline void SDLFillRectangle(Bitmap *dst_bitmap, int x, int y, int width, int height, unsigned int color) { - Bitmap real_dst_bitmap = (dst_bitmap == window ? backbuffer : dst_bitmap); + Bitmap *real_dst_bitmap = (dst_bitmap == window ? backbuffer : dst_bitmap); SDL_Rect rect; unsigned int color_r = (color >> 16) && 0xff; unsigned int color_g = (color >> 8) && 0xff; diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index a8ae4536..8f36722b 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -34,9 +34,9 @@ /* SDL type definitions */ -typedef struct SDLSurfaceInfo *Bitmap; -typedef struct SDLSurfaceInfo *DrawBuffer; -typedef struct SDLSurfaceInfo *DrawWindow; +typedef struct SDLSurfaceInfo Bitmap; +typedef struct SDLSurfaceInfo DrawBuffer; +typedef struct SDLSurfaceInfo DrawWindow; typedef Uint32 Pixel; typedef SDLKey Key; @@ -315,10 +315,10 @@ struct XY /* SDL function definitions */ inline void SDLInitVideoDisplay(void); -inline void SDLInitVideoBuffer(DrawBuffer *, DrawWindow *, boolean); -inline boolean SDLSetVideoMode(DrawBuffer *, boolean); -inline void SDLCopyArea(Bitmap, Bitmap, int, int, int, int, int, int, int); -inline void SDLFillRectangle(Bitmap, int, int, int, int, unsigned int); +inline void SDLInitVideoBuffer(DrawBuffer **, DrawWindow **, boolean); +inline boolean SDLSetVideoMode(DrawBuffer **, boolean); +inline void SDLCopyArea(Bitmap *, Bitmap *, int, int, int, int, int, int, int); +inline void SDLFillRectangle(Bitmap *, int, int, int, int, unsigned int); inline void SDLDrawSimpleLine(SDL_Surface *, int, int, int, int, unsigned int); inline void SDLDrawLine(SDL_Surface *, int, int, int, int, Uint32); /* functions from SGE library */ diff --git a/src/libgame/system.c b/src/libgame/system.c index bc7d5a13..b2909afd 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -42,9 +42,9 @@ Visual *visual = NULL; int screen = 0; Colormap cmap = None; -DrawWindow window = NULL; -DrawBuffer backbuffer = NULL; -DrawBuffer drawto = NULL; +DrawWindow *window = NULL; +DrawBuffer *backbuffer = NULL; +DrawBuffer *drawto = NULL; int button_status = MB_NOT_PRESSED; boolean motion_status = FALSE; @@ -159,7 +159,7 @@ inline void InitVideoDisplay(void) #endif } -inline void InitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, +inline void InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window, int width, int height, int depth, boolean fullscreen) { @@ -176,7 +176,7 @@ inline void InitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window, #endif } -inline Bitmap CreateBitmapStruct(void) +inline Bitmap *CreateBitmapStruct(void) { #ifdef TARGET_SDL return checked_calloc(sizeof(struct SDLSurfaceInfo)); @@ -185,9 +185,9 @@ inline Bitmap CreateBitmapStruct(void) #endif } -inline Bitmap CreateBitmap(int width, int height, int depth) +inline Bitmap *CreateBitmap(int width, int height, int depth) { - Bitmap new_bitmap = CreateBitmapStruct(); + Bitmap *new_bitmap = CreateBitmapStruct(); int real_depth = GetRealDepth(depth); #ifdef TARGET_SDL @@ -226,7 +226,7 @@ inline Bitmap CreateBitmap(int width, int height, int depth) return new_bitmap; } -inline void FreeBitmap(Bitmap bitmap) +inline void FreeBitmap(Bitmap *bitmap) { if (bitmap == NULL) return; @@ -248,7 +248,7 @@ inline void FreeBitmap(Bitmap bitmap) free(bitmap); } -inline void CloseWindow(DrawWindow window) +inline void CloseWindow(DrawWindow *window) { #ifdef TARGET_X11 if (window->drawable) @@ -261,7 +261,7 @@ inline void CloseWindow(DrawWindow window) #endif } -inline void BlitBitmap(Bitmap src_bitmap, Bitmap dst_bitmap, +inline void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y) @@ -275,7 +275,7 @@ inline void BlitBitmap(Bitmap src_bitmap, Bitmap dst_bitmap, #endif } -inline void ClearRectangle(Bitmap bitmap, int x, int y, int width, int height) +inline void ClearRectangle(Bitmap *bitmap, int x, int y, int width, int height) { #ifdef TARGET_SDL SDLFillRectangle(bitmap, x, y, width, height, 0x000000); @@ -290,7 +290,7 @@ static GC last_clip_gc = 0; /* needed for XCopyArea() through clip mask */ #endif #endif -inline void SetClipMask(Bitmap bitmap, GC clip_gc, Pixmap clip_pixmap) +inline void SetClipMask(Bitmap *bitmap, GC clip_gc, Pixmap clip_pixmap) { #ifdef TARGET_X11 if (clip_gc) @@ -304,7 +304,7 @@ inline void SetClipMask(Bitmap bitmap, GC clip_gc, Pixmap clip_pixmap) #endif } -inline void SetClipOrigin(Bitmap bitmap, GC clip_gc, int clip_x, int clip_y) +inline void SetClipOrigin(Bitmap *bitmap, GC clip_gc, int clip_x, int clip_y) { #ifdef TARGET_X11 if (clip_gc) @@ -318,7 +318,7 @@ inline void SetClipOrigin(Bitmap bitmap, GC clip_gc, int clip_x, int clip_y) #endif } -inline void BlitBitmapMasked(Bitmap src_bitmap, Bitmap dst_bitmap, +inline void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y) @@ -332,7 +332,7 @@ inline void BlitBitmapMasked(Bitmap src_bitmap, Bitmap dst_bitmap, #endif } -inline void DrawSimpleWhiteLine(Bitmap bitmap, int from_x, int from_y, +inline void DrawSimpleWhiteLine(Bitmap *bitmap, int from_x, int from_y, int to_x, int to_y) { #ifdef TARGET_SDL @@ -345,7 +345,7 @@ inline void DrawSimpleWhiteLine(Bitmap bitmap, int from_x, int from_y, } #if !defined(TARGET_X11_NATIVE) -inline void DrawLine(Bitmap bitmap, int from_x, int from_y, +inline void DrawLine(Bitmap *bitmap, int from_x, int from_y, int to_x, int to_y, Pixel pixel, int line_width) { int x, y; @@ -375,7 +375,7 @@ inline void DrawLine(Bitmap bitmap, int from_x, int from_y, } #endif -inline void DrawLines(Bitmap bitmap, struct XY *points, int num_points, +inline void DrawLines(Bitmap *bitmap, struct XY *points, int num_points, Pixel pixel) { #if !defined(TARGET_X11_NATIVE) @@ -399,7 +399,7 @@ inline void DrawLines(Bitmap bitmap, struct XY *points, int num_points, #endif } -inline Pixel GetPixelFromRGB(Bitmap bitmap, unsigned int color_r, +inline Pixel GetPixelFromRGB(Bitmap *bitmap, unsigned int color_r, unsigned int color_g, unsigned int color_b) { Pixel pixel; @@ -420,7 +420,7 @@ inline Pixel GetPixelFromRGB(Bitmap bitmap, unsigned int color_r, return pixel; } -inline Pixel GetPixelFromRGBcompact(Bitmap bitmap, unsigned int color) +inline Pixel GetPixelFromRGBcompact(Bitmap *bitmap, unsigned int color) { unsigned int color_r = (color >> 16) & 0xff; unsigned int color_g = (color >> 8) & 0xff; @@ -466,7 +466,7 @@ inline void KeyboardAutoRepeatOff(void) #endif } -inline boolean PointerInWindow(DrawWindow window) +inline boolean PointerInWindow(DrawWindow *window) { #ifdef TARGET_SDL return TRUE; diff --git a/src/libgame/system.h b/src/libgame/system.h index 715b5185..81153193 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -237,9 +237,9 @@ extern Visual *visual; extern int screen; extern Colormap cmap; -extern DrawWindow window; -extern DrawBuffer backbuffer; -extern DrawBuffer drawto; +extern DrawWindow *window; +extern DrawBuffer *backbuffer; +extern DrawBuffer *drawto; extern int button_status; extern boolean motion_status; @@ -264,25 +264,25 @@ void InitGfxDoor2Info(int, int, int, int); void InitGfxScrollbufferInfo(int, int); inline void InitVideoDisplay(void); -inline void InitVideoBuffer(DrawBuffer *,DrawWindow *, int, int, int, boolean); -inline Bitmap CreateBitmapStruct(void); -inline Bitmap CreateBitmap(int, int, int); -inline void FreeBitmap(Bitmap); -inline void BlitBitmap(Bitmap, Bitmap, int, int, int, int, int, int); -inline void ClearRectangle(Bitmap, int, int, int, int); -inline void SetClipMask(Bitmap, GC, Pixmap); -inline void SetClipOrigin(Bitmap, GC, int, int); -inline void BlitBitmapMasked(Bitmap, Bitmap, int, int, int, int, int, int); -inline void DrawSimpleWhiteLine(Bitmap, int, int, int, int); -inline void DrawLines(Bitmap, struct XY *, int, Pixel); -inline Pixel GetPixelFromRGB(Bitmap, unsigned int, unsigned int, unsigned int); -inline Pixel GetPixelFromRGBcompact(Bitmap, unsigned int); +inline void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean); +inline Bitmap *CreateBitmapStruct(void); +inline Bitmap *CreateBitmap(int, int, int); +inline void FreeBitmap(Bitmap *); +inline void BlitBitmap(Bitmap *, Bitmap *, int, int, int, int, int, int); +inline void ClearRectangle(Bitmap *, int, int, int, int); +inline void SetClipMask(Bitmap *, GC, Pixmap); +inline void SetClipOrigin(Bitmap *, GC, int, int); +inline void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); +inline void DrawSimpleWhiteLine(Bitmap *, int, int, int, int); +inline void DrawLines(Bitmap *, struct XY *, int, Pixel); +inline Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int); +inline Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int); inline void FlushDisplay(void); inline void SyncDisplay(void); inline void KeyboardAutoRepeatOn(void); inline void KeyboardAutoRepeatOff(void); -inline boolean PointerInWindow(DrawWindow); +inline boolean PointerInWindow(DrawWindow *); inline boolean SetVideoMode(boolean); inline boolean ChangeVideoModeIfNeeded(boolean); diff --git a/src/libgame/text.c b/src/libgame/text.c index 4e365c60..b0483501 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -28,8 +28,8 @@ struct FontInfo font; /* font functions */ /* ========================================================================= */ -void InitFontInfo(Bitmap bitmap_big, Bitmap bitmap_medium, - Bitmap bitmap_small) +void InitFontInfo(Bitmap *bitmap_big, Bitmap *bitmap_medium, + Bitmap *bitmap_small) { font.bitmap_big = bitmap_big; font.bitmap_medium = bitmap_medium; @@ -103,10 +103,10 @@ void DrawText(int x, int y, char *text, int font_size, int font_type) redraw_mask |= REDRAW_DOOR_1; } -void DrawTextExt(DrawBuffer bitmap, int x, int y, +void DrawTextExt(DrawBuffer *bitmap, int x, int y, char *text, int font_size, int font_type) { - Bitmap font_bitmap; + Bitmap *font_bitmap; int font_width, font_height, font_start; boolean print_inverse = FALSE; diff --git a/src/libgame/text.h b/src/libgame/text.h index a9b69364..c6d3c9f3 100644 --- a/src/libgame/text.h +++ b/src/libgame/text.h @@ -55,17 +55,19 @@ struct FontInfo { - Bitmap bitmap_big, bitmap_medium, bitmap_small; + Bitmap *bitmap_big; + Bitmap *bitmap_medium; + Bitmap *bitmap_small; }; -void InitFontInfo(Bitmap, Bitmap, Bitmap); +void InitFontInfo(Bitmap *, Bitmap *, Bitmap *); int getFontWidth(int, int); int getFontHeight(int, int); void DrawInitText(char *, int, int); void DrawTextF(int, int, int, char *, ...); void DrawTextFCentered(int, int, char *, ...); void DrawText(int, int, char *, int, int); -void DrawTextExt(DrawBuffer, int, int, char *, int, int); +void DrawTextExt(DrawBuffer *, int, int, char *, int, int); #endif /* TEXT_H */ diff --git a/src/libgame/x11.c b/src/libgame/x11.c index 4dfb1431..7d33a623 100644 --- a/src/libgame/x11.c +++ b/src/libgame/x11.c @@ -18,7 +18,7 @@ #if defined(TARGET_X11) static void X11InitDisplay(); -static DrawWindow X11InitWindow(); +static DrawWindow *X11InitWindow(); inline void X11InitVideoDisplay(void) { @@ -29,7 +29,7 @@ inline void X11InitVideoDisplay(void) video.default_depth = XDefaultDepth(display, screen); } -inline void X11InitVideoBuffer(DrawBuffer *backbuffer, DrawWindow *window) +inline void X11InitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window) { *window = X11InitWindow(); @@ -86,9 +86,9 @@ static void X11InitDisplay() #endif /* !PLATFORM_MSDOS */ } -static DrawWindow X11InitWindow() +static DrawWindow *X11InitWindow() { - DrawWindow new_window = CreateBitmapStruct(); + DrawWindow *new_window = CreateBitmapStruct(); unsigned int border_width = 4; XGCValues gc_values; unsigned long gc_valuemask; diff --git a/src/libgame/x11.h b/src/libgame/x11.h index cfc40a69..e0f88e51 100644 --- a/src/libgame/x11.h +++ b/src/libgame/x11.h @@ -39,9 +39,9 @@ /* X11 type definitions */ -typedef struct X11DrawableInfo *Bitmap; -typedef struct X11DrawableInfo *DrawWindow; -typedef struct X11DrawableInfo *DrawBuffer; +typedef struct X11DrawableInfo Bitmap; +typedef struct X11DrawableInfo DrawWindow; +typedef struct X11DrawableInfo DrawBuffer; /* "Pixel" is already defined in X11/Intrinsic.h */ typedef KeySym Key; @@ -287,6 +287,6 @@ struct XY /* X11 function definitions */ inline void X11InitVideoDisplay(void); -inline void X11InitVideoBuffer(DrawBuffer *, DrawWindow *); +inline void X11InitVideoBuffer(DrawBuffer **, DrawWindow **); #endif /* X11_H */ diff --git a/src/main.c b/src/main.c index eeb6b319..a79aa4a6 100644 --- a/src/main.c +++ b/src/main.c @@ -20,9 +20,10 @@ #include "joystick.h" GC tile_clip_gc; -Bitmap pix[NUM_BITMAPS]; +Bitmap *pix[NUM_BITMAPS]; Pixmap tile_clipmask[NUM_TILES]; -DrawBuffer drawto_field, fieldbuffer; +DrawBuffer *fieldbuffer; +DrawBuffer *drawto_field; int joystick_device = 0; char *joystick_device_name[MAX_PLAYERS] = diff --git a/src/main.h b/src/main.h index fdad7a4e..4313bf7e 100644 --- a/src/main.h +++ b/src/main.h @@ -386,9 +386,10 @@ struct GlobalInfo }; extern GC tile_clip_gc; -extern Bitmap pix[]; +extern Bitmap *pix[]; extern Pixmap tile_clipmask[]; -extern DrawBuffer drawto_field, fieldbuffer; +extern DrawBuffer *fieldbuffer; +extern DrawBuffer *drawto_field; extern int joystick_device; extern char *joystick_device_name[]; diff --git a/src/screens.c b/src/screens.c index 35a6729f..40bbdb4c 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2336,7 +2336,7 @@ static struct static void CreateScreenScrollbuttons() { - Bitmap gd_bitmap = pix[PIX_MORE]; + Bitmap *gd_bitmap = pix[PIX_MORE]; struct GadgetInfo *gi; unsigned long event_mask; int i; @@ -2390,7 +2390,7 @@ static void CreateScreenScrollbars() for (i=0; i= GFX_START_ROCKSSCREEN && graphic <= GFX_END_ROCKSSCREEN) { @@ -884,9 +884,9 @@ void getMiniGraphicSource(int graphic, Bitmap *bitmap, int *x, int *y) } } -void DrawMiniGraphicExt(DrawBuffer d, int x, int y, int graphic) +void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic) { - Bitmap bitmap; + Bitmap *bitmap; int src_x, src_y; getMiniGraphicSource(graphic, &bitmap, &src_x, &src_y); @@ -901,7 +901,7 @@ void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic, int src_x, src_y, dest_x, dest_y; int tile = graphic; int bitmap_nr; - Bitmap src_bitmap; + Bitmap *src_bitmap; GC drawing_gc; if (graphic < 0) @@ -2028,7 +2028,7 @@ unsigned int MoveDoor(unsigned int door_state) for(x=start; x<=DXSIZE; x+=stepsize) { - Bitmap bitmap = pix[PIX_DOOR]; + Bitmap *bitmap = pix[PIX_DOOR]; GC gc = bitmap->stored_clip_gc; WaitUntilDelayReached(&door_delay, door_delay_value); @@ -2146,7 +2146,7 @@ void UndrawSpecialEditorDoor() } #ifndef TARGET_SDL -int ReadPixel(DrawBuffer bitmap, int x, int y) +int ReadPixel(DrawBuffer *bitmap, int x, int y) { XImage *pixel_image; unsigned long pixel_value; @@ -2275,8 +2275,8 @@ void CreateToolButtons() for (i=0; i