21 #ifndef DRAGONS_SCREEN_H 22 #define DRAGONS_SCREEN_H 24 #include "graphics/surface.h" 25 #include "graphics/pixelformat.h" 26 #include "common/scummsys.h" 27 #include "common/rect.h" 30 #define DRAGONS_NUM_PALETTES 5 31 #define DRAGONS_ENGINE_SPRITE_100_PERCENT_SCALE 256 33 #define DRAGONS_SCREEN_WIDTH 320 34 #define DRAGONS_SCREEN_HEIGHT 200 36 #define DRAGONS_NUM_FLAT_QUADS 0xf 38 #ifdef SCUMM_BIG_ENDIAN 39 #define WRITE_SCREEN WRITE_BE_UINT16 40 #define READ_SCREEN READ_BE_INT16 42 #define WRITE_SCREEN WRITE_LE_UINT16 43 #define READ_SCREEN READ_LE_INT16 71 byte _palettes[DRAGONS_NUM_PALETTES][512];
73 FlatQuad _flatQuads[DRAGONS_NUM_FLAT_QUADS];
80 void copyRectToSurface(
const Graphics::Surface &srcSurface,
int destX,
int destY);
81 void copyRectToSurface(
const Graphics::Surface &srcSurface,
int destX,
int destY,
Common::Rect srcRect,
bool flipX =
false, AlphaBlendMode alpha = NONE);
82 void copyRectToSurface8bpp(
const Graphics::Surface &srcSurface,
const byte *palette,
int destX,
int destY,
Common::Rect srcRect,
bool flipX =
false, AlphaBlendMode alpha = NONE, uint16
scale = DRAGONS_ENGINE_SPRITE_100_PERCENT_SCALE);
83 void copyRectToSurface8bppWrappedX(
const Graphics::Surface &srcSurface,
const byte *palette,
Common::Rect srcRect, AlphaBlendMode alpha = NONE);
85 void loadPalette(uint16 paletteNum,
const byte *palette);
86 byte *getPalette(uint16 paletteNum);
87 void setPaletteRecord(uint16 paletteNum, uint16 offset, uint16 newValue);
88 void updatePaletteTransparency(uint16 paletteNum, uint16 startOffset, uint16 endOffset,
bool isTransparent);
95 void setScreenShakeOffset(int16 x, int16 y);
97 void copyRectToSurface8bppWrappedY(
const Graphics::Surface &srcSurface,
const byte *palette,
int yOffset);
99 int16 addFlatQuad(int16 x0, int16 y0, int16 x1, int16 y1, int16 x3, int16 y3, int16 x2, int16 y2, uint16 colour, int16 priorityLayer, uint16 flags);
100 void drawFlatQuads(uint16 priorityLayer);
101 FlatQuad *getFlatQuad(uint16 quadId);
102 void clearAllFlatQuads();
105 void copyRectToSurface(
const void *buffer,
int srcPitch,
int srcWidth,
int srcXOffset,
int destX,
int destY,
int width,
int height,
bool flipX, AlphaBlendMode alpha);
106 void copyRectToSurface8bpp(
const void *buffer,
const byte* palette,
int srcPitch,
int srcWidth,
int srcXOffset,
int destX,
int destY,
int width,
int height,
bool flipX, AlphaBlendMode alpha);
107 void drawScaledSprite(
Graphics::Surface *destSurface,
const byte *source,
int sourceWidth,
int sourceHeight,
int destX,
int destY,
int destWidth,
int destHeight,
const byte *palette,
bool flipX, AlphaBlendMode alpha);
112 #endif //DRAGONS_SCREEN_H
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)