diff options
| author | Cracker64 <cracker642@gmail.com> | 2010-12-06 02:56:46 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2010-12-06 02:56:46 (GMT) |
| commit | efb7c6bc9c1524314b67bf10ee821eefe65e2aeb (patch) | |
| tree | f7c57489018eaab4ffd3f11f27396042e0283e33 /src | |
| parent | 2cf25c8a6aad84b2f86060e791948a0aed307192 (diff) | |
| download | powder-efb7c6bc9c1524314b67bf10ee821eefe65e2aeb.zip powder-efb7c6bc9c1524314b67bf10ee821eefe65e2aeb.tar.gz | |
updated with simon's changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics.c | 2 | ||||
| -rw-r--r-- | src/interface.c | 18 | ||||
| -rw-r--r-- | src/main.c | 33 |
3 files changed, 26 insertions, 27 deletions
diff --git a/src/graphics.c b/src/graphics.c index 5476bf7..bba3890 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1409,7 +1409,7 @@ void draw_parts(pixel *vid) cb = PIXB(ptypes[t].pcolors); blendpixel(vid, nx, ny, cr, cg, cb, 255); } - if(cmode==CM_GRAD) + else if(cmode==CM_GRAD) { float frequency = 0.05; int q = parts[i].temp; diff --git a/src/interface.c b/src/interface.c index 4925211..044b65c 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1491,7 +1491,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, height = (ceil((float)msections[i].itemcount/16.0f)*18); width = restrict_flt(msections[i].itemcount*31, 0, 16*31); h = -1; - x = XRES-BARSIZE-26; + x = XRES-BARSIZE-18; y = YRES+1; sy = y; if(i==SC_WALL) @@ -1500,9 +1500,9 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(n!=SPC_AIR&&n!=SPC_HEAT&&n!=SPC_COOL&&n!=SPC_VACUUM) { - if(x-26<=20) + if(x-18<=20) { - x = XRES-BARSIZE-26; + x = XRES-BARSIZE-18; y += 19; } x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-UI_WALLSTART].colour)+5; @@ -1537,9 +1537,9 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(n==SPC_AIR||n==SPC_HEAT||n==SPC_COOL||n==SPC_VACUUM) { - if(x-26<=20) + if(x-18<=20) { - x = XRES-BARSIZE-26; + x = XRES-BARSIZE-18; y += 19; } x -= draw_tool_xy(vid_buf, x, y, n, mwalls[n-UI_WALLSTART].colour)+5; @@ -1571,9 +1571,9 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(ptypes[n].menusection==i&&ptypes[n].menu==1) { - if(x-26<=20) + if(x-18<=20) { - x = XRES-BARSIZE-26; + x = XRES-BARSIZE-18; y += 19; } x -= draw_tool_xy(vid_buf, x, y, n, ptypes[n].pcolors)+5; @@ -1608,9 +1608,9 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(ptypes[n].menusection==i&&ptypes[n].menu==1) { - if(x-26<=20) + if(x-18<=20) { - x = XRES-BARSIZE-26; + x = XRES-BARSIZE-18; y += 19; } x -= draw_tool_xy(vid_buf, x, y, n, ptypes[n].pcolors)+5; @@ -6,6 +6,7 @@ * Copyright (c) 2010 Skresanov Savely * Copyright (c) 2010 Bryan Hoyle * Copyright (c) 2010 Nathan Cousins + * Copyright (c) 2010 cracker64 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +52,7 @@ #include <icon.h> static const char *it_msg = - "\brThe Powder Toy\n" + "\brThe Powder Toy - http://powdertoy.co.uk/\n" "\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\n" "\n" "\bgControl+C/V/X are Copy, Paste and cut respectively.\n" @@ -68,18 +69,16 @@ static const char *it_msg = "'L' will load the most recent stamp, 'K' shows a library of stamps you saved.\n" "'C' will cycle the display mode (Fire, Blob, Velocity and Pressure). The numbers 1 to 7 will do the same\n" "Use the mouse scroll wheel to change the tool size for particles.\n" - "'Q' will quit the application.\n" "The spacebar can be used to pause physics.\n" "'P' will take a screenshot and save it into the current directory.\n" "\n" - "\brhttp://powdertoy.co.uk/\n" "\bgCopyright (c) 2008-10 Stanislaw K Skowronek (\brhttp://powder.unaligned.org\bg, \bbirc.unaligned.org #wtf\bg)\n" "\bgCopyright (c) 2010 Simon Robertshaw (\brhttp://powdertoy.co.uk\bg, \bbirc.freenode.net #powder\bg)\n" "\bgCopyright (c) 2010 Skresanov Savely (Stickman)\n" + "\bgCopyright (c) 2010 cracker64\n" "\bgCopyright (c) 2010 Bryan Hoyle (New elements)\n" "\bgCopyright (c) 2010 Nathan Cousins (New elements, small engine mods.)\n" "\n" - "\bgSpecial thanks to Brian Ledbetter for maintaining ports.\n" "\bgTo use online features such as saving, you need to register at: \brhttp://powdertoy.co.uk/Register.html" ; @@ -2186,23 +2185,23 @@ int main(int argc, char *argv[]) } if(currentTime-pastFPS>=1000) { -#ifdef BETA - if(REPLACE_MODE) - sprintf(uitext, "Cracker's V%d FPS:%d Parts:%d REPLACE MODE", SAVE_VERSION, FPS,NUM_PARTS); - else if(sdl_mod&(KMOD_CAPS)) - sprintf(uitext, "Cracker's V%d FPS:%d Parts:%d CAPS LOCK ON", SAVE_VERSION, FPS, NUM_PARTS); - else if(GRID_MODE) - sprintf(uitext, "Cracker's V%d FPS:%d Parts:%d Grid:%d", SAVE_VERSION, FPS, NUM_PARTS,GRID_MODE); - else - sprintf(uitext, "Cracker's V%d FPS:%d Parts:%d", SAVE_VERSION, FPS, NUM_PARTS); - //printf("%s\n", uitext); -#else - sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS); -#endif FPSB = FPS; FPS = 0; pastFPS = currentTime; } + +#ifdef BETA + sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS); +#else + sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPSB); +#endif + if(REPLACE_MODE) + strappend(uitext, " [REPLACE MODE]"); + if(sdl_mod&(KMOD_CAPS)) + strappend(uitext, " [CAP LOCKS]"); + if(GRID_MODE) + sprintf(uitext, "%s [GRID: %d]", uitext, GRID_MODE); + if(sdl_zoom_trig||zoom_en) { if(zoom_x<XRES/2) |
