Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 38.93 KB | None | 0 0
  1. #ifndef POWDER_H
  2. #define POWDER_H
  3.  
  4. #include "graphics.h"
  5. #include "defines.h"
  6. #include "interface.h"
  7.  
  8. #define CM_COUNT 7
  9. #define CM_FANCY 6
  10. #define CM_HEAT 5
  11. #define CM_BLOB 4
  12. #define CM_FIRE 3
  13. #define CM_PERS 2
  14. #define CM_PRESS 1
  15. #define CM_VEL 0
  16.  
  17. #define UI_WALLSTART 37
  18. #define UI_WALLCOUNT 19
  19.  
  20. #define SPC_AIR 136
  21. #define SPC_HEAT 137
  22. #define SPC_COOL 138
  23. #define SPC_VACUUM 139
  24.  
  25. #define WL_WALLELEC 22
  26. #define WL_EWALL    23
  27. #define WL_DETECT   24
  28. #define WL_STREAM   25
  29. #define WL_SIGN 26
  30. #define WL_FAN  27
  31. #define WL_ALLOWLIQUID  28
  32. #define WL_DESTROYALL   29
  33. #define WL_ERASE    30
  34. #define WL_WALL 31
  35. #define WL_ALLOWAIR 32
  36. #define WL_ALLOWSOLID   33
  37. #define WL_ALLOWALLELEC 34
  38. #define WL_EHOLE    35
  39. #define WL_ALLOWGAS 40
  40.  
  41. #define PT_NONE 0
  42. #define PT_DUST 1
  43. #define PT_WATR 2
  44. #define PT_OIL 3
  45. #define PT_FIRE 4
  46. #define PT_STNE 5
  47. #define PT_LAVA 6
  48. #define PT_GUNP 7
  49. #define PT_NITR 8
  50. #define PT_CLNE 9
  51. #define PT_GAS 10
  52. #define PT_PLEX 11
  53. #define PT_GOO 12
  54. #define PT_ICEI 13
  55. #define PT_METL 14
  56. #define PT_SPRK 15
  57. #define PT_SNOW 16
  58. #define PT_WOOD 17
  59. #define PT_NEUT 18
  60. #define PT_PLUT 19
  61. #define PT_PLNT 20
  62. #define PT_ACID 21
  63. #define PT_VOID 22
  64. #define PT_WTRV 23
  65. #define PT_CNCT 24
  66. #define PT_DSTW 25
  67. #define PT_SALT 26
  68. #define PT_SLTW 27
  69. #define PT_DMND 28
  70. #define PT_BMTL 29
  71. #define PT_BRMT 30
  72. #define PT_PHOT 31
  73. #define PT_URAN 32
  74. #define PT_WAX  33
  75. #define PT_MWAX 34
  76. #define PT_PSCN 35
  77. #define PT_NSCN 36
  78. #define PT_LNTG 37
  79. #define PT_INSL 38
  80. #define PT_BHOL 39
  81. #define PT_WHOL 40
  82. #define PT_RBDM 41
  83. #define PT_LRBD 42
  84. #define PT_NTCT 43
  85. #define PT_SAND 44
  86. #define PT_GLAS 45
  87. #define PT_PTCT 46
  88. #define PT_BGLA 47
  89. #define PT_THDR 48
  90. #define PT_PLSM 49
  91. #define PT_ETRD 50
  92. #define PT_NICE 51
  93. #define PT_NBLE 52
  94. #define PT_BTRY 53
  95. #define PT_LCRY 54
  96. #define PT_STKM 55
  97. #define PT_SWCH 56
  98. #define PT_SMKE 57
  99. #define PT_DESL 58
  100. #define PT_COAL 59
  101. #define PT_LO2  60
  102. #define PT_O2   61
  103. #define PT_INWR 62
  104. #define PT_YEST 63
  105. #define PT_DYST 64
  106. #define PT_THRM 65
  107. #define PT_GLOW 66
  108. #define PT_BRCK 67
  109. #define PT_HOTS 68
  110. #define PT_STEL 69
  111. #define PT_NUM  70
  112.  
  113. #define R_TEMP 22
  114. #define MAX_TEMP 9999
  115. #define MIN_TEMP 0
  116. #define O_MAX_TEMP 3500
  117. #define O_MIN_TEMP -273
  118. #define CDFS
  119.  
  120. #define ST_NONE 0
  121. #define ST_SOLID 1
  122. #define ST_LIQUID 2
  123. #define ST_GAS 3
  124. /*
  125.    We should start to implement these.
  126. */
  127. static const unsigned short TYPE_PART       = 0x01; //1
  128. static const unsigned short TYPE_LIQUID = 0x02; //2
  129. static const unsigned short TYPE_SOLID  = 0x04; //4
  130. static const unsigned short TYPE_GAS        = 0x08; //8
  131. static const unsigned short PROP_CONDUCTS   = 0x10; //16
  132. static const unsigned short PROP_DEADLY   = 0x12; //18 Is deadly for stickman.
  133. #define FLAG_STAGNANT   1
  134.  
  135. struct particle
  136. {
  137.     int type;
  138.     int life, ctype;
  139.     float x, y, vx, vy;
  140.     float temp;
  141.     float pavg[2];
  142.     int flags;
  143.     int tmp;
  144. };
  145. typedef struct particle particle;
  146.  
  147. struct part_type
  148. {
  149.     const char *name;
  150.     pixel pcolors;
  151.     float advection;
  152.     float airdrag;
  153.     float airloss;
  154.     float loss;
  155.     float collision;
  156.     float gravity;
  157.     float diffusion;
  158.     float hotair;
  159.     int falldown;
  160.     int flammable;
  161.     int explosive;
  162.     int meltable;
  163.     int hardness;
  164.     int menu;
  165.     int menusection;
  166.     float heat;
  167.     unsigned char hconduct;
  168.     const char *descs;
  169.     const unsigned short properties;
  170. };
  171. typedef struct part_type part_type;
  172.  
  173. struct part_state
  174. {
  175.     char state;
  176.     int solid;
  177.     float stemp;
  178.     int liquid;
  179.     float ltemp;
  180.     int gas;
  181.     float gtemp;
  182.     int burn;
  183.     float btemp;
  184. };
  185. typedef struct part_state part_state;
  186. //Should probably be const.
  187. static const part_type ptypes[PT_NUM] =
  188. {
  189.     //Name      Colour              Advec   Airdrag         Airloss Loss    Collid  Grav    Diffus  Hotair          Fal Burn    Exp Mel Hrd M   Section         H               Ins(real world, by triclops200) Description
  190.     {"",        PIXPACK(0x000000),  0.0f,   0.00f * CFDS,   1.00f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_SPECIAL,     R_TEMP+0.0f +273.15f,   251,    "Erases particles."},
  191.     {"DUST",    PIXPACK(0xFFE0A0),  0.7f,   0.02f * CFDS,   0.96f,  0.80f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 1,  10,     0,  0,  30, 1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   70,     "Very light dust. Flammable."},
  192.     {"WATR",    PIXPACK(0x2030D0),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  0,      0,  0,  20, 1,  SC_LIQUID,      R_TEMP+-2.0f+273.15f,   29,     "Liquid. Conducts electricity. Freezes. Extinguishes fires."},
  193.     {"OIL",     PIXPACK(0x404010),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  20,     0,  0,  5,  1,  SC_LIQUID,      R_TEMP+0.0f +273.15f,   42,     "Liquid. Flammable. Solidifies under pressure"},
  194.     {"FIRE",    PIXPACK(0xFF1000),  0.9f,   0.04f * CFDS,   0.97f,  0.20f,  0.0f,   -0.1f,  0.00f,  0.001f  * CFDS, 1,  0,      0,  0,  1,  1,  SC_EXPLOSIVE,   R_TEMP+400.0f+273.15f,  88,     "Ignites flammable materials. Heats air."},
  195.     {"STNE",    PIXPACK(0xA0A0A0),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  5,  1,  1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   150,    "Heavy particles. Meltable."},
  196.     {"LAVA",    PIXPACK(0xE05010),  0.3f,   0.02f * CFDS,   0.95f,  0.80f,  0.0f,   0.15f,  0.00f,  0.0003f * CFDS, 2,  0,      0,  0,  2,  1,  SC_LIQUID,      R_TEMP+1500.0f+273.15f, 60,     "Heavy liquid. Ignites flammable materials. Solidifies when cold."},
  197.     {"GUN",     PIXPACK(0xC0C0D0),  0.7f,   0.02f * CFDS,   0.94f,  0.80f,  -0.1f,  0.1f,   0.00f,  0.000f  * CFDS, 1,  600,    1,  0,  10, 1,  SC_EXPLOSIVE,   R_TEMP+0.0f +273.15f,   97,     "Light dust. Explosive."},
  198.     {"NITR",    PIXPACK(0x20E010),  0.5f,   0.02f * CFDS,   0.92f,  0.97f,  0.0f,   0.2f,   0.00f,  0.000f  * CFDS, 2,  1000,   2,  0,  3,  1,  SC_EXPLOSIVE,   R_TEMP+0.0f +273.15f,   50,     "Liquid. Pressure sensitive explosive."},
  199.     {"CLNE",    PIXPACK(0xFFD010),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_SPECIAL,     R_TEMP+0.0f +273.15f,   251,    "Solid. Duplicates any particles it touches."},
  200.     {"GAS",     PIXPACK(0xE0FF20),  1.0f,   0.01f * CFDS,   0.99f,  0.30f,  -0.1f,  0.0f,   0.75f,  0.001f  * CFDS, 0,  600,    0,  0,  1,  1,  SC_GAS,         R_TEMP+2.0f +273.15f,   42,     "Gas. Diffuses. Flammable. Liquifies under pressure."},
  201.     {"C-4",     PIXPACK(0xD080E0),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  1000,   2,  50, 1,  1,  SC_EXPLOSIVE,   R_TEMP+0.0f +273.15f,   88,     "Solid. Pressure sensitive explosive."},
  202.     {"GOO",     PIXPACK(0x804000),  0.1f,   0.00f * CFDS,   0.97f,  0.50f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  12, 1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   75,     "Solid. Deforms and disappears under pressure."},
  203.     {"ICE",     PIXPACK(0xA0C0FF),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  -0.0003f* CFDS, 0,  0,      0,  0,  20, 1,  SC_SOLIDS,      R_TEMP+-50.0f+273.15f,  46,     "Solid. Freezes water. Crushes under pressure. Cools down air."},
  204.     {"METL",    PIXPACK(0x404060),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Solid. Conducts electricity. Meltable."},
  205.     {"SPRK",    PIXPACK(0xFFFF80),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.001f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Electricity. Conducted by metal and water."},
  206.     {"SNOW",    PIXPACK(0xC0E0FF),  0.7f,   0.01f * CFDS,   0.96f,  0.90f,  -0.1f,  0.05f,  0.01f,  -0.00005f* CFDS,1,  0,      0,  0,  20, 1,  SC_POWDERS,     R_TEMP+-30.0f+273.15f,  46,     "Light particles."},
  207.     {"WOOD",    PIXPACK(0xC0A040),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  20,     0,  0,  15, 1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   164,    "Solid. Flammable. Can be pressurised into COAL"},
  208.     {"NEUT",    PIXPACK(0x20E0FF),  0.0f,   0.00f * CFDS,   1.00f,  1.00f,  -0.99f, 0.0f,   0.01f,  0.002f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_NUCLEAR,     R_TEMP+4.0f +273.15f,   60,     "Neutrons. Interact with matter in odd ways."},
  209.     {"PLUT",    PIXPACK(0x407020),  0.4f,   0.01f * CFDS,   0.99f,  0.95f,  0.0f,   0.4f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  0,  0,  1,  SC_NUCLEAR,     R_TEMP+4.0f +273.15f,   251,    "Heavy particles. Fissile. Generates neutrons under pressure."},
  210.     {"PLNT",    PIXPACK(0x0CAC00),  0.0f,   0.00f * CFDS,   0.95f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  20,     0,  0,  10, 1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   65,     "Plant, drinks water and grows."},
  211.     {"ACID",    PIXPACK(0xed55ff),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  40,     0,  0,  1,  1,  SC_LIQUID,      R_TEMP+0.0f +273.15f,   34,     "Dissolves almost everything."},
  212.     {"VOID",    PIXPACK(0x790B0B),  0.0f,   0.00f * CFDS,   1.00f,  0.00f,  0.0f,   0.0f,   0.00f,  -0.0003f* CFDS, 0,  0,      0,  0,  0,  1,  SC_SPECIAL,     R_TEMP+0.0f +273.15f,   251,    "Hole, will drain away any particles."},
  213.     {"WTRV",    PIXPACK(0xA0A0FF),  1.0f,   0.01f * CFDS,   0.99f,  0.30f,  -0.1f,  -0.1f,  0.75f,  0.0003f * CFDS, 0,  0,      0,  0,  4,  1,  SC_GAS,         R_TEMP+100.0f+273.15f,  48,     "Steam, heats up air, produced from hot water."},
  214.     {"CNCT",    PIXPACK(0xC0C0C0),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  2,  25, 1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   100,    "Concrete, stronger than stone."},
  215.     {"DSTW",    PIXPACK(0x1020C0),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  0,      0,  0,  20, 1,  SC_LIQUID,      R_TEMP+-2.0f+273.15f,   23,     "Distilled water, does not conduct electricity."},
  216.     {"SALT",    PIXPACK(0xFFFFFF),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  5,  1,  1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   110,    "Salt, dissolves in water."},
  217.     {"SLTW",    PIXPACK(0x4050F0),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  0,      0,  0,  20, 1,  SC_LIQUID,      R_TEMP+0.0f +273.15f,   75,     "Saltwater, conducts electricity, difficult to freeze."},
  218.     {"DMND",    PIXPACK(0xCCFFFF),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_SPECIAL,     R_TEMP+0.0f +273.15f,   186,    "Diamond. Indestructable."}, //ief015 - Added diamond. Because concrete blocks are kinda pointless.
  219.     {"BMTL",    PIXPACK(0x505070),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   251,    "Breakable metal."},
  220.     {"BRMT",    PIXPACK(0x705060),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  2,  2,  1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   211,    "Broken metal."},
  221.     {"PHOT",    PIXPACK(0xFFFFFF),  0.0f,   0.00f * CFDS,   1.00f,  1.00f,  -0.99f, 0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_ELEC,        R_TEMP+900.0f+273.15f,  251,    "Photons. Travel in straight lines."},
  222.     {"URAN",    PIXPACK(0x707020),  0.4f,   0.01f * CFDS,   0.99f,  0.95f,  0.0f,   0.4f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  0,  0,  1,  SC_NUCLEAR,     R_TEMP+30.0f+273.15f,   251,    "Heavy particles. Generates heat under pressure."},
  223.     {"WAX",     PIXPACK(0xF0F0BB),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  10, 1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   44,     "Wax. Melts at moderately high temperatures."},
  224.     {"MWAX",    PIXPACK(0xE0E0AA),  0.3f,   0.02f * CFDS,   0.95f,  0.80f,  0.0f,   0.15f,  0.00f,  0.000001f* CFDS,2,  5,      0,  0,  2,  1,  SC_LIQUID,      R_TEMP+28.0f+273.15f,   44,     "Liquid Wax."},
  225.     {"PSCN",    PIXPACK(0x805050),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "P-Type Silicon, Will transfer current to any conductor."},
  226.     {"NSCN",    PIXPACK(0x505080),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "N-Type Silicon, Will only transfer current to P-Type Silicon."},
  227.     {"LN2",     PIXPACK(0x80A0DF),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  0,      0,  0,  0,  1,  SC_LIQUID,      70.15f,                 70,     "Liquid Nitrogen. Very cold."},
  228.     {"INSL",    PIXPACK(0x9EA3B6),  0.0f,   0.00f * CFDS,   0.95f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  7,      0,  0,  10, 1,  SC_SPECIAL,     R_TEMP+0.0f +273.15f,   0,      "Insulator, does not conduct heat or electricity."},
  229.     {"BHOL",    PIXPACK(0x202020),  0.0f,   0.00f * CFDS,   0.95f,  0.00f,  0.0f,   0.0f,   0.00f,  -0.01f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_SPECIAL,     R_TEMP+70.0f+273.15f,   255,    "Black hole, sucks in other particles and heats up."},
  230.     {"WHOL",    PIXPACK(0xEFEFEF),  0.0f,   0.00f * CFDS,   0.95f,  0.00f,  0.0f,   0.0f,   0.00f,  0.010f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_SPECIAL,     R_TEMP-16.0f+273.15f,   255,    "White hole, pushes other particles away."},
  231.     {"RBDM",    PIXPACK(0xCCCCCC),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  1000,   1,  50, 1,  1,  SC_EXPLOSIVE,   R_TEMP+0.0f +273.15f,   240,    "Rubidium, explosive, especially on contact with water, low melting point"},
  232.     {"LRBD",    PIXPACK(0xAAAAAA),  0.3f,   0.02f * CFDS,   0.95f,  0.80f,  0.0f,   0.15f,  0.00f,  0.000001f* CFDS,2,  1000,   1,  0,  2,  1,  SC_EXPLOSIVE,   R_TEMP+45.0f+273.15f,   170,    "Liquid Rubidium."},
  233.     {"NTCT",    PIXPACK(0x505040),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Semi-conductor. Only conducts electricity when hot (More than 100C)"},
  234.     {"SAND",    PIXPACK(0xFFD090),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  5,  1,  1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   150,    "Sand, Heavy particles. Meltable."},
  235.     {"GLAS",    PIXPACK(0x404040),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_SOLIDS,      R_TEMP+0.0f +273.15f,   150,    "Solid. Meltable. Shatters under pressure"},
  236.     {"PTCT",    PIXPACK(0x405050),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Semi-conductor. Only conducts electricity when cold (Less than 120C)"},
  237.     {"BGLA",    PIXPACK(0x606060),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  5,  2,  1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   150,    "Broken Glass, Heavy particles. Meltable. Bagels."},
  238.     {"THDR",    PIXPACK(0xFFFFA0),  0.0f,   0.00f * CFDS,   1.0f,   0.30f,  -0.99f, 0.6f,   0.62f,  0.000f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_ELEC,        9000.0f     +273.15f,   251,    "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."},
  239.     {"PLSM",    PIXPACK(0xBB99FF),  0.9f,   0.04f * CFDS,   0.97f,  0.20f,  0.0f,   -0.1f,  0.30f,  0.001f  * CFDS, 0,  0,      0,  0,  0,  1,  SC_GAS,         9000.0f     +273.15f,   115,    "Plasma, extremely hot."},
  240.     {"ETRD",    PIXPACK(0x404040),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)"},
  241.     {"NICE",    PIXPACK(0xC0E0FF),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  -0.0005f* CFDS, 0,  0,      0,  0,  20, 1,  SC_SOLIDS,      35.0f,                  46,     "Nitrogen Ice."},
  242.     {"NBLE",    PIXPACK(0xEB4917),  1.0f,   0.01f * CFDS,   0.99f,  0.30f,  -0.1f,  0.0f,   0.75f,  0.001f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_GAS,         R_TEMP+2.0f +273.15f,   106,    "Noble Gas. Diffuses. Conductive. Ionizes into plasma when intruduced to electricity"},
  243.     {"BTRY",    PIXPACK(0x858505),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Solid. Generates Electricity."},
  244.     {"LCRY",    PIXPACK(0x505050),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)"},
  245.     {"STKM",    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,  SC_SPECIAL,     R_TEMP+14.6f+273.15f,   0,      "Stickman. Don't kill him!"},
  246.     {"SWCH",    PIXPACK(0x103B11),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Solid. Only conducts when switched on. (PSCN switches on, NSCN switches off)"},
  247.     {"SMKE",    PIXPACK(0x222222),  0.9f,   0.04f * CFDS,   0.97f,  0.20f,  0.0f,   -0.1f,  0.00f,  0.001f  * CFDS, 1,  0,      0,  0,  1,  1,  SC_GAS,         R_TEMP+400.0f+273.15f,  88,     "Smoke"},
  248.     {"DESL",    PIXPACK(0x440000),  1.0f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.0f,   0.0f    * CFDS, 2,  2,      0,  0,  5,  1,  SC_LIQUID,      R_TEMP+0.0f +273.15f,   42,     "Liquid. Vaporises under low pressure, explodes under high pressure and temperatures"},
  249.     {"COAL",    PIXPACK(0x222222),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.0f,   0.0f    * CFDS, 0,  0,     0,  0,  20, 1,  SC_SOLIDS,      R_TEMP+0.0f  +273.15f,   200,    "Solid. Burns slowly."},
  250.     {"LO2",     PIXPACK(0x80A0EF),  0.6f,   0.01f * CFDS,   0.98f,  0.95f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 2,  5000,   0,  0,  0,  1,  SC_LIQUID,      80.0f,                  70,     "Liquid Oxygen. Very cold. Reacts with fire"},
  251.     {"O2",      PIXPACK(0x80A0FF),  2.0f,   0.00f * CFDS,   0.99f,  0.30f,  -0.1f,  0.0f,   3.0f,   0.000f  * CFDS, 0,  1000,   0,  0,  0,  1,  SC_GAS,         R_TEMP+0.0f +273.15f,   70,     "Gas. Ignites easily."},
  252.     {"INWR",    PIXPACK(0x544141),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  1,  1,  1,  SC_ELEC,        R_TEMP+0.0f +273.15f,   251,    "Insulated Wire. Doesn't conduct to metal or semiconductors."},
  253.     {"YEST",    PIXPACK(0xEEE0C0),  0.7f,   0.02f * CFDS,   0.96f,  0.80f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 1,  15,     0,  0,  30, 1,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   70,     "Yeast, grows when warm (~37C)."},
  254.     {"DYST",    PIXPACK(0xBBB0A0),  0.7f,   0.02f * CFDS,   0.96f,  0.80f,  0.0f,   0.1f,   0.00f,  0.000f  * CFDS, 1,  20,     0,  0,  30, 0,  SC_POWDERS,     R_TEMP+0.0f +273.15f,   70,     "Deat Yeast."},
  255.     {"THRM",    PIXPACK(0xA08090),  0.4f,   0.04f * CFDS,   0.94f,  0.95f,  -0.1f,  0.3f,   0.00f,  0.000f  * CFDS, 1,  0,      0,  2,  2,  1,  SC_EXPLOSIVE,       R_TEMP+0.0f +273.15f,   211,    "Thermite."},
  256.     {"GLOW",    PIXPACK(0x445544),  0.3f,   0.02f * CFDS,   0.95f,  0.80f,  0.0f,   0.15f,  0.00f,  0.000f  * CFDS, 2,  0,      0,  0,  2,  1,  SC_LIQUID,      R_TEMP+20.0f  +273.15f, 44,     "Glow."},
  257.     {"BRCK",    PIXPACK(0x808080),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0,  1,  1,  SC_SOLIDS,      R_TEMP+0.0f   +273.15f, 251,    "Brick, breakable building material."},
  258.     {"HOTS",    PIXPACK(0xFFFFFF),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  0, 0,   1,  SC_SPECIAL,     R_TEMP+300.0f +273.15f, 115,    "Solid, heats elements on touch, releases small pressure"},
  259.     {"STEL",    PIXPACK(0xB3AFAF),  0.0f,   0.00f * CFDS,   0.90f,  0.00f,  0.0f,   0.0f,   0.00f,  0.000f  * CFDS, 0,  0,      0,  50, 1,  1,  SC_ELEC,        R_TEMP+0.0f   +273.15f, 251,    "Solid, transfers SPRK, melts at high temperatures"},
  260.     //Name      Colour              Advec   Airdrag         Airloss Loss    Collid  Grav    Diffus  Hotair          Fal Burn    Exp Mel Hrd M   Section         H               Ins(real world, by triclops200) Description
  261. };
  262.  
  263. static part_state pstates[PT_NUM] =
  264. {
  265.     // Name                 Solid    Frzp       Liquid   Mpnt       Gas    Bpoint
  266.     /* NONE */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  267.     /* DUST */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  268.     /* WATR */ {ST_LIQUID,  PT_ICEI, 273.15f,   PT_NONE, 0.0f,      PT_WTRV, 373.0f,    PT_NONE, 0.0f},
  269.     /* OIL  */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_GAS, 333.0f,     PT_NONE, 0.0f},
  270.     /* FIRE */ {ST_GAS,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_PLSM, 2773.0f},
  271.     /* STNE */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 983.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  272.     /* LAVA */ {ST_LIQUID,  PT_STNE, 973.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  273.     /* GUN  */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 673.0f},
  274.     /* NITR */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 673.0f},
  275.     /* CLNE */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  276.     /* GAS  */ {ST_GAS,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 50.0f,     PT_FIRE, 573.0f},
  277.     /* C-4  */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 673.0f},
  278.     /* GOO  */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  279.     /* ICE  */ {ST_SOLID,   PT_NONE, 0.0f,      PT_WATR, 274.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  280.     /* METL */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1273.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  281.     /* SPRK */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  282.     /* SNOW */ {ST_SOLID,   PT_NONE, 0.0f,      PT_WATR, 273.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  283.     /* WOOD */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 873.0f},
  284.     /* NEUT */ {ST_GAS,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  285.     /* PLUT */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  286.     /* PLNT */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 573.0f},
  287.     /* ACID */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  288.     /* VOID */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  289.     /* WTRV */ {ST_GAS,     PT_ICEI, 273.0f,    PT_DSTW, 371.0f,    PT_NONE, 373.0f,    PT_NONE, 0.0f},
  290.     /* CNCT */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1123.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  291.     /* DSTW */ {ST_LIQUID,  PT_ICEI, 273.15f,   PT_NONE, 0.0f,      PT_WTRV, 373.0f,    PT_NONE, 0.0f},
  292.     /* SALT */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1173.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  293.     /* SLTW */ {ST_LIQUID,  PT_ICEI, 233.0f,    PT_NONE, 0.0f,      PT_WTRV, 483.0f,    PT_NONE, 0.0f},
  294.     /* DMND */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  295.     /* BMTL */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1273.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  296.     /* BRMT */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1273.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  297.     /* PHOT */ {ST_GAS,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  298.     /* URAN */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 2373.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  299.     /* WAX  */ {ST_SOLID,   PT_NONE, 0.0f,      PT_MWAX, 319.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  300.     /* MWAX */ {ST_LIQUID,  PT_WAX, 318.0f,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 673.0f},
  301.     /* PSCN */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1687.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  302.     /* NSCN */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1687.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  303.     /* LNTG */ {ST_SOLID,   PT_NICE, 63.0f,     PT_NONE, 0.0f,      PT_NONE, 77.0f,     PT_NONE, 0.0f},
  304.     /* FOAM */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  305.     /* BHOL */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  306.     /* WHOL */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  307.     /* RBDM */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LRBD, 312.0f,    PT_NONE, 0.0f,      PT_FIRE, 961.0f},
  308.     /* LRBD */ {ST_LIQUID,  PT_RBDM, 311.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 961.0f},
  309.     /* HSCN */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1687.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  310.     /* SAND */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1973.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  311.     /* GLAS */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1973.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  312.     /* CSCN */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1414.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  313.     /* BGLA */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1973.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  314.     /* THDR */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  315.     /* PLSM */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  316.     /* ETRD */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  317.     /* NICE */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LNTG, 63.1f,     PT_NONE, 0.0f,      PT_NONE, 0.0f},
  318.     /* NBLE */ {ST_GAS,     PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  319.     /* BTRY */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_PLSM, 2273.0f},
  320.     /* LCRY */ {ST_SOLID,   PT_NONE, 0.0f,      PT_BGLA, 1273.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  321.     /* STKM */ {ST_NONE,    PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 620.0f},
  322.     /* SWCH */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  323.     /* SMKE */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 625.0f},
  324.     /* DESL */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_FIRE, 335.0f},
  325.     /* COAL */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  326.     /* LO2  */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_O2,   90.1f,     PT_NONE, 0.0f},
  327.     /* O2   */ {ST_GAS,     PT_NONE, 0.0f,      PT_LO2,  90.0f,     PT_NONE, 0.0f,      PT_NONE, 0.0f},
  328.     /* INWR */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1687.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  329.     /* YEST */ {ST_SOLID,   PT_NONE, 0.0f,      PT_DYST, 373.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  330.     /* DYST */ {ST_SOLID,   PT_NONE, 0.0f,      PT_DUST, 473.0f,    PT_NONE, 0.0f,      PT_NONE, 0.0f},
  331.     /* THRM */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  332.     /* GLOW */ {ST_LIQUID,  PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  333.     /* BRCK */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 1223.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  334.     /* HOTS */ {ST_SOLID,   PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f,      PT_NONE, 0.0f},
  335.     /* STEL */ {ST_SOLID,   PT_NONE, 0.0f,      PT_LAVA, 3000.0f,   PT_NONE, 0.0f,      PT_NONE, 0.0f},
  336. };
  337.  
  338. static unsigned char can_move[PT_NUM][PT_NUM] =
  339. {
  340.     /*   A B */
  341.     /* A 0 1 | B ligher than A */
  342.     /* B 1 0 | A heavier than B */
  343.  
  344.     /*          N D W O F S L G N C G P D I M S S W N P P A V W C D S S D B B P U W M P N L I B W R L H S G C B T P E N N B L S S S D C L O I Y H*/
  345.     /*          o u a i i t a u i l a l f c e p n o e l l c o t n s a l m m r h r a W S S N N H H b R S a l s G h l t i B t C T W M e o O 2 N E O*/
  346.     /*          n s t l r n v n t n s e r e t r o o u u n i i r c t l t n t m o a x a c c 2 S o o d b C n a c l d s r c L r r K C K s a X   W S T*/
  347.     /*          e t r l e e a p r e s x m i l k w d t t t d d v t w t w d l t t n   x n n   U l l m d N d s n a r m d e E y y M H E l l     R T S*/
  348.     /* NONE */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* None */
  349.     /* DUST */ {0,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0}, /* Dust */
  350.     /* WATR */ {0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0}, /* Watr */
  351.     /* OILL */ {0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, /* Oill */
  352.     /* FIRE */ {0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Fire */
  353.     /* STNE */ {0,1,1,1,0,0,1,1,1,0,1,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1,1,1,0,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,0,0,0,0,0}, /* Plex */
  360.     /* DFRM */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Dfrm */
  361.     /* ICEI */ {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}, /* Icei */
  362.     /* METL */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Metl */
  363.     /* SPRK */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Sprk */
  364.     /* SNOW */ {0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0}, /* Snow */
  365.     /* WOOD */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Wood */
  366.     /* NEUT */ {0,1,1,1,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1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0,0,0,0,0}, /* Swch */
  405.     /* SMKE */ {0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Smke */
  406.     /* DESL */ {0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Desl */
  407.     /* COAL */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* Coal */
  408.     /* LO2  */ {0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0}, /* LO2  */
  409.     /* O2   */ {0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,0}, /* O2  */
  410.     /* INWR */ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, /* INWR */
  411.     /* YEST */ {0,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1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},
  418.     /*          N D W O F S L G N C G P D I W S S W N P P A V W C D S S D B B P U W M P N L I B W R L H S G C B T P E N N B L S S S D C L O I Y D T G H S */
  419.     /*          o u a i i t a u i l a l f c i p n o e l l c o t n s a l m m r h r a W S S N n H H b R S a l s G h l t i B t C T W M e o O 2 N E y h l O T */
  420.     /*          n s t l r n v n t n s e r e r r o o u u n i i r c t l t n t m o a x a c c 2 s o o d b C n a c l d s r c L r r K C K s a X   W S s r o T E */
  421.     /*          e t r l e e a p r e s x m i e k w d t t t d d v t w t w d l t t n   x n n   u l l m d N d s n a r m d e E y y M H E l l     R T t m w S L */
  422. };
  423.  
  424. extern int isplayer;
  425. extern float player[27];
  426.  
  427. extern particle *parts;
  428. extern particle *cb_parts;
  429.  
  430. extern unsigned char bmap[YRES/CELL][XRES/CELL];
  431. extern unsigned char emap[YRES/CELL][XRES/CELL];
  432.  
  433. extern unsigned char cb_bmap[YRES/CELL][XRES/CELL];
  434. extern unsigned char cb_emap[YRES/CELL][XRES/CELL];
  435.  
  436. extern int pfree;
  437.  
  438. extern unsigned pmap[YRES][XRES];
  439. unsigned cb_pmap[YRES][XRES];
  440.  
  441. int try_move(int i, int x, int y, int nx, int ny);
  442.  
  443. void kill_part(int i);
  444.  
  445. #ifdef WIN32
  446. extern _inline int create_part(int p, int x, int y, int t);
  447. #else
  448. extern inline int create_part(int p, int x, int y, int t);
  449. #endif
  450.  
  451. #ifdef WIN32
  452. extern _inline void delete_part(int x, int y);
  453. #else
  454. extern inline void delete_part(int x, int y);
  455. #endif
  456.  
  457. #ifdef WIN32
  458. extern _inline int is_wire(int x, int y);
  459. #else
  460. extern inline int is_wire(int x, int y);
  461. #endif
  462.  
  463. #ifdef WIN32
  464. extern _inline int is_wire_off(int x, int y);
  465. #else
  466. extern inline int is_wire_off(int x, int y);
  467. #endif
  468.  
  469. void set_emap(int x, int y);
  470.  
  471. #ifdef WIN32
  472. _inline int parts_avg(int ci, int ni);
  473. #else
  474. inline int parts_avg(int ci, int ni);
  475. #endif
  476.  
  477. int nearest_part(int ci, int t);
  478.  
  479. void update_particles_i(pixel *vid, int start, int inc);
  480.  
  481. void update_particles(pixel *vid);
  482.  
  483. void clear_area(int area_x, int area_y, int area_w, int area_h);
  484.  
  485. void create_box(int x1, int y1, int x2, int y2, int c);
  486.  
  487. int flood_parts(int x, int y, int c, int cm, int bm);
  488.  
  489. int create_parts(int x, int y, int r, int c);
  490.  
  491. void create_line(int x1, int y1, int x2, int y2, int r, int c);
  492.  
  493. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement