diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 16:10:21 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 16:10:21 (GMT) |
| commit | e2c9882692fabcd22a7d022ebd21fd3b36ad84b0 (patch) | |
| tree | 0afb6c4c35985625484d87adcdda40004910a3ff /includes | |
| parent | 4742c1bcd9103e93751b67a831403a66dc411804 (diff) | |
| parent | 60de1cf5754d8132a7bf5b6868df34babe66397b (diff) | |
| download | powder-e2c9882692fabcd22a7d022ebd21fd3b36ad84b0.zip powder-e2c9882692fabcd22a7d022ebd21fd3b36ad84b0.tar.gz | |
Merge latest FIGH additions
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/powder.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/includes/powder.h b/includes/powder.h index b007755..9baf359 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -210,7 +210,8 @@ #define PT_CLST 155 #define PT_WIRE 156 #define PT_GBMB 157 -#define PT_NUM 158 +#define PT_FIGH 158 +#define PT_NUM 159 #define R_TEMP 22 #define MAX_TEMP 9999 @@ -309,11 +310,24 @@ int graphics_STKM2(GRAPHICS_FUNC_ARGS); int graphics_DEST(GRAPHICS_FUNC_ARGS); int graphics_EMP(GRAPHICS_FUNC_ARGS); int graphics_LIGH(GRAPHICS_FUNC_ARGS); +int graphics_FIGH(GRAPHICS_FUNC_ARGS); #define UPDATE_FUNC_ARGS int i, int x, int y, int surround_space, int nt // 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); @@ -402,13 +416,14 @@ int update_CAUS(UPDATE_FUNC_ARGS); int update_DEST(UPDATE_FUNC_ARGS); int update_EMP(UPDATE_FUNC_ARGS); int update_LIGH(UPDATE_FUNC_ARGS); +int update_FIGH(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 part_type { @@ -625,6 +640,7 @@ static const part_type ptypes[PT_NUM] = {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, NULL}, {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, + {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmans.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description }; @@ -798,6 +814,7 @@ static part_transition ptransitions[PT_NUM] = /* CLST */ {IPL, NT, IPH, NT, ITL, NT, 1256.0f, PT_LAVA}, /* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE}, }; #undef IPL #undef IPH @@ -1025,8 +1042,11 @@ extern int wire_placed; extern int gravwl_timeout; -extern float player[29]; -extern float player2[29]; +extern playerst player; +extern playerst player2; + +extern playerst fighters[256]; +extern unsigned char fighcount; extern int gravityMode; extern int airMode; |
