hedgewars/CCHandlers.inc
changeset 2428 6800f8aa0184
parent 2407 9f413bd5150e
child 2568 e654cbfb23ba
equal deleted inserted replaced
2427:241e3bb6a146 2428:6800f8aa0184
   180 if s[1]='"' then Delete(s, 1, 1);
   180 if s[1]='"' then Delete(s, 1, 1);
   181 if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
   181 if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
   182 b:= KeyNameToCode(id);
   182 b:= KeyNameToCode(id);
   183 if b = 0 then OutError(errmsgUnknownVariable + ' "' + id + '"', false)
   183 if b = 0 then OutError(errmsgUnknownVariable + ' "' + id + '"', false)
   184          else CurrentTeam^.Binds[b]:= s
   184          else CurrentTeam^.Binds[b]:= s
       
   185 end;
       
   186 
       
   187 procedure chCurU_p(var s: shortstring);
       
   188 begin
       
   189 CursorMovementY:= -1;
       
   190 end;
       
   191 
       
   192 procedure chCurU_m(var s: shortstring);
       
   193 begin
       
   194 CursorMovementY:= 0;
       
   195 end;
       
   196 
       
   197 procedure chCurD_p(var s: shortstring);
       
   198 begin
       
   199 CursorMovementY:= 1;
       
   200 end;
       
   201 
       
   202 procedure chCurD_m(var s: shortstring);
       
   203 begin
       
   204 CursorMovementY:= 0;
       
   205 end;
       
   206 
       
   207 procedure chCurL_p(var s: shortstring);
       
   208 begin
       
   209 CursorMovementX:= -1;
       
   210 end;
       
   211 
       
   212 procedure chCurL_m(var s: shortstring);
       
   213 begin
       
   214 CursorMovementX:= 0;
       
   215 end;
       
   216 
       
   217 procedure chCurR_p(var s: shortstring);
       
   218 begin
       
   219 CursorMovementX:= 1;
       
   220 end;
       
   221 
       
   222 procedure chCurR_m(var s: shortstring);
       
   223 begin
       
   224 CursorMovementX:= 0;
   185 end;
   225 end;
   186 
   226 
   187 procedure chLeft_p(var s: shortstring);
   227 procedure chLeft_p(var s: shortstring);
   188 begin
   228 begin
   189 if CheckNoTeamOrHH then exit;
   229 if CheckNoTeamOrHH then exit;
   574 	cScreenWidth:= cInitWidth;
   614 	cScreenWidth:= cInitWidth;
   575 	cScreenHeight:= cInitHeight
   615 	cScreenHeight:= cInitHeight
   576 	end;
   616 	end;
   577 
   617 
   578 SDL_WM_SetCaption('Hedgewars', nil);
   618 SDL_WM_SetCaption('Hedgewars', nil);
   579 {$IFDEF DEBUGFILE}
   619 if SDLPrimSurface <> nil then
   580 AddFileLog('Freeing old primary surface...');
   620 	begin
   581 {$ENDIF}
   621 	{$IFDEF DEBUGFILE}
   582 if SDLPrimSurface <> nil then SDL_FreeSurface(SDLPrimSurface);
   622 	AddFileLog('Freeing old primary surface...');
       
   623 	{$ENDIF}
       
   624 	SDL_FreeSurface(SDLPrimSurface);
       
   625 	end;
   583 
   626 
   584 {$IFDEF DARWIN}
   627 {$IFDEF DARWIN}
   585 //remove the topbar from Mac and iPhone
   628 //remove the topbar from Mac and iPhone
   586 flags:= flags or SDL_NOFRAME;
   629 flags:= flags or SDL_NOFRAME;
   587 {$ENDIF}
   630 {$ENDIF}