summaryrefslogtreecommitdiff
path: root/tptlibrary
diff options
context:
space:
mode:
authorSavely Skresanov <savask@yandex.ru>2012-09-15 14:31:55 (GMT)
committer Savely Skresanov <savask@yandex.ru>2012-09-15 14:34:27 (GMT)
commitec0dfa27e888461ec85012fa23d5a26e30f0e813 (patch)
tree127dd057a10a8810ea14057d8da2e050655f3e1c /tptlibrary
parentb626864293a5cb4717303245095c6d6f39c52f7d (diff)
downloadpowder-ec0dfa27e888461ec85012fa23d5a26e30f0e813.zip
powder-ec0dfa27e888461ec85012fa23d5a26e30f0e813.tar.gz
Hooked more functions to VM.
Diffstat (limited to 'tptlibrary')
-rw-r--r--tptlibrary/file.c10
-rw-r--r--tptlibrary/tpt_syscalls.asm2
-rw-r--r--tptlibrary/tpt_syscalls.h2
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