Fix file reading, fix ARG implementation
This commit is contained in:
parent
3b2f4d59fc
commit
b8a5b8ecb3
@ -227,7 +227,7 @@ namespace vm
|
||||
|
||||
OPDEF(ARG) /* Marshal TOS to to-call argument list */
|
||||
{
|
||||
Marshal(parameter.int4, Pop());
|
||||
Marshal(parameter.uint1, Pop());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -61,9 +61,7 @@ namespace vm
|
||||
|
||||
TRAPDEF(partCreate)
|
||||
{
|
||||
printf("%d, %d, %d, %d\n", ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4);
|
||||
Push<int4_t>(0);
|
||||
//Push<int4_t>(sim->create_part(ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4));
|
||||
Push<int4_t>(sim->create_part(ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4));
|
||||
}
|
||||
|
||||
TRAPDEF(partChangeType)
|
||||
|
@ -137,7 +137,7 @@ namespace vm
|
||||
if ((i = opcodeParameterSize(n)))
|
||||
{
|
||||
x[0] = x[1] = x[2] = x[3] = 0;
|
||||
input.readsome((char*)x, 4);
|
||||
input.readsome((char*)x, i);
|
||||
w.uint4 = (x[0]) | (x[1] << 8) | (x[2] << 16) | (x[3] << 24);
|
||||
}
|
||||
rom[romSize].Operation = n;
|
||||
|
Reference in New Issue
Block a user