diff options
Diffstat (limited to 'tptlibrary')
| -rw-r--r-- | tptlibrary/file.c | 10 | ||||
| -rw-r--r-- | tptlibrary/tpt_syscalls.asm | 2 | ||||
| -rw-r--r-- | tptlibrary/tpt_syscalls.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/tptlibrary/file.c b/tptlibrary/file.c index b3ad278..67f2ca1 100644 --- a/tptlibrary/file.c +++ b/tptlibrary/file.c @@ -2,6 +2,14 @@ int update_TEST(int i, int x, int y, int nt, int ss) { - partCreate(-1, x, y-1, 2); + int k, j, index; + + for(k=-1; k<2; k++) + for(j=-1; j<2; j++) + { + index = pmapData(x+k, y+j); + if ((index&0xFF) == 2) + killPart(index>>8); + } return 0; } diff --git a/tptlibrary/tpt_syscalls.asm b/tptlibrary/tpt_syscalls.asm index 2da2627..fd86585 100644 --- a/tptlibrary/tpt_syscalls.asm +++ b/tptlibrary/tpt_syscalls.asm @@ -12,3 +12,5 @@ equ print -8 equ partCreate -9 equ partChangeType -10 equ pmapData -11 +equ deletePart -12 +equ killPart -13 diff --git a/tptlibrary/tpt_syscalls.h b/tptlibrary/tpt_syscalls.h index a3adf41..f72aeb5 100644 --- a/tptlibrary/tpt_syscalls.h +++ b/tptlibrary/tpt_syscalls.h @@ -14,5 +14,7 @@ void error(char * message); int partCreate(int i, int x, int y, int type); void partChangeType(int i, int x, int y, int type); int pmapData(int x, int y); +void deletePart(int x, int y, int flags); +void killPart(int i); #endif |
