* Adjusted VM_LoadQVM interface
This commit is contained in:
parent
f7c82c1adc
commit
535545684f
1 changed files with 8 additions and 7 deletions
|
@ -356,11 +356,12 @@ VM_LoadQVM
|
||||||
Load a .qvm file
|
Load a .qvm file
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
vmHeader_t *VM_LoadQVM( vm_t *vm, vmHeader_t *header, qboolean alloc ) {
|
vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc ) {
|
||||||
int length;
|
int length;
|
||||||
int dataLength;
|
int dataLength;
|
||||||
int i;
|
int i;
|
||||||
char filename[MAX_QPATH];
|
char filename[MAX_QPATH];
|
||||||
|
vmHeader_t *header;
|
||||||
|
|
||||||
// load the image
|
// load the image
|
||||||
Com_sprintf( filename, sizeof(filename), "vm/%s.qvm", vm->name );
|
Com_sprintf( filename, sizeof(filename), "vm/%s.qvm", vm->name );
|
||||||
|
@ -475,7 +476,7 @@ vm_t *VM_Restart( vm_t *vm ) {
|
||||||
// load the image
|
// load the image
|
||||||
Com_Printf( "VM_Restart()\n" );
|
Com_Printf( "VM_Restart()\n" );
|
||||||
|
|
||||||
if( !( header = VM_LoadQVM( vm, header, qfalse ) ) ) {
|
if( !( header = VM_LoadQVM( vm, qfalse ) ) ) {
|
||||||
Com_Error( ERR_DROP, "VM_Restart failed.\n" );
|
Com_Error( ERR_DROP, "VM_Restart failed.\n" );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -560,7 +561,7 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// load the image
|
// load the image
|
||||||
if( !( header = VM_LoadQVM( vm, header, qtrue ) ) ) {
|
if( !( header = VM_LoadQVM( vm, qtrue ) ) ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue