mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-03 13:02:42 +02:00
Fix file reading, fix ARG implementation
This commit is contained in:
@@ -227,7 +227,7 @@ namespace vm
|
|||||||
|
|
||||||
OPDEF(ARG) /* Marshal TOS to to-call argument list */
|
OPDEF(ARG) /* Marshal TOS to to-call argument list */
|
||||||
{
|
{
|
||||||
Marshal(parameter.int4, Pop());
|
Marshal(parameter.uint1, Pop());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,9 +61,7 @@ namespace vm
|
|||||||
|
|
||||||
TRAPDEF(partCreate)
|
TRAPDEF(partCreate)
|
||||||
{
|
{
|
||||||
printf("%d, %d, %d, %d\n", 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));
|
||||||
Push<int4_t>(0);
|
|
||||||
//Push<int4_t>(sim->create_part(ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRAPDEF(partChangeType)
|
TRAPDEF(partChangeType)
|
||||||
|
@@ -137,7 +137,7 @@ namespace vm
|
|||||||
if ((i = opcodeParameterSize(n)))
|
if ((i = opcodeParameterSize(n)))
|
||||||
{
|
{
|
||||||
x[0] = x[1] = x[2] = x[3] = 0;
|
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);
|
w.uint4 = (x[0]) | (x[1] << 8) | (x[2] << 16) | (x[3] << 24);
|
||||||
}
|
}
|
||||||
rom[romSize].Operation = n;
|
rom[romSize].Operation = n;
|
||||||
|
Reference in New Issue
Block a user