[Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.39,1.40 kyra.h,1.14,1.15 screen.cpp,1.7,1.8
Gregory Montoir
cyx at users.sourceforge.net
Fri Sep 9 14:14:15 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: tools descumm-tool.cpp,1.14,1.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.40,1.41 kyra.h,1.15,1.16 screen.cpp,1.8,1.9 screen.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/kyra
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32089/kyra
Modified Files:
kyra.cpp kyra.h screen.cpp
Log Message:
cleanup
Index: kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- kyra.cpp 8 Sep 2005 19:09:52 -0000 1.39
+++ kyra.cpp 9 Sep 2005 21:13:43 -0000 1.40
@@ -436,17 +436,17 @@
&KyraEngine::seq_introKallakMalcom
};
_skipIntroFlag = true; // only true if user already played the game once
- _seq_copyViewOffs = 1;
+ _seq_copyViewOffs = true;
_screen->setFont(Screen::FID_8_FNT);
// snd_kyraPlayTheme(0);
- setTalkCoords(0x90);
+ setTalkCoords(144);
_screen->setScreenPalette(_screen->_currentPalette);
for (int i = 0; i < ARRAYSIZE(introProcTable) && !seq_skipSequence(); ++i) {
(this->*introProcTable[i])();
}
- setTalkCoords(0x88);
+ setTalkCoords(136);
waitTicks(0x1E);
- _seq_copyViewOffs = 0;
+ _seq_copyViewOffs = false;
}
void KyraEngine::seq_introLogos() {
@@ -498,8 +498,8 @@
void KyraEngine::seq_introStory() {
debug(9, "KyraEngine::seq_introStory()");
-// loadBitmap("MAIN_ENG.CPS", 3, 3, 0);
- _screen->clearPage(0); // XXX
+ loadBitmap("MAIN_ENG.CPS", 3, 3, 0);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
}
void KyraEngine::seq_introMalcomTree() {
@@ -570,14 +570,10 @@
void KyraEngine::seq_copyView() {
debug(9, "KyraEngine::seq_copyView()");
int y = 128;
- if (_seq_copyViewOffs == 0) {
+ if (!_seq_copyViewOffs) {
y -= 8;
}
- if (_seq_specialSequenceTempBuffer) {
- _screen->copyToPage0(16, y, 3, _seq_specialSequenceTempBuffer);
- } else {
- _screen->copyRegion(0, 16, 0, 16, 320, y, 2, 0);
- }
+ _screen->copyRegion(0, 16, 0, 16, 320, y, 2, 0);
}
bool KyraEngine::seq_skipSequence() const {
@@ -610,7 +606,6 @@
seqLoopTable[i].count = 0xFFFF;
}
memset(wsaMovieTable, 0, sizeof(wsaMovieTable));
- _seq_specialSequenceTempBuffer = 0;
_screen->_curPage = 0;
while (!quitFlag) {
@@ -717,9 +712,6 @@
case 8:
_screen->shuffleScreen(0, 16, 320, 128, 2, 0, 0, false);
_screen->_curPage = 2;
- if (_seq_specialSequenceTempBuffer) {
- _screen->copyCurPageBlock(0, 16, 40, 128, _seq_specialSequenceTempBuffer);
- }
break;
case 9:
seq_copyView();
@@ -789,7 +781,7 @@
uint8 fillColor = *seqData++;
int b;
if (talkTextPrinted && !talkTextRestored) {
- if (!_seq_specialSequenceTempBuffer && wsaCurDecodePage != 0) {
+ if (wsaCurDecodePage != 0) {
b = 2;
} else {
b = 0;
@@ -798,7 +790,7 @@
}
talkTextPrinted = true;
talkTextRestored = false;
- if (!_seq_specialSequenceTempBuffer && wsaCurDecodePage != 0) {
+ if (wsaCurDecodePage != 0) {
b = 2;
} else {
b = 0;
@@ -809,7 +801,7 @@
case 17:
if (talkTextPrinted && !talkTextRestored) {
int b;
- if (!_seq_specialSequenceTempBuffer && wsaCurDecodePage != 0) {
+ if (wsaCurDecodePage != 0) {
b = 2;
} else {
b = 0;
@@ -891,12 +883,7 @@
}
break;
case 26:
- if (!_seq_specialSequenceTempBuffer) {
- _seq_specialSequenceTempBuffer = (uint8 *)malloc(320 * 128);
- }
- if (_seq_specialSequenceTempBuffer) {
- memset(_seq_specialSequenceTempBuffer, 0, 320 * 128);
- }
+ // allocate offscreen buffer, not needed
break;
case 27:
displayTextFlag = true;
@@ -913,8 +900,6 @@
}
_screen->updateScreen();
}
- free(_seq_specialSequenceTempBuffer);
- _seq_specialSequenceTempBuffer = 0;
return seqSkippedFlag;
}
Index: kyra.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- kyra.h 8 Sep 2005 19:09:52 -0000 1.14
+++ kyra.h 9 Sep 2005 21:13:43 -0000 1.15
@@ -44,6 +44,32 @@
KYRA3 = 4
};
+struct Character {
+ uint16 sceneId;
+ uint8 height;
+ uint8 facing;
+ uint16 currentAnimFrame;
+ uint32 unk6;
+ uint8 inventoryItems[10];
+ int16 x1, y1, x2, y2;
+};
+
+struct Shape {
+ uint8 unk0;
+ uint8 unk1;
+ uint8 imageNum;
+ uint8 x, y, w, h;
+};
+
+struct Room {
+ uint8 id;
+ uint16 room_north_exit;
+ uint16 room_east_exit;
+ uint16 room_south_exit;
+ uint16 room_west_exit;
+ uint8 items_table[12];
+};
+
struct TalkCoords {
uint16 y, x, w;
};
@@ -131,9 +157,8 @@
uint16 _talkMessageH;
bool _talkMessagePrinted;
- int _seq_copyViewOffs;
+ bool _seq_copyViewOffs;
uint8 *_seq_handShapes[3];
- uint8 *_seq_specialSequenceTempBuffer;
Resource *_res;
Screen *_screen;
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/screen.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- screen.cpp 8 Sep 2005 19:09:52 -0000 1.7
+++ screen.cpp 9 Sep 2005 21:13:43 -0000 1.8
@@ -299,6 +299,7 @@
setPagePixel(dstPage, i, j, color);
}
}
+ updateScreen();
_system->delayMillis(ticks * 1000 / 60);
}
}
@@ -351,7 +352,7 @@
}
Screen::FontId Screen::setFont(FontId fontId) {
- debug(9, "Screen::setFont(0%d)", fontId);
+ debug(9, "Screen::setFont(%d)", fontId);
FontId prev = _currentFont;
_currentFont = fontId;
return prev;
- Previous message: [Scummvm-cvs-logs] CVS: tools descumm-tool.cpp,1.14,1.15
- Next message: [Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.40,1.41 kyra.h,1.15,1.16 screen.cpp,1.8,1.9 screen.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list