Change include file for element update functions
This commit is contained in:
parent
2654996599
commit
bdfbc7c409
7
includes/element.h
Normal file
7
includes/element.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef ELEMENT_H
|
||||||
|
#define ELEMENT_H
|
||||||
|
// This header should be included by all files in src/elements/
|
||||||
|
|
||||||
|
#include "powder.h"
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_ACID(UPDATE_FUNC_ARGS) {
|
int update_ACID(UPDATE_FUNC_ARGS) {
|
||||||
int r,rx,ry;
|
int r,rx,ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_AMTR(UPDATE_FUNC_ARGS) {
|
int update_AMTR(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_ARAY(UPDATE_FUNC_ARGS) {
|
int update_ARAY(UPDATE_FUNC_ARGS) {
|
||||||
int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr;
|
int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BCLN(UPDATE_FUNC_ARGS) {
|
int update_BCLN(UPDATE_FUNC_ARGS) {
|
||||||
if (!parts[i].life)
|
if (!parts[i].life)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BCOL(UPDATE_FUNC_ARGS) {
|
int update_BCOL(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BMTL(UPDATE_FUNC_ARGS) {
|
int update_BMTL(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, rt;
|
int r, rx, ry, rt;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BOMB(UPDATE_FUNC_ARGS) {
|
int update_BOMB(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, nb;
|
int r, rx, ry, nb;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BOYL(UPDATE_FUNC_ARGS) {
|
int update_BOYL(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_BTRY(UPDATE_FUNC_ARGS) {
|
int update_BTRY(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, rt;
|
int r, rx, ry, rt;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_C5(UPDATE_FUNC_ARGS) {
|
int update_C5(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_CLNE(UPDATE_FUNC_ARGS) {
|
int update_CLNE(UPDATE_FUNC_ARGS) {
|
||||||
if (!parts[i].ctype)
|
if (!parts[i].ctype)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_COAL(UPDATE_FUNC_ARGS) {
|
int update_COAL(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_DEUT(UPDATE_FUNC_ARGS) {
|
int update_DEUT(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, trade, np;
|
int r, rx, ry, trade, np;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_DSTW(UPDATE_FUNC_ARGS) {
|
int update_DSTW(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FIRW(UPDATE_FUNC_ARGS) {
|
int update_FIRW(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, rt;
|
int r, rx, ry, rt;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FOG(UPDATE_FUNC_ARGS) {
|
int update_FOG(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FRZW(UPDATE_FUNC_ARGS) {
|
int update_FRZW(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FRZZ(UPDATE_FUNC_ARGS) {
|
int update_FRZZ(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FSEP(UPDATE_FUNC_ARGS) {
|
int update_FSEP(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FUSE(UPDATE_FUNC_ARGS) {
|
int update_FUSE(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_FWRK(UPDATE_FUNC_ARGS) {
|
int update_FWRK(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, np;
|
int r, rx, ry, np;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_GLAS(UPDATE_FUNC_ARGS) {
|
int update_GLAS(UPDATE_FUNC_ARGS) {
|
||||||
parts[i].pavg[0] = parts[i].pavg[1];
|
parts[i].pavg[0] = parts[i].pavg[1];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_GLOW(UPDATE_FUNC_ARGS) {
|
int update_GLOW(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_GOO(UPDATE_FUNC_ARGS) {
|
int update_GOO(UPDATE_FUNC_ARGS) {
|
||||||
if (!parts[i].life)
|
if (!parts[i].life)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_HSWC(UPDATE_FUNC_ARGS) {
|
int update_HSWC(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well
|
int update_ICEI(UPDATE_FUNC_ARGS) { //currently used for snow as well
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_IRON(UPDATE_FUNC_ARGS) {
|
int update_IRON(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ
|
int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ
|
||||||
float rr, rrr;
|
float rr, rrr;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_LCRY(UPDATE_FUNC_ARGS) {
|
int update_LCRY(UPDATE_FUNC_ARGS) {
|
||||||
if (parts[i].life==10)
|
if (parts[i].life==10)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
// Interactions which only occur when legacy_enable is on
|
// Interactions which only occur when legacy_enable is on
|
||||||
int update_legacy_all(UPDATE_FUNC_ARGS) {
|
int update_legacy_all(UPDATE_FUNC_ARGS) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_MISC(UPDATE_FUNC_ARGS) {
|
int update_MISC(UPDATE_FUNC_ARGS) {
|
||||||
int t = parts[i].type;
|
int t = parts[i].type;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_MORT(UPDATE_FUNC_ARGS) {
|
int update_MORT(UPDATE_FUNC_ARGS) {
|
||||||
create_part(-1, x, y-1, PT_SMKE);
|
create_part(-1, x, y-1, PT_SMKE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_NEUT(UPDATE_FUNC_ARGS) {
|
int update_NEUT(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_(UPDATE_FUNC_ARGS) {
|
int update_(UPDATE_FUNC_ARGS) {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_NPTCT(UPDATE_FUNC_ARGS) {
|
int update_NPTCT(UPDATE_FUNC_ARGS) {
|
||||||
if (parts[i].temp>295.0f)
|
if (parts[i].temp>295.0f)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PCLN(UPDATE_FUNC_ARGS) {
|
int update_PCLN(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PHOT(UPDATE_FUNC_ARGS) {
|
int update_PHOT(UPDATE_FUNC_ARGS) {
|
||||||
if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
|
if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PIPE(UPDATE_FUNC_ARGS) {
|
int update_PIPE(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, np, trade, q, ctype;
|
int r, rx, ry, np, trade, q, ctype;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PLNT(UPDATE_FUNC_ARGS) {
|
int update_PLNT(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, np;
|
int r, rx, ry, np;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PLUT(UPDATE_FUNC_ARGS) {
|
int update_PLUT(UPDATE_FUNC_ARGS) {
|
||||||
if (1>rand()%100 && ((int)(5.0f*pv[y/CELL][x/CELL]))>(rand()%1000))
|
if (1>rand()%100 && ((int)(5.0f*pv[y/CELL][x/CELL]))>(rand()%1000))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PRTI(UPDATE_FUNC_ARGS) {
|
int update_PRTI(UPDATE_FUNC_ARGS) {
|
||||||
int r, nnx, rx, ry;
|
int r, nnx, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PRTO(UPDATE_FUNC_ARGS) {
|
int update_PRTO(UPDATE_FUNC_ARGS) {
|
||||||
int r, nnx, rx, ry, np;
|
int r, nnx, rx, ry, np;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PUMP(UPDATE_FUNC_ARGS) {
|
int update_PUMP(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_PYRO(UPDATE_FUNC_ARGS) {
|
int update_PYRO(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry, rt, t = parts[i].type;
|
int r, rx, ry, rt, t = parts[i].type;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_QRTZ(UPDATE_FUNC_ARGS) {
|
int update_QRTZ(UPDATE_FUNC_ARGS) {
|
||||||
parts[i].pavg[0] = parts[i].pavg[1];
|
parts[i].pavg[0] = parts[i].pavg[1];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_RIME(UPDATE_FUNC_ARGS) {
|
int update_RIME(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SHLD1(UPDATE_FUNC_ARGS) {
|
int update_SHLD1(UPDATE_FUNC_ARGS) {
|
||||||
int r, nnx, nny, rx, ry;
|
int r, nnx, nny, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SING(UPDATE_FUNC_ARGS) {
|
int update_SING(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SLTW(UPDATE_FUNC_ARGS) {
|
int update_SLTW(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SPNG(UPDATE_FUNC_ARGS) {
|
int update_SPNG(UPDATE_FUNC_ARGS) {
|
||||||
int r, trade, rx, ry, tmp;
|
int r, trade, rx, ry, tmp;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SPRK(UPDATE_FUNC_ARGS) {
|
int update_SPRK(UPDATE_FUNC_ARGS) {
|
||||||
update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
|
update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SPAWN(UPDATE_FUNC_ARGS) {
|
int update_SPAWN(UPDATE_FUNC_ARGS) {
|
||||||
ISSPAWN1 = 1;
|
ISSPAWN1 = 1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SPAWN2(UPDATE_FUNC_ARGS) {
|
int update_SPAWN2(UPDATE_FUNC_ARGS) {
|
||||||
ISSPAWN2 = 1;
|
ISSPAWN2 = 1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_SWCH(UPDATE_FUNC_ARGS) {
|
int update_SWCH(UPDATE_FUNC_ARGS) {
|
||||||
int r, rt, rx, ry;
|
int r, rt, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_THDR(UPDATE_FUNC_ARGS) {
|
int update_THDR(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_THRM(UPDATE_FUNC_ARGS) {
|
int update_THRM(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_URAN(UPDATE_FUNC_ARGS) {
|
int update_URAN(UPDATE_FUNC_ARGS) {
|
||||||
if (!legacy_enable && pv[y/CELL][x/CELL]>0.0f)
|
if (!legacy_enable && pv[y/CELL][x/CELL]>0.0f)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_VINE(UPDATE_FUNC_ARGS) {
|
int update_VINE(UPDATE_FUNC_ARGS) {
|
||||||
int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1;
|
int r, np, rx =(rand()%3)-1, ry=(rand()%3)-1;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_WARP(UPDATE_FUNC_ARGS) {
|
int update_WARP(UPDATE_FUNC_ARGS) {
|
||||||
int trade, r, rx, ry;
|
int trade, r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_WATR(UPDATE_FUNC_ARGS) {
|
int update_WATR(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_WIFI(UPDATE_FUNC_ARGS) {
|
int update_WIFI(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_WTRV(UPDATE_FUNC_ARGS) {
|
int update_WTRV(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <powder.h>
|
#include <element.h>
|
||||||
|
|
||||||
int update_YEST(UPDATE_FUNC_ARGS) {
|
int update_YEST(UPDATE_FUNC_ARGS) {
|
||||||
int r, rx, ry;
|
int r, rx, ry;
|
||||||
|
Reference in New Issue
Block a user