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/rect.h" 29 #include "graphics/surface.h" 33 #define DIRTY_RECTS_SIZE 250 34 #define PALETTE_SIZE 256 35 #define PALETTE_BLOCK_SIZE (PALETTE_SIZE * 3) 36 #define PALETTE_EXT_BLOCK_SIZE 800 37 static const byte kSetOffset = 251;
38 static const byte kByteStop = 252;
39 static const byte k8bVal = 253;
40 static const byte k16bVal = 254;
60 int _posXClipped, _posYClipped;
64 int _enlargedX, _enlargedY;
65 bool _enlargedXFl, _enlargedYFl;
67 int _reduceX, _reducedY;
73 void loadPCX640(byte *surface,
const Common::Path &file, byte *palette,
bool typeFlag);
74 void loadPCX320(byte *surface,
const Common::Path &file, byte *palette);
75 void fadeIn(
const byte *palette,
int step,
const byte *surface);
76 void fadeOut(
const byte *palette,
int step,
const byte *surface);
77 void changePalette(
const byte *palette);
78 uint16 mapRGB(byte r, byte g, byte b);
79 void copy16bFromSurfaceScaleX2(
const byte *surface);
81 void translateSurface(byte *destP,
const byte *srcP,
int count,
int minThreshold,
int maxThreshold);
82 void displayScaled8BitRect(
const byte *surface,
int xp,
int yp,
int width,
int height,
int destX,
int destY);
87 byte _paletteBuffer[PALETTE_SIZE * 2];
88 byte _colorTable[PALETTE_EXT_BLOCK_SIZE];
89 byte _palette[PALETTE_EXT_BLOCK_SIZE];
90 byte _oldPalette[PALETTE_EXT_BLOCK_SIZE];
98 bool _skipVideoLockFl;
108 int _fadeDefaultSpeed;
118 bool _showDirtyRects;
122 byte *_palettePixels;
129 void clearVesaScreen();
130 void resetDirtyRects();
131 void resetRefreshRects();
132 void addDirtyRect(
int x1,
int y1,
int x2,
int y2);
134 void addRefreshRect(
int x1,
int y1,
int x2,
int y2);
136 void displayDirtyRects();
137 void displayRefreshRects();
141 void copySurface(
const byte *surface,
int x1,
int y1,
int width,
int height, byte *destSurface,
int destX,
int destY);
145 void fadeInBreakout();
146 void fadeInDefaultLength(
const byte *surface);
148 void fadeOutDefaultLength(
const byte *surface);
149 void fadeOutBreakout();
152 void copyWinscanVbe3(
const byte *srcData, byte *destSurface);
153 void copyWinscanVbe(
const byte *srcP, byte *destP);
154 void copyVideoVbe16(
const byte *srcData);
155 void copyVideoVbe16a(
const byte *srcData);
156 void copySurfaceRect(
const byte *srcSurface, byte *destSurface,
int xs,
int ys,
int width,
int height);
157 void restoreSurfaceRect(byte *destSurface,
const byte *src,
int xp,
int yp,
int width,
int height);
158 void displayFont(byte *surface,
const byte *spriteData,
int xp,
int yp,
int characterIndex,
int color);
159 void drawHorizontalLine(byte *surface,
int xp,
int yp, uint16 width, byte col);
160 void drawVerticalLine(byte *surface,
int xp,
int yp,
int height, byte col);
161 void initColorTable(
int minIndex,
int maxIndex, byte *palette);
162 void setGraphicalMode(
int width,
int height);
163 void setPaletteVGA256(
const byte *palette);
164 void setPaletteVGA256WithRefresh(
const byte *palette,
const byte *surface);
165 void scrollScreen(
int amount);
166 int zoomIn(
int v,
int percentage);
167 int zoomOut(
int v,
int percentage);
168 void initScreen(
const Common::Path &file,
int mode,
bool initializeScreen);
169 void displayAllBob();
170 void endDisplayBob();
172 void reduceScreenPart(
const byte *srcSruface, byte *destSurface,
int xp,
int yp,
int width,
int height,
int zoom);
173 void setScreenWidth(
int pitch);
175 void setColorPercentage(
int palIndex,
int r,
int g,
int b);
176 void setColorPercentage2(
int palIndex,
int r,
int g,
int b);
177 void fastDisplay(
const byte *spriteData,
int xp,
int yp,
int spriteIndex,
bool addSegment =
true);
178 void fastDisplay2(
const byte *objectData,
int xp,
int yp,
int idx,
bool addSegment =
true);
179 void drawCompressedSprite(byte *surface,
const byte *srcData,
int xp300,
int yp300,
int frameIndex,
int zoom1,
int zoom2,
bool flipFl);
180 void copyRect(
const byte *srcSurface,
int x1,
int y1, uint16 width,
int height, byte *destSurface,
int destX,
int destY);
181 void drawVesaSprite(byte *surface,
const byte *spriteData,
int xp,
int yp,
int spriteIndex);
182 void display8BitRect(
const byte *surface,
int xs,
int ys,
int width,
int height,
int destX,
int destY);
183 void fillSurface(byte *surface, byte *col,
int size);
184 void displayScreen(
bool initPalette);
186 void restoreScreen();
int16 right
Definition: rect.h:146
Definition: graphics.h:42
Definition: graphics.h:50
int16 left
Definition: rect.h:145
Common::Array< Common::Rect > _dirtyRects
Definition: graphics.h:116