summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/interface.c b/src/interface.c
index 1d1c258..af607c1 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -852,16 +852,16 @@ void login_ui(pixel *vid_buf)
char *s_id,*u_e,*nres;
s_id = strchr(res+3, ' ');
*(s_id++) = 0;
-
+
u_e = strchr(s_id, ' ');
*(u_e++) = 0;
-
+
strcpy(svf_user_id, res+3);
strcpy(svf_session_id, s_id);
nres = mystrdup(u_e);
-
+
printf("\n{%s} {%s} {%s}\n", svf_user_id, svf_session_id, nres);
-
+
if (!strncmp(nres, "ADMIN", 5))
{
svf_admin = 1;
@@ -3837,20 +3837,20 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show
mx /= sdl_scale;
my /= sdl_scale;
ed.focus = 1;
-
+
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\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'"
- ,255, 187, 187, 255);
-
+ "Current commands are quit, set, reset, load, create, file\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'"
+ ,255, 187, 187, 255);
+
cc = 0;
currentcommand = last_command;
while(cc < 10)
@@ -3862,18 +3862,18 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show
{
if(cc<9) {
currentcommand = currentcommand->prev_command;
- } else if(currentcommand->prev_command!=NULL){
+ } else if(currentcommand->prev_command!=NULL) {
free(currentcommand->prev_command);
currentcommand->prev_command = NULL;
}
cc++;
- }
+ }
else
{
break;
}
}
-
+
if(error)
drawtext(vid_buf, 15, 190, error,255, 187, 187, 255);
ui_edit_draw(vid_buf, &ed);
@@ -3905,18 +3905,18 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show
}
else
{
- if(last_command!=NULL){
+ if(last_command!=NULL) {
currentcommand = last_command;
for (cc = 0; cc<ci; cc++) {
if(currentcommand->prev_command==NULL)
ci = cc;
- else
+ else
currentcommand = currentcommand->prev_command;
}
strcpy(ed.str, currentcommand->command);
ed.cursor = strlen(ed.str);
}
- else
+ else
{
ci = -1;
strcpy(ed.str, "");
@@ -3924,10 +3924,10 @@ char *console_ui(pixel *vid_buf,char error[255]) { //TODO: error messages, show
}
}
}
-
+
}
-
-
+
+
}
int console_get_type(char *element)