Fix StoatSpriteEngine.ADVLogList_GetADVLogVoice

This function has a different interface than the AnteaterADVEngine
version.
This commit is contained in:
Nunuhara Cabbage
2021-05-11 19:32:59 -07:00
parent 4120e344f1
commit dffbd3125c
3 changed files with 12 additions and 1 deletions
+9
View File
@@ -171,6 +171,15 @@ int ADVLogList_GetADVLogVoice(int log_no, int voice_no)
return logs[log_no].voices[voice_no];
}
int ADVLogList_GetADVLogVoiceLast(int log_no)
{
check_log_nr(log_no);
unsigned nr_voices = logs[log_no].nr_voices;
if (!nr_voices)
return 0;
return logs[log_no].voices[nr_voices - 1];
}
bool ADVLogList_Save(struct page **iarray)
{
// 0x64 <- 'A'
+1
View File
@@ -34,6 +34,7 @@ int ADVLogList_GetNumofADVLogText(int nADVLog);
void ADVLogList_GetADVLogText(int nADVLog, int nText, struct string **text);
int ADVLogList_GetNumofADVLogVoice(int nADVLog);
int ADVLogList_GetADVLogVoice(int nADVLog, int Index);
int ADVLogList_GetADVLogVoiceLast(int log_no); // for StoatSpriteEngine
bool ADVLogList_Save(struct page **iarray);
bool ADVLogList_Load(struct page **iarray);
bool ADVSceneKeeper_AddADVScene(struct page **page);
+2 -1
View File
@@ -933,6 +933,7 @@ HLL_LIBRARY(StoatSpriteEngine,
HLL_EXPORT(ADVLogList_GetNumofADVLog, ADVLogList_GetNumofADVLog),
HLL_EXPORT(ADVLogList_GetNumofADVLogText, ADVLogList_GetNumofADVLogText),
HLL_EXPORT(ADVLogList_GetADVLogText, ADVLogList_GetADVLogText),
HLL_EXPORT(ADVLogList_GetADVLogVoice, ADVLogList_GetADVLogVoice),
// XXX: StoatSpriteEngine interface differs from AnteaterADVEngine here
HLL_EXPORT(ADVLogList_GetADVLogVoice, ADVLogList_GetADVLogVoiceLast),
HLL_EXPORT(ADVLogList_Save, ADVLogList_Save),
HLL_EXPORT(ADVLogList_Load, ADVLogList_Load));