================ idInterpreter::Restore ================ */
| 108 | ================ |
| 109 | */ |
| 110 | void idInterpreter::Restore( idRestoreGame *savefile ) { |
| 111 | int i; |
| 112 | idStr funcname; |
| 113 | int func_index; |
| 114 | |
| 115 | savefile->ReadInt( callStackDepth ); |
| 116 | for( i = 0; i < callStackDepth; i++ ) { |
| 117 | savefile->ReadInt( callStack[i].s ); |
| 118 | |
| 119 | savefile->ReadInt( func_index ); |
| 120 | if ( func_index >= 0 ) { |
| 121 | callStack[i].f = gameLocal.program.GetFunction( func_index ); |
| 122 | } else { |
| 123 | callStack[i].f = NULL; |
| 124 | } |
| 125 | |
| 126 | savefile->ReadInt( callStack[i].stackbase ); |
| 127 | } |
| 128 | savefile->ReadInt( maxStackDepth ); |
| 129 | |
| 130 | savefile->ReadInt( localstackUsed ); |
| 131 | savefile->Read( &localstack, localstackUsed ); |
| 132 | |
| 133 | savefile->ReadInt( localstackBase ); |
| 134 | savefile->ReadInt( maxLocalstackUsed ); |
| 135 | |
| 136 | savefile->ReadInt( func_index ); |
| 137 | if ( func_index >= 0 ) { |
| 138 | currentFunction = gameLocal.program.GetFunction( func_index ); |
| 139 | } else { |
| 140 | currentFunction = NULL; |
| 141 | } |
| 142 | savefile->ReadInt( instructionPointer ); |
| 143 | |
| 144 | savefile->ReadInt( popParms ); |
| 145 | |
| 146 | savefile->ReadString( funcname ); |
| 147 | if ( funcname.Length() ) { |
| 148 | multiFrameEvent = idEventDef::FindEvent( funcname ); |
| 149 | } |
| 150 | |
| 151 | savefile->ReadObject( reinterpret_cast<idClass *&>( eventEntity ) ); |
| 152 | savefile->ReadObject( reinterpret_cast<idClass *&>( thread ) ); |
| 153 | |
| 154 | savefile->ReadBool( doneProcessing ); |
| 155 | savefile->ReadBool( threadDying ); |
| 156 | savefile->ReadBool( terminateOnExit ); |
| 157 | savefile->ReadBool( debug ); |
| 158 | } |
| 159 | |
| 160 | /* |
| 161 | ================ |
nothing calls this directly
no test coverage detected