Commit aceb4015 authored by anotherguest's avatar anotherguest

Updated constants. Updated animation setting reading from game wiki info. Looks correct.

parent 993bd449
...@@ -35,8 +35,8 @@ enum ...@@ -35,8 +35,8 @@ enum
ESignatureLength = 0x13, ESignatureLength = 0x13,
EScriptStartTag = 0x50, EScriptStartTag = 0x50,
EAnimationSoundList = 0x4C53, EAnimationSoundList = 0x4C53,
EAnimationPlayList = 0x4C50 EAnimationPlayList = 0x4C50,
EAnimationData = 0x4e41
}; };
// These are the known script types // These are the known script types
......
...@@ -47,7 +47,7 @@ void Scene::loadAni (File *f, int dataIndex) { ...@@ -47,7 +47,7 @@ void Scene::loadAni (File *f, int dataIndex) {
type = f->loadShort(); type = f->loadShort();
if (type == 0x4C53) { // SL if (type == EAnimationSoundList) { // SL
/*unsigned short int offset =*/ f->loadShort(); /*unsigned short int offset =*/ f->loadShort();
unsigned char noSounds = f->loadChar(); unsigned char noSounds = f->loadChar();
...@@ -60,7 +60,7 @@ void Scene::loadAni (File *f, int dataIndex) { ...@@ -60,7 +60,7 @@ void Scene::loadAni (File *f, int dataIndex) {
} }
} else if (type == 0x4C50) {// PL } else if (type == EAnimationPlayList) {// PL
int pos = f->tell(); int pos = f->tell();
int nextPos = f->tell(); int nextPos = f->tell();
...@@ -326,7 +326,7 @@ void Scene::loadData (File *f) { ...@@ -326,7 +326,7 @@ void Scene::loadData (File *f) {
LOG("Data dataLen", dataLen); LOG("Data dataLen", dataLen);
// AN // AN
if (dataLen == 0x4e41) { if (dataLen == EAnimationData) {
LOG("Data Type", "ANI"); LOG("Data Type", "ANI");
loadAni(f, loop); loadAni(f, loop);
...@@ -389,7 +389,7 @@ void Scene::loadScripts (File *f) { ...@@ -389,7 +389,7 @@ void Scene::loadScripts (File *f) {
/*int bgIndex = 0;*/ /*int bgIndex = 0;*/
int textAlignment = 0; int textAlignment = 0;
int textFont = 0; int textFont = 0;
int textShadow = 0; int textShadow = -1;
for(loop = 0; loop < scriptItems; loop++) { for(loop = 0; loop < scriptItems; loop++) {
...@@ -423,30 +423,30 @@ void Scene::loadScripts (File *f) { ...@@ -423,30 +423,30 @@ void Scene::loadScripts (File *f) {
case ESceneYesNo: case ESceneYesNo:
{ {
pages[loop].askForYesNo = 1; pages[loop].askForYesNo = 1;
LOG("ESceneYesNo", 1);
}break; }break;
case ESceneStopMusic: case ESceneStopMusic:
{ {
pages[loop].stopMusic = 1; pages[loop].stopMusic = 1;
LOG("ESceneStopMusic", 1);
}break; }break;
case ESceneAnimationSetting: case ESceneAnimationSetting:
{ {
signed long int something = f->loadInt(); signed long int loop = f->loadInt();
signed long int something2 = f->loadInt(); signed short int speed = f->loadShort();
LOG("ESceneAnimationSetting1", something); signed short int graphnum = f->loadShort();
LOG("ESceneAnimationSetting2", something2); LOG("ESceneAnimationSetting loop", loop);
LOG("ESceneAnimationSetting speed", speed);
LOG("ESceneAnimationSetting graphnum", graphnum);
} }
break; break;
case ESceneAnimationIndex: case ESceneAnimationIndex:
{ {
unsigned char aniIndex = f->loadChar(); unsigned char aniIndex = f->loadChar();
LOG("ESceneAnimationIndex", aniIndex); LOG("ESceneAnimationIndex", aniIndex);
} }
break; break;
...@@ -604,7 +604,16 @@ void Scene::loadScripts (File *f) { ...@@ -604,7 +604,16 @@ void Scene::loadScripts (File *f) {
case ESceneTextShadow: case ESceneTextShadow:
{ {
textShadow = f->loadShort(); char enableShadow = f->loadChar();
if(enableShadow) {
textShadow = f->loadChar();
}
else
{
f->loadChar(); // Skip this value since shadows are turned off
textShadow = -1; // Turn off shadow , -1 means no shadow colour
}
LOG("ESceneTextShadow", textShadow); LOG("ESceneTextShadow", textShadow);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment