summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/interface.c b/src/interface.c
index 0d963e0..e345007 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,17 +3837,17 @@ 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, 15, 15, "Welcome to The Powder Toy console v.1 (by cracker64)\n"
- "Current commands are quit, set, reset, load\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"
- "Reset works with pressure, velocity, sparks, temp (ex. 'reset pressure')\n"
- "To load a save use load saveID (ex. load 1337)"
- ,255, 187, 187, 255);
-
+ "Current commands are quit, set, reset, load\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"
+ "Reset works with pressure, velocity, sparks, temp (ex. 'reset pressure')\n"
+ "To load a save use load saveID (ex. load 1337)"
+ ,255, 187, 187, 255);
+
cc = 0;
currentcommand = last_command;
while(cc < 10)
@@ -3859,18 +3859,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);
@@ -3901,26 +3901,26 @@ 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);
}
- else
+ else
{
ci = -1;
strcpy(ed.str, "");
}
}
}
-
+
}
-
-
+
+
}