diff options
| author | jacob1 <jfu614@gmail.com> | 2012-09-30 18:21:32 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-30 19:43:38 (GMT) |
| commit | be1b9112e85c270920a559acd790340ca32bce7f (patch) | |
| tree | 9cfd011bd6b3cb030c825613ae43fcdee5c43c73 /src/virtualmachine/Syscalls.cpp | |
| parent | 1c60ce25ee2fe15cc4bfa0649853bf6a0b95c14d (diff) | |
| download | powder-be1b9112e85c270920a559acd790340ca32bce7f.zip powder-be1b9112e85c270920a559acd790340ca32bce7f.tar.gz | |
Fix some uninitialized variables, add back sandcolor changing
Diffstat (limited to 'src/virtualmachine/Syscalls.cpp')
| -rw-r--r-- | src/virtualmachine/Syscalls.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/virtualmachine/Syscalls.cpp b/src/virtualmachine/Syscalls.cpp index 876fe52..31b7dd4 100644 --- a/src/virtualmachine/Syscalls.cpp +++ b/src/virtualmachine/Syscalls.cpp @@ -14,31 +14,37 @@ namespace vm TRAPDEF(sin) { Push<float4_t>(sin(ARG(0).float4)); + return 0; } TRAPDEF(cos) { Push<float4_t>(cos(ARG(0).float4)); + return 0; } TRAPDEF(atan2) { Push<float4_t>(atan2(ARG(0).float4, ARG(1).float4)); + return 0; } TRAPDEF(sqrt) { Push<float4_t>(sqrt(ARG(0).float4)); + return 0; } TRAPDEF(floor) { Push<float4_t>(floor(ARG(0).float4)); + return 0; } TRAPDEF(ceil) { Push<float4_t>(ceil(ARG(0).float4)); + return 0; } @@ -47,6 +53,7 @@ namespace vm char *text; text = (char*)(ram) + ARG(0).int4; printf("%s", text); + return 0; } @@ -56,31 +63,37 @@ namespace vm msg = (char*)(ram) + ARG(0).int4; printf("%s", msg); End(); + return 0; } TRAPDEF(partCreate) { Push<int4_t>(sim->create_part(ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4)); + return 0; } TRAPDEF(partChangeType) { sim->part_change_type(ARG(0).int4, ARG(1).int4, ARG(2).int4, ARG(3).int4); + return 0; } TRAPDEF(pmapData) { Push<int4_t>(sim->pmap[ARG(1).int4][ARG(0).int4]); + return 0; } TRAPDEF(deletePart) { sim->delete_part(ARG(0).int4, ARG(1).int4, ARG(2).int4); + return 0; } TRAPDEF(killPart) { sim->kill_part(ARG(0).int4); + return 0; } } |
