22 #ifndef HOPKINS_GRAPHICS_H 23 #define HOPKINS_GRAPHICS_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/endian.h" 28 #include "common/path.h" 29 #include "common/rect.h" 30 #include "graphics/surface.h" 34 #define DIRTY_RECTS_SIZE 250 35 #define PALETTE_SIZE 256 36 #define PALETTE_BLOCK_SIZE (PALETTE_SIZE * 3) 37 #define PALETTE_EXT_BLOCK_SIZE 800 38 static const byte kSetOffset = 251;
39 static const byte kByteStop = 252;
40 static const byte k8bVal = 253;
41 static const byte k16bVal = 254;
61 int _posXClipped, _posYClipped;
65 int _enlargedX, _enlargedY;
66 bool _enlargedXFl, _enlargedYFl;
68 int _reduceX, _reducedY;
74 void loadPCX640(byte *surface,
const Common::Path &file, byte *palette,
bool typeFlag);
75 void loadPCX320(byte *surface,
const Common::Path &file, byte *palette);
76 void fadeIn(
const byte *palette,
int step,
const byte *surface);
77 void fadeOut(
const byte *palette,
int step,
const byte *surface);
78 void changePalette(
const byte *palette);
79 uint16 mapRGB(byte r, byte g, byte b);
80 void copy16bFromSurfaceScaleX2(
const byte *surface);
82 void translateSurface(byte *destP,
const byte *srcP,
int count,
int minThreshold,
int maxThreshold);
83 void displayScaled8BitRect(
const byte *surface,
int xp,
int yp,
int width,
int height,
int destX,
int destY);
88 byte _paletteBuffer[PALETTE_SIZE * 2];
89 byte _colorTable[PALETTE_EXT_BLOCK_SIZE];
90 byte _palette[PALETTE_EXT_BLOCK_SIZE];
91 byte _oldPalette[PALETTE_EXT_BLOCK_SIZE];
99 bool _skipVideoLockFl;
109 int _fadeDefaultSpeed;
119 bool _showDirtyRects;
123 byte *_palettePixels;
130 void clearVesaScreen();
131 void resetDirtyRects();
132 void resetRefreshRects();
133 void addDirtyRect(
int x1,
int y1,
int x2,
int y2);
135 void addRefreshRect(
int x1,
int y1,
int x2,
int y2);
137 void displayDirtyRects();
138 void displayRefreshRects();
142 void copySurface(
const byte *surface,
int x1,
int y1,
int width,
int height, byte *destSurface,
int destX,
int destY);
146 void fadeInBreakout();
147 void fadeInDefaultLength(
const byte *surface);
149 void fadeOutDefaultLength(
const byte *surface);
150 void fadeOutBreakout();
153 void copyWinscanVbe3(
const byte *srcData, byte *destSurface);
154 void copyWinscanVbe(
const byte *srcP, byte *destP);
155 void copyVideoVbe16(
const byte *srcData);
156 void copyVideoVbe16a(
const byte *srcData);
157 void copySurfaceRect(
const byte *srcSurface, byte *destSurface,
int xs,
int ys,
int width,
int height);
158 void restoreSurfaceRect(byte *destSurface,
const byte *src,
int xp,
int yp,
int width,
int height);
159 void displayFont(byte *surface,
const byte *spriteData,
int xp,
int yp,
int characterIndex,
int color);
160 void drawHorizontalLine(byte *surface,
int xp,
int yp, uint16 width, byte col);
161 void drawVerticalLine(byte *surface,
int xp,
int yp,
int height, byte col);
162 void initColorTable(
int minIndex,
int maxIndex, byte *palette);
163 void setGraphicalMode(
int width,
int height);
164 void setPaletteVGA256(
const byte *palette);
165 void setPaletteVGA256WithRefresh(
const byte *palette,
const byte *surface);
166 void scrollScreen(
int amount);
167 int zoomIn(
int v,
int percentage);
168 int zoomOut(
int v,
int percentage);
169 void initScreen(
const Common::Path &file,
int mode,
bool initializeScreen);
170 void displayAllBob();
171 void endDisplayBob();
173 void reduceScreenPart(
const byte *srcSruface, byte *destSurface,
int xp,
int yp,
int width,
int height,
int zoom);
174 void setScreenWidth(
int pitch);
176 void setColorPercentage(
int palIndex,
int r,
int g,
int b);
177 void setColorPercentage2(
int palIndex,
int r,
int g,
int b);
178 void fastDisplay(
const byte *spriteData,
int xp,
int yp,
int spriteIndex,
bool addSegment =
true);
179 void fastDisplay2(
const byte *objectData,
int xp,
int yp,
int idx,
bool addSegment =
true);
180 void drawCompressedSprite(byte *surface,
const byte *srcData,
int xp300,
int yp300,
int frameIndex,
int zoom1,
int zoom2,
bool flipFl);
181 void copyRect(
const byte *srcSurface,
int x1,
int y1, uint16 width,
int height, byte *destSurface,
int destX,
int destY);
182 void drawVesaSprite(byte *surface,
const byte *spriteData,
int xp,
int yp,
int spriteIndex);
183 void display8BitRect(
const byte *surface,
int xs,
int ys,
int width,
int height,
int destX,
int destY);
184 void fillSurface(byte *surface, byte *col,
int size);
185 void displayScreen(
bool initPalette);
187 void restoreScreen();
int16 right
Definition: rect.h:146
Definition: graphics.h:43
Definition: graphics.h:51
int16 left
Definition: rect.h:145
Common::Array< Common::Rect > _dirtyRects
Definition: graphics.h:117