summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2010-12-13 01:13:05 (GMT)
committer Cracker64 <cracker642@gmail.com>2010-12-13 01:13:05 (GMT)
commit23f828135a21831adeb5511eb59b6dd2105baf27 (patch)
tree6b5c0c5f09b174d9a2d36c558457890aae64c4d1 /src
parentaf72702434b11a57576ffbafb9112201c092dbae (diff)
downloadpowder-23f828135a21831adeb5511eb59b6dd2105baf27.zip
powder-23f828135a21831adeb5511eb59b6dd2105baf27.tar.gz
updated with icons, and some more fixes.
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/Resources/Font-Databin4442 -> 4482 bytes
-rwxr-xr-x[-rw-r--r--]src/Resources/Font-Pointersbin512 -> 512 bytes
-rw-r--r--src/interface.c7
-rw-r--r--src/main.c9
-rw-r--r--src/powder.c16
5 files changed, 17 insertions, 15 deletions
diff --git a/src/Resources/Font-Data b/src/Resources/Font-Data
index a384152..d684c20 100644..100755
--- a/src/Resources/Font-Data
+++ b/src/Resources/Font-Data
Binary files differ
diff --git a/src/Resources/Font-Pointers b/src/Resources/Font-Pointers
index 621258b..f498375 100644..100755
--- a/src/Resources/Font-Pointers
+++ b/src/Resources/Font-Pointers
Binary files differ
diff --git a/src/interface.c b/src/interface.c
index af679d8..1052a22 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -555,10 +555,11 @@ void draw_svf_ui(pixel *vid_buf)
drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\x00", 100, 150, 255, 255);
break;
case CM_CRACK:
- drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\x00", 100, 150, 255, 255);
+ drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD4", 255, 55, 55, 255);
+ drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD5", 55, 255, 55, 255);
break;
case CM_GRAD:
- drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\x00", 100, 150, 255, 255);
+ drawtext(vid_buf, XRES-29+BARSIZE/*481*/, YRES+(MENUSIZE-13), "\xD3", 255, 50, 255, 255);
break;
}
drawrect(vid_buf, XRES-32+BARSIZE/*478*/, YRES+(MENUSIZE-16), 14, 14, 255, 255, 255, 255);
@@ -2321,7 +2322,7 @@ int search_ui(pixel *vid_buf)
lasttime = TIMEOUT;
}
- if(b && !bq && dp!=-1 && search_fav!=0)
+ if(b && !bq && dp!=-1 && search_fav==0)
if(confirm_ui(vid_buf, "Do you want to delete?", search_names[dp], "Delete"))
{
execute_delete(vid_buf, search_ids[dp]);
diff --git a/src/main.c b/src/main.c
index e45c805..eaba83b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1630,7 +1630,12 @@ int main(int argc, char *argv[])
sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
#else
if(DEBUG_MODE)
- sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[parts[cr>>8].ctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
+ {
+ int tctype = parts[cr>>8].ctype;
+ if(tctype>=PT_NUM)
+ tctype = 0;
+ sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[tctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
+ }
else
sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f);
#endif
@@ -2266,7 +2271,7 @@ int main(int argc, char *argv[])
sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS);
#else
if(DEBUG_MODE)
- sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION);
+ sprintf(uitext, "Version %d.%d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION);
else
sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPSB);
#endif
diff --git a/src/powder.c b/src/powder.c
index 34352f5..70bb269 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -852,7 +852,7 @@ inline int parts_avg(int ci, int ni,int t)
int nearest_part(int ci, int t)
{
- int distance = sqrt(pow(XRES, 2)+pow(YRES, 2));
+ int distance = MAX_DISTANCE;
int ndistance = 0;
int id = -1;
int i = 0;
@@ -2604,15 +2604,11 @@ void update_particles_i(pixel *vid, int start, int inc)
continue;
if(parts[r>>8].type!=PT_WARP&&parts[r>>8].type!=PT_STKM&&parts[r>>8].type!=PT_DMND&&parts[r>>8].type!=PT_CLNE&&parts[r>>8].type!=PT_BCLN&&parts[r>>8].type!=PT_PCLN&&(10>=rand()%200))
{
- t = parts[i].type = parts[r>>8].type;
- parts[i].ctype = parts[r>>8].ctype;
- parts[i].life = parts[r>>8].life;
- parts[i].tmp = parts[r>>8].tmp;
- parts[i].temp = parts[r>>8].temp;
- parts[i].vx = parts[r>>8].vx;
- parts[i].vy = parts[r>>8].vy;
- parts[r>>8].type = PT_WARP;
- parts[r>>8].life = rand()%90+1;
+ parts[i].x = parts[r>>8].x;
+ parts[i].y = parts[r>>8].y;
+ parts[r>>8].x = x;
+ parts[r>>8].y = y;
+ parts[i].life += 4;
trade = 5;
}
}