DREAMWEB: Encapsulate the hack to guess if this is a CD build or not
This commit is contained in:
parent
3971a0dbf5
commit
d8ff4182f7
3 changed files with 9 additions and 5 deletions
|
@ -765,10 +765,7 @@ void DreamGenContext::updatepeople() {
|
|||
}
|
||||
|
||||
void DreamGenContext::madmantext() {
|
||||
// The original sources has two codepaths depending if the game is 'if cd' or not
|
||||
// This is a hack to guess which version to use with the assumption that if we have a cd version
|
||||
// we managed to load the speech.
|
||||
if (data.byte(kSpeechloaded)) {
|
||||
if (isCD()) {
|
||||
if (data.byte(kSpeechcount) >= 63)
|
||||
return;
|
||||
_cmp(data.byte(kCh1playing), 255);
|
||||
|
|
|
@ -1071,5 +1071,12 @@ void DreamGenContext::showpanel() {
|
|||
showframe(frame, 192, 0, 19, 0, &width, &height);
|
||||
}
|
||||
|
||||
bool DreamGenContext::isCD() {
|
||||
// The original sources has two codepaths depending if the game is 'if cd' or not
|
||||
// This is a hack to guess which version to use with the assumption that if we have a cd version
|
||||
// we managed to load the speech. At least it is isolated in this function and can be changed.
|
||||
// Maybe detect the version during game id?
|
||||
return (data.byte(kSpeechloaded) == 1);
|
||||
}
|
||||
} /*namespace dreamgen */
|
||||
|
||||
|
|
|
@ -129,5 +129,5 @@
|
|||
void showpanel();
|
||||
void updatepeople();
|
||||
void madmantext();
|
||||
|
||||
bool isCD();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue