Remove unused entires from file, populate with safe data on load. Scripting for Shuttlebay, Cargo bay 1 and Cargo bay 2 doors.

This commit is contained in:
stevenhowes
2021-05-29 23:46:46 +01:00
parent 459db2afb0
commit 3b4de290cc
9 changed files with 76 additions and 79 deletions
+21
View File
@@ -123,6 +123,17 @@ void game2_saveeventactions(char* filename)
void game2_loadevents(char* filename)
{
int length;
int i;
// Populate with inactive entries
for(i = 0; i<MAXEVENTS; i++)
{
// Default to Triggered with no re-arm so event never fires
sprintf(Events[i].Name,"INVALID");
Events[i].Triggered = 1;
Events[i].RearmDelay = -1;
Events[i].NextRearm = -1;
}
// Attempt to get file info
inreg.r[0] = 5;
@@ -151,6 +162,16 @@ void game2_loadevents(char* filename)
void game2_loadeventactionss(char* filename)
{
int length;
int i;
// Populate with inactive entries
for(i = 0; i<MAXEVENTACTIONS; i++)
{
EventActions[i].Event = -1;
EventActions[i].Action = -1;
EventActions[i].ActionValue = -1;
EventActions[i].ActionTarget = -1;
}
// Attempt to get file info
inreg.r[0] = 5;