[Scummvm-cvs-logs] CVS: scummvm/sky intro.cpp,1.18,1.19 screen.cpp,1.10,1.11 screen.h,1.1,1.2
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Thu May 15 12:15:10 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky gmchannel.cpp,1.2,1.3 gmchannel.h,1.2,1.3 gmmusic.cpp,1.2,1.3 sky.cpp,1.33,1.34
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.25,2.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv10766/sky
Modified Files:
intro.cpp screen.cpp screen.h
Log Message:
reordered some intro commands, made fade-in look nicer
Index: intro.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/intro.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- intro.cpp 14 May 2003 22:33:39 -0000 1.18
+++ intro.cpp 15 May 2003 19:14:39 -0000 1.19
@@ -25,18 +25,7 @@
#include "sky/skydefs.h"
#include "sky/sky.h"
-//#define WAIT_SEQUENCE while (_tseqFrames != 0) { checkCommands(commandPtr); delay(50); CHECK_ESC }
-//#define CHECK_ESC if (_key_pressed == 27) { _tseqFrames = 0; REMOVE_INTRO return; }
#define FREE_IF_NOT_0(ptr) if (ptr != NULL) { free (ptr); ptr = 0; }
-/*#define REMOVE_INTRO commandPtr = (uint32 *)zeroCommands; \
- FREE_IF_NOT_0(_vgaData) \
- FREE_IF_NOT_0(_diffData) \
- FREE_IF_NOT_0(_workBase) \
- FREE_IF_NOT_0(_tempPal) \
- FREE_IF_NOT_0(seq1) \
- FREE_IF_NOT_0(seq2) \
- FREE_IF_NOT_0(_introTextSpace) \
- FREE_IF_NOT_0(_introTextSave) */
#define REMOVE_INTRO commandPtr = (uint32 *)zeroCommands; \
FREE_IF_NOT_0(_introTextSpace) \
FREE_IF_NOT_0(_introTextSave)
@@ -314,28 +303,21 @@
free(scrollData);
free(vgaData);
free(diffData);
+ commandPtr = (uint32 *)anim4aCommands;
+ _skyDisk->prefetchFile(FN_4B);
+ _skyDisk->prefetchFile(FN_4B_LOG);
WAIT_SEQUENCE;
- _skyDisk->prefetchFile(FN_4B);
_skyScreen->showScreen(FN_4B_LOG);
-
- /*commandPtr = (uint32 *)anim4aCommands;
- WAIT_SEQUENCE; */
- printf("anim 4A commands skipped.\n");
-
commandPtr = (uint32 *)cockpitCommands;
_skyScreen->startSequence(FN_4B);
-
checkCommands(commandPtr);
checkCommands(commandPtr);
-
- WAIT_SEQUENCE; //4b
-
_skyDisk->prefetchFile(FN_4C);
+ WAIT_SEQUENCE; //4b
_skyScreen->showScreen(FN_4C_LOG);
_skyScreen->startSequence(FN_4C);
-
commandPtr = (uint32 *)anim4cCommands;
WAIT_SEQUENCE; //4c
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/screen.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- screen.cpp 14 May 2003 22:33:39 -0000 1.10
+++ screen.cpp 15 May 2003 19:14:40 -0000 1.11
@@ -177,33 +177,16 @@
convertPalette(pal, tmpPal);
- for (uint8 cnt = 0; cnt < 32; cnt++) {
- palette_fadeup_helper((uint32 *)_palette, (uint32 *)tmpPal, GAME_COLOURS);
+ for (uint8 cnt = 1; cnt <= 32; cnt++) {
+ for (uint8 colCnt = 0; colCnt < GAME_COLOURS; colCnt++) {
+ _palette[(colCnt << 2) | 0] = (tmpPal[(colCnt << 2) | 0] * cnt) >> 5;
+ _palette[(colCnt << 2) | 1] = (tmpPal[(colCnt << 2) | 1] * cnt) >> 5;
+ _palette[(colCnt << 2) | 2] = (tmpPal[(colCnt << 2) | 2] * cnt) >> 5;
+ }
_system->set_palette(_palette, 0, GAME_COLOURS);
_system->update_screen();
waitForTimer();
}
-}
-
-void SkyScreen::palette_fadeup_helper(uint32 *realPal, uint32 *desiredPal, int num) {
-
- byte *r = (byte *)realPal;
- byte *d = (byte *)desiredPal;
-
- do {
- if (r[0] < d[0]-8) r[0] += 8;
- else r[0] = d[0];
-
- if (r[1] < d[1]-8) r[1] += 8;
- else r[1] = d[1];
-
- if (r[2] < d[2]-8) r[2] += 8;
- else r[2] = d[2];
-
- r += sizeof(uint32);
- d += sizeof(uint32);
- } while (--num);
-
}
void SkyScreen::waitForTimer(void) {
Index: screen.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/screen.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- screen.h 14 May 2003 22:33:39 -0000 1.1
+++ screen.h 15 May 2003 19:14:40 -0000 1.2
@@ -87,7 +87,6 @@
void convertPalette(uint8 *inPal, uint8* outPal);
void palette_fadedown_helper(uint32 *pal, uint num);
- void palette_fadeup_helper(uint32 *realPal, uint32 *desiredPal, int num);
};
#endif //SKYSCREEN_H
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky gmchannel.cpp,1.2,1.3 gmchannel.h,1.2,1.3 gmmusic.cpp,1.2,1.3 sky.cpp,1.33,1.34
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.25,2.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list