mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 04:35:16 +00:00
DRASCULA: Simplify the drawing code in BJ's room
This commit is contained in:
parent
51cd9b4888
commit
d81869af58
@ -55,17 +55,6 @@ void DrasculaEngine::placeDrascula() {
|
||||
copyRect(drX, 122, drasculaX, drasculaY, 45, 77, backSurface, screenSurface);
|
||||
}
|
||||
|
||||
void DrasculaEngine::placeBJ() {
|
||||
int bX = 0;
|
||||
|
||||
if (trackBJ == 3)
|
||||
bX = 10;
|
||||
else if (trackBJ == 0)
|
||||
bX = 37;
|
||||
|
||||
copyRect(bX, 99, bjX, bjY, 26, 76, drawSurface3, screenSurface);
|
||||
}
|
||||
|
||||
void DrasculaEngine::hiccup(int counter) {
|
||||
int y = 0, trackCharacter = 0;
|
||||
if (currentChapter == 3)
|
||||
|
@ -430,9 +430,6 @@ void DrasculaEngine::animation_2_1() {
|
||||
break;
|
||||
for (l = 0; l < 200; l++)
|
||||
factor_red[l] = 99;
|
||||
bjX = 170;
|
||||
bjY = 90;
|
||||
trackBJ = 0;
|
||||
curX = 91;
|
||||
curY = 95;
|
||||
trackProtagonist = 1;
|
||||
|
@ -70,9 +70,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam
|
||||
_talkSequences = 0;
|
||||
_currentSaveSlot = 0;
|
||||
|
||||
bjX = 0;
|
||||
bjY = 0;
|
||||
trackBJ = 0;
|
||||
framesWithoutAction = 0;
|
||||
term_int = 0;
|
||||
currentChapter = 0;
|
||||
|
@ -456,7 +456,6 @@ public:
|
||||
int blinking;
|
||||
int igorX, igorY, trackIgor;
|
||||
int drasculaX, drasculaY, trackDrascula;
|
||||
int bjX, bjY, trackBJ;
|
||||
int framesWithoutAction;
|
||||
int term_int;
|
||||
int currentChapter;
|
||||
@ -526,7 +525,6 @@ public:
|
||||
bool animate(const char *animation, int FPS);
|
||||
void pause(int);
|
||||
void placeIgor();
|
||||
void placeBJ();
|
||||
void placeDrascula();
|
||||
|
||||
void talkInit(const char *filename);
|
||||
|
@ -1153,9 +1153,6 @@ void DrasculaEngine::updateRefresh_pre() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentChapter == 1 && _roomNumber == 16)
|
||||
placeBJ();
|
||||
}
|
||||
|
||||
void DrasculaEngine::update_1_pre() {
|
||||
@ -1309,15 +1306,15 @@ void DrasculaEngine::update_14_pre() {
|
||||
}
|
||||
|
||||
void DrasculaEngine::update_16_pre() {
|
||||
if (currentChapter != 2) {
|
||||
debug(4, "update_16_pre: Special case, current chapter is not 2, not performing update");
|
||||
return;
|
||||
if (currentChapter == 1) {
|
||||
// Place BJ
|
||||
copyRect(37, 99, 170, 90, 26, 76, drawSurface3, screenSurface);
|
||||
} else if (currentChapter == 2) {
|
||||
if (flags[17] == 0)
|
||||
copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface);
|
||||
if (flags[19] == 1)
|
||||
copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface);
|
||||
}
|
||||
|
||||
if (flags[17] == 0)
|
||||
copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface);
|
||||
if (flags[19] == 1)
|
||||
copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface);
|
||||
}
|
||||
|
||||
void DrasculaEngine::update_18_pre() {
|
||||
@ -1678,9 +1675,8 @@ void DrasculaEngine::enterRoom(int roomIndex) {
|
||||
strcpy(currentData, fileName);
|
||||
|
||||
Common::SeekableReadStream *stream = _archives.open(fileName);
|
||||
if (!stream) {
|
||||
if (!stream)
|
||||
error("missing data file %s", fileName);
|
||||
}
|
||||
|
||||
TextResourceParser p(stream, DisposeAfterUse::YES);
|
||||
|
||||
|
@ -338,14 +338,14 @@ void DrasculaEngine::talk_bj(int index) {
|
||||
|
||||
updateRefresh_pre();
|
||||
|
||||
copyBackground(bjX + 2, bjY - 1, bjX + 2, bjY - 1, 27, 40, bgSurface, screenSurface);
|
||||
copyBackground(170 + 2, 90 - 1, 170 + 2, 90 - 1, 27, 40, bgSurface, screenSurface);
|
||||
|
||||
copyRect(x_talk[face], 99, bjX + 2, bjY - 1, 27, 40, drawSurface3, screenSurface);
|
||||
copyRect(x_talk[face], 99, 170 + 2, 90 - 1, 27, 40, drawSurface3, screenSurface);
|
||||
moveCharacters();
|
||||
updateRefresh();
|
||||
|
||||
if (!_subtitlesDisabled)
|
||||
centerText(said, bjX + 7, bjY);
|
||||
centerText(said, 170 + 7, 90);
|
||||
|
||||
updateScreen();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user