diff options
| author | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-03 18:45:56 (GMT) |
|---|---|---|
| committer | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-03 18:47:23 (GMT) |
| commit | d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7 (patch) | |
| tree | 186b21250c8f731887de996156d845e064722a47 /src/interface.c | |
| parent | 54caad7a69c424b6bcb78374aa0d0785a8a5ac93 (diff) | |
| parent | 525a59e28011cf26993c8e3f040a36ba7b7bf5e2 (diff) | |
| download | powder-d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7.zip powder-d21d1f7ba58d1fc2f1b6ccbfc945e440e16a06b7.tar.gz | |
Merge branch 'upstream' into dev
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/interface.c b/src/interface.c index 1c2c59a..570755d 100644 --- a/src/interface.c +++ b/src/interface.c @@ -96,7 +96,7 @@ void get_sign_pos(int i, int *x0, int *y0, int *w, int *h) memset(buff, 0, sizeof(buff)); for(sldr=3; signs[i].text[sldr-1] != '|'; sldr++) startm = sldr + 1; - + sldr = startm; while(signs[i].text[sldr] != '}') { @@ -105,7 +105,7 @@ void get_sign_pos(int i, int *x0, int *y0, int *w, int *h) } *w = textwidth(buff) + 5; } - + //Ususal width if (strcmp(signs[i].text, "{p}") && strcmp(signs[i].text, "{t}") && sregexp(signs[i].text, "^{c:[0-9]*|.*}$")) *w = textwidth(signs[i].text) + 5; @@ -874,13 +874,13 @@ void login_ui(pixel *vid_buf) *(s_id++) = 0; u_e = strchr(s_id, ' '); - if (!u_e){ + if (!u_e) { u_e = malloc(1); memset(u_e, 0, 1); } else *(u_e++) = 0; - + strcpy(svf_user_id, res+3); strcpy(svf_session_id, s_id); nres = mystrdup(u_e); @@ -3866,17 +3866,18 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show clearrect(vid_buf, 0, 0, XRES+BARSIZE, 220);//anyway to make it transparent? draw_line(vid_buf, 1, 219, XRES, 219, 228, 228, 228, XRES+BARSIZE); drawtext(vid_buf, 100, 15, "Welcome to The Powder Toy console v.2 (by cracker64)\n" - "Current commands are quit, set, reset, load, create, file, kill\n" - "You can set type, temp, ctype, life, x, y, vx, vy using this format ('set life particle# 9001')\n" - "You can also use 'all' instead of a particle number to do it to everything.\n" - "You can now use particle names (ex. set type all deut)\n" - "Reset works with pressure, velocity, sparks, temp (ex. 'reset pressure')\n" - "To load a save use load saveID (ex. load 1337)\n" - "Create particles with 'create deut x,y' where x and y are the coords\n" - "Run scripts from file 'file filename'\n" - "You can delete/kill a particle with 'kill x,y'" - ,255, 187, 187, 255); - + "Current commands are quit, set, reset, load, create, file, kill, sound\n" + "You can set type, temp, ctype, life, x, y, vx, vy using this format ('set life particle# 9001')\n" + "You can also use 'all' instead of a particle number to do it to everything.\n" + "You can now use particle names (ex. set type all deut)\n" + "Reset works with pressure, velocity, sparks, temp (ex. 'reset pressure')\n" + "To load a save use load saveID (ex. load 1337)\n" + "Create particles with 'create deut x,y' where x and y are the coords\n" + "Run scripts from file 'file filename'\n" + "You can delete/kill a particle with 'kill x,y'" + "Play a sound with (sound blah.wav)" + ,255, 187, 187, 255); + cc = 0; currentcommand = last_command; while(cc < 10) |
