mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
COMMON: Move HerculesDimensions enum to SCUMM.
The enum is only used inside the SCUMM engine so it is rather pointless to keep it in common/util.h right now. Also if we really want it in some common place it should probably be better in graphics/ too.
This commit is contained in:
parent
36526ef954
commit
3b7c91f2a7
@ -208,11 +208,6 @@ enum RenderMode {
|
||||
kRenderAmiga = 5
|
||||
};
|
||||
|
||||
enum HerculesDimensions {
|
||||
kHercW = 720,
|
||||
kHercH = 350
|
||||
};
|
||||
|
||||
struct RenderModeDescription {
|
||||
const char *code;
|
||||
const char *description;
|
||||
|
@ -722,11 +722,11 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
|
||||
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
|
||||
ditherHerc(_compositeBuf, _herculesBuf, width, &x, &y, &width, &height);
|
||||
|
||||
src = _herculesBuf + x + y * Common::kHercW;
|
||||
pitch = Common::kHercW;
|
||||
src = _herculesBuf + x + y * kHercWidth;
|
||||
pitch = kHercWidth;
|
||||
|
||||
// center image on the screen
|
||||
x += (Common::kHercW - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40
|
||||
x += (kHercWidth - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40
|
||||
} else if (_useCJKMode && m == 2) {
|
||||
pitch *= m;
|
||||
x *= m;
|
||||
@ -819,10 +819,10 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid
|
||||
int dsty = yo*2 - yo/4;
|
||||
|
||||
for (int y1 = 0; y1 < heighto;) {
|
||||
assert(dsty < Common::kHercH);
|
||||
assert(dsty < kHercHeight);
|
||||
|
||||
srcptr = src + y1 * srcPitch;
|
||||
dstptr = hercbuf + dsty * Common::kHercW + xo * 2;
|
||||
dstptr = hercbuf + dsty * kHercWidth + xo * 2;
|
||||
|
||||
const int idx1 = (dsty % 7) % 2;
|
||||
for (int x1 = 0; x1 < widtho; x1++) {
|
||||
|
@ -32,6 +32,11 @@ namespace Scumm {
|
||||
|
||||
class ScummEngine;
|
||||
|
||||
enum HerculesDimensions {
|
||||
kHercWidth = 720,
|
||||
kHercHeight = 350
|
||||
};
|
||||
|
||||
/** Camera modes */
|
||||
enum {
|
||||
kNormalCameraMode = 1,
|
||||
|
@ -181,7 +181,7 @@ void ScummEngine::parseEvent(Common::Event event) {
|
||||
_mouse.y = event.mouse.y;
|
||||
|
||||
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
|
||||
_mouse.x -= (Common::kHercW - _screenWidth * 2) / 2;
|
||||
_mouse.x -= (kHercWidth - _screenWidth * 2) / 2;
|
||||
_mouse.x >>= 1;
|
||||
_mouse.y = _mouse.y * 4 / 7;
|
||||
} else if (_useCJKMode && _textSurfaceMultiplier == 2) {
|
||||
|
@ -564,7 +564,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
||||
|
||||
_herculesBuf = 0;
|
||||
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
|
||||
_herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH);
|
||||
_herculesBuf = (byte *)malloc(kHercWidth * kHercHeight);
|
||||
}
|
||||
|
||||
// Add debug levels
|
||||
@ -1140,7 +1140,7 @@ Common::Error ScummEngine::init() {
|
||||
|
||||
// Initialize backend
|
||||
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
|
||||
initGraphics(Common::kHercW, Common::kHercH, true);
|
||||
initGraphics(kHercWidth, kHercHeight, true);
|
||||
} else {
|
||||
int screenWidth = _screenWidth;
|
||||
int screenHeight = _screenHeight;
|
||||
|
Loading…
x
Reference in New Issue
Block a user