# HG changeset patch # User koda # Date 1256296321 0 # Node ID ec8e69b230976d3c298d82e7362f0dac529ccb90 # Parent 275c1b068f68d61ce3bb676c9150346d5a1c2272 err, complete previous commit diff -r 275c1b068f68 -r ec8e69b23097 hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Fri Oct 23 11:11:42 2009 +0000 +++ b/hedgewars/uConsole.pas Fri Oct 23 11:12:01 2009 +0000 @@ -241,12 +241,12 @@ RegisterVariable('delay' , vtLongInt, @cInactDelay , false); RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); -RegisterVariable('damagepct', vtLongInt, @cDamagePercent, false); +RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); RegisterVariable('landadds', vtLongInt, @cLandAdditions , false); RegisterVariable('gmflags' , vtLongInt, @GameFlags , false); RegisterVariable('trflags' , vtLongInt, @TrainingFlags , false); RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); -RegisterVariable('minestime', vtLongInt, @cMinesTime, false); +RegisterVariable('minestime',vtLongInt, @cMinesTime , false); RegisterVariable('fort' , vtCommand, @chFort , false); RegisterVariable('voicepack',vtCommand, @chVoicepack , false); RegisterVariable('grave' , vtCommand, @chGrave , false); @@ -298,14 +298,14 @@ RegisterVariable('-voldown', vtCommand, @chVol_p , true ); RegisterVariable('findhh' , vtCommand, @chFindhh , true ); RegisterVariable('pause' , vtCommand, @chPause , true ); -RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); -RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); -RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); -RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); -RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); -RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); -RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); -RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); +RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); +RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); +RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); +RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); +RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); +RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); +RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); +RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); finalization FreeVariablesList diff -r 275c1b068f68 -r ec8e69b23097 hedgewars/uIO.pas --- a/hedgewars/uIO.pas Fri Oct 23 11:11:42 2009 +0000 +++ b/hedgewars/uIO.pas Fri Oct 23 11:12:01 2009 +0000 @@ -266,7 +266,7 @@ while (headcmd <> nil) and (tmpflag or (headcmd^.cmd = '#')) // '#' is the only cmd which can be sent within same tick after 'N' and ((GameTicks = hiTicks shl 16 + headcmd^.loTime) - or (headcmd^.cmd = 's') // for these commands time isn't specified + or (headcmd^.cmd = 's') // for these commands time is not specified or (headcmd^.cmd = '#') or (headcmd^.cmd = 'b') or (headcmd^.cmd = 'F')) do diff -r 275c1b068f68 -r ec8e69b23097 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Fri Oct 23 11:11:42 2009 +0000 +++ b/hedgewars/uMisc.pas Fri Oct 23 11:12:01 2009 +0000 @@ -164,6 +164,7 @@ procedure FreeTexture(tex: PTexture); function toPowerOf2(i: Longword): Longword; function DecodeBase64(s: shortstring): shortstring; +function modulo(i: LongInt): LongInt; {$IFNDEF IPHONEOS} procedure MakeScreenshot(s: shortstring); {$ENDIF} @@ -488,6 +489,14 @@ byte(DecodeBase64[0]):= t - 1 end; +function modulo (i: LongInt): LongInt; +var result: LongInt; +begin +if i < 0 then result:= -i +else result:= i; +exit(result); +end; + {$IFNDEF IPHONEOS} procedure MakeScreenshot(s: shortstring); const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24); diff -r 275c1b068f68 -r ec8e69b23097 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Oct 23 11:11:42 2009 +0000 +++ b/hedgewars/uStore.pas Fri Oct 23 11:12:01 2009 +0000 @@ -918,13 +918,13 @@ if ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then begin SDL_FreeSurface(tmpsurf); - WriteLnToConsole('Image too big, trying to load lowres version: ' + s); + AddFileLog('Image too big, trying to load lowres version: ' + s); tmpsurf:= IMG_Load(Str2PChar(s)) end; end else begin - WriteLnToConsole('Image not found, trying to load lowres version: ' + s); + AddFileLog('Image not found, trying to load lowres version: ' + s); tmpsurf:= IMG_Load(Str2PChar(s)) end; end;