console doesn't enable hud, fast heat for PUMP/GPMP/ANIM, GPMP activated at draw
This commit is contained in:
parent
1c7fdb0c26
commit
3959db4c38
@ -199,14 +199,6 @@ extern long debug_perf_frametime[DEBUG_PERF_FRAMECOUNT];
|
|||||||
extern long debug_perf_partitime[DEBUG_PERF_FRAMECOUNT];
|
extern long debug_perf_partitime[DEBUG_PERF_FRAMECOUNT];
|
||||||
extern long debug_perf_time;
|
extern long debug_perf_time;
|
||||||
|
|
||||||
extern int debug_flags;
|
|
||||||
#define DEBUG_PERF_FRAMECOUNT 256
|
|
||||||
extern int debug_perf_istart;
|
|
||||||
extern int debug_perf_iend;
|
|
||||||
extern long debug_perf_frametime[DEBUG_PERF_FRAMECOUNT];
|
|
||||||
extern long debug_perf_partitime[DEBUG_PERF_FRAMECOUNT];
|
|
||||||
extern long debug_perf_time;
|
|
||||||
|
|
||||||
extern int active_menu;
|
extern int active_menu;
|
||||||
|
|
||||||
extern int sys_pause;
|
extern int sys_pause;
|
||||||
|
@ -32,7 +32,6 @@ int tptProperties; //Table for some TPT properties
|
|||||||
int tptPropertiesVersion;
|
int tptPropertiesVersion;
|
||||||
int tptElements; //Table for TPT element names
|
int tptElements; //Table for TPT element names
|
||||||
int tptParts, tptPartsMeta, tptElementTransitions, tptPartsCData, tptPartMeta, tptPart, cIndex;
|
int tptParts, tptPartsMeta, tptElementTransitions, tptPartsCData, tptPartMeta, tptPart, cIndex;
|
||||||
int loop_time = 0;
|
|
||||||
void luacon_open(){
|
void luacon_open(){
|
||||||
int i = 0, j;
|
int i = 0, j;
|
||||||
char tmpname[12];
|
char tmpname[12];
|
||||||
@ -220,7 +219,7 @@ tpt.partsdata = nil");
|
|||||||
{
|
{
|
||||||
lua_el_mode[i] = 0;
|
lua_el_mode[i] = 0;
|
||||||
}
|
}
|
||||||
lua_sethook(l, &lua_hook, LUA_MASKCOUNT, 200);
|
lua_sethook(l, &lua_hook, LUA_MASKCOUNT, 4000000);
|
||||||
}
|
}
|
||||||
#ifndef FFI
|
#ifndef FFI
|
||||||
int luacon_partread(lua_State* l){
|
int luacon_partread(lua_State* l){
|
||||||
|
@ -221,6 +221,7 @@ int frameidx = 0;
|
|||||||
//int CGOL = 0;
|
//int CGOL = 0;
|
||||||
//int GSPEED = 1;//causes my .exe to crash..
|
//int GSPEED = 1;//causes my .exe to crash..
|
||||||
int sound_enable = 0;
|
int sound_enable = 0;
|
||||||
|
int loop_time = 0;
|
||||||
|
|
||||||
int debug_flags = 0;
|
int debug_flags = 0;
|
||||||
int debug_perf_istart = 1;
|
int debug_perf_istart = 1;
|
||||||
@ -2743,8 +2744,6 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(console);
|
free(console);
|
||||||
if (!console_mode)
|
|
||||||
hud_enable = 1;
|
|
||||||
#else
|
#else
|
||||||
char *console;
|
char *console;
|
||||||
sys_pause = 1;
|
sys_pause = 1;
|
||||||
@ -2757,8 +2756,6 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(console);
|
free(console);
|
||||||
if (!console_mode)
|
|
||||||
hud_enable = 1;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
32
src/powder.c
32
src/powder.c
@ -717,23 +717,25 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
{
|
{
|
||||||
if (t==SPC_HEAT&&parts[pmap[y][x]>>8].temp<MAX_TEMP)
|
if (t==SPC_HEAT&&parts[pmap[y][x]>>8].temp<MAX_TEMP)
|
||||||
{
|
{
|
||||||
if ((pmap[y][x]&0xFF)==PT_PUMP || (pmap[y][x]&0xFF)==PT_GPMP) {
|
float heatchange;
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 0.1f, MIN_TEMP, MAX_TEMP);
|
int r = pmap[y][x], fast = ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL)));
|
||||||
} else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) {
|
if ((r&0xFF)==PT_PUMP || (r&0xFF)==PT_GPMP)
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 50.0f, MIN_TEMP, MAX_TEMP);
|
heatchange = fast?1.0f:.1f;
|
||||||
} else {
|
else
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp + 4.0f, MIN_TEMP, MAX_TEMP);
|
heatchange = fast?50.0f:4.0f;
|
||||||
}
|
|
||||||
|
parts[r>>8].temp = restrict_flt(parts[r>>8].temp + heatchange, MIN_TEMP, MAX_TEMP);
|
||||||
}
|
}
|
||||||
if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP)
|
if (t==SPC_COOL&&parts[pmap[y][x]>>8].temp>MIN_TEMP)
|
||||||
{
|
{
|
||||||
if ((pmap[y][x]&0xFF)==PT_PUMP || (pmap[y][x]&0xFF)==PT_GPMP) {
|
float heatchange;
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 0.1f, MIN_TEMP, MAX_TEMP);
|
int r = pmap[y][x], fast = ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL)));
|
||||||
} else if ((sdl_mod & (KMOD_SHIFT)) && (sdl_mod & (KMOD_CTRL))) {
|
if ((r&0xFF)==PT_PUMP || (r&0xFF)==PT_GPMP)
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 50.0f, MIN_TEMP, MAX_TEMP);
|
heatchange = fast?1.0f:.1f;
|
||||||
} else {
|
else
|
||||||
parts[pmap[y][x]>>8].temp = restrict_flt(parts[pmap[y][x]>>8].temp - 4.0f, MIN_TEMP, MAX_TEMP);
|
heatchange = fast?50.0f:4.0f;
|
||||||
}
|
|
||||||
|
parts[r>>8].temp = restrict_flt(parts[r>>8].temp - heatchange, MIN_TEMP, MAX_TEMP);
|
||||||
}
|
}
|
||||||
return pmap[y][x]>>8;
|
return pmap[y][x]>>8;
|
||||||
}
|
}
|
||||||
@ -963,7 +965,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
parts[i].tmp = 10;
|
parts[i].tmp = 10;
|
||||||
if (t==PT_BRAY)
|
if (t==PT_BRAY)
|
||||||
parts[i].life = 30;
|
parts[i].life = 30;
|
||||||
if (t==PT_PUMP)
|
if (t==PT_PUMP || t==PT_GPMP)
|
||||||
parts[i].life= 10;
|
parts[i].life= 10;
|
||||||
if (t==PT_SING)
|
if (t==PT_SING)
|
||||||
parts[i].life = rand()%50+60;
|
parts[i].life = rand()%50+60;
|
||||||
|
Reference in New Issue
Block a user