summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorsavask <savask@yandex.ru>2011-10-23 08:22:31 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-26 14:36:00 (GMT)
commit03902ec9a4c60e53a7f80649bcf3a1158a20465e (patch)
tree537a5a55461e1596b2e6fa7843e9351d217f08c9 /includes
parent5652ecc5c20a6cce0745b20587ff4dfec8103ff3 (diff)
downloadpowder-03902ec9a4c60e53a7f80649bcf3a1158a20465e.zip
powder-03902ec9a4c60e53a7f80649bcf3a1158a20465e.tar.gz
Made a special structure for stick mans.
Diffstat (limited to 'includes')
-rw-r--r--includes/powder.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/includes/powder.h b/includes/powder.h
index 33b5794..2cf8802 100644
--- a/includes/powder.h
+++ b/includes/powder.h
@@ -250,6 +250,18 @@
// to call another update function with same arguments:
#define UPDATE_FUNC_SUBCALL_ARGS i, x, y, surround_space, nt
+struct playerst
+{
+ char comm; //command cell
+ char pcomm; //previous command
+ int elem; //element power
+ float legs[16]; //legs' positions
+ float accs[8]; //accelerations
+ char spwn; //if stick man was spawned
+ unsigned int frames; //frames since last particle spawn - used when spawning LIGH
+};
+typedef struct playerst playerst;
+
int update_ACID(UPDATE_FUNC_ARGS);
int update_ANAR(UPDATE_FUNC_ARGS);
int update_AMTR(UPDATE_FUNC_ARGS);
@@ -343,9 +355,9 @@ int update_LIGH(UPDATE_FUNC_ARGS);
int update_MISC(UPDATE_FUNC_ARGS);
int update_legacy_PYRO(UPDATE_FUNC_ARGS);
int update_legacy_all(UPDATE_FUNC_ARGS);
-int run_stickman(float* playerp, UPDATE_FUNC_ARGS);
-void STKM_init_legs(float* playerp, int i);
-void STKM_interact(float* playerp, int i, int x, int y);
+int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS);
+void STKM_init_legs(playerst* playerp, int i);
+void STKM_interact(playerst* playerp, int i, int x, int y);
struct particle
@@ -978,10 +990,10 @@ extern int wire_placed;
extern int gravwl_timeout;
-extern float player[29];
-extern float player2[29];
+extern playerst player;
+extern playerst player2;
-extern float fighters[256][29];
+extern playerst fighters[256];
extern unsigned char fighcount;
extern int gravityMode;