mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
Merge branch 'progsig-sx' into jgrpp
This commit is contained in:
commit
880d455ea9
@ -355,6 +355,7 @@ public:
|
||||
{
|
||||
uint64 p1 = 0;
|
||||
while(true) {
|
||||
if(si == NULL) break;
|
||||
switch(si->Opcode()) {
|
||||
case PSO_SET_SIGNAL: {
|
||||
SB(p1, 0, 3, this->track);
|
||||
@ -365,6 +366,7 @@ public:
|
||||
this->RebuildInstructionList();
|
||||
si = ((SignalSet*)si)->next;
|
||||
} break;
|
||||
|
||||
case PSO_IF: {
|
||||
SB(p1, 0, 3, this->track);
|
||||
SB(p1, 3, 16, next);
|
||||
@ -393,11 +395,15 @@ public:
|
||||
|
||||
si = ((SignalIf*)si)->after;
|
||||
} break;
|
||||
|
||||
case PSO_LAST:
|
||||
case PSO_IF_ELSE:
|
||||
case PSO_IF_ENDIF:
|
||||
return;
|
||||
|
||||
default:
|
||||
NOT_REACHED();
|
||||
}
|
||||
if(si == NULL) break;
|
||||
if(si->Opcode() == PSO_LAST) break;
|
||||
if(si->Opcode() == PSO_IF_ELSE) break;
|
||||
if(si->Opcode() == PSO_IF_ENDIF) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,6 @@ static void Save_SPRG()
|
||||
WriteVLI(b, _signal_programs.size());
|
||||
for(ProgramList::iterator i = _signal_programs.begin(), e = _signal_programs.end();
|
||||
i != e; ++i) {
|
||||
SignalReference ref = i->first;
|
||||
SignalProgram *prog = i->second;
|
||||
|
||||
prog->DebugPrintProgram();
|
||||
@ -170,8 +169,9 @@ static void Save_SPRG()
|
||||
|
||||
uint size = b.size();
|
||||
SlSetLength(size);
|
||||
for(uint i = 0; i < size; i++)
|
||||
for(uint i = 0; i < size; i++) {
|
||||
SlWriteByte(b[i]); // TODO Gotta be a better way
|
||||
}
|
||||
}
|
||||
|
||||
// We don't know the pointer values that need to be stored in various
|
||||
|
Loading…
Reference in New Issue
Block a user