Skip to content

Commit

Permalink
attempted sprite trail fix and strict compiler fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamAtomic committed May 30, 2011
1 parent e3d5890 commit 13cad14
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 16 deletions.
4 changes: 1 addition & 3 deletions org/flixel/FlxCamera.as
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,8 @@ package org.flixel
* @param Color The color to fill with in 0xAARRGGBB hex format.
* @param BlendAlpha Whether to blend the alpha value or just wipe the previous contents. Default is true.
*/
public function fill(Color:uint=0,BlendAlpha:Boolean=true):void
public function fill(Color:uint,BlendAlpha:Boolean=true):void
{
if(Color == 0)
Color = bgColor;
_fill.fillRect(_flashRect,Color);
buffer.copyPixels(_fill,_flashRect,_flashPoint,null,null,BlendAlpha);
}
Expand Down
2 changes: 1 addition & 1 deletion org/flixel/FlxG.as
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ package org.flixel
continue;
if(useBufferLocking)
cam.buffer.lock();
cam.fill();
cam.fill(cam.bgColor);
cam.screen.dirty = true;
}
}
Expand Down
40 changes: 32 additions & 8 deletions org/flixel/FlxTilemap.as
Original file line number Diff line number Diff line change
Expand Up @@ -736,49 +736,73 @@ package org.flixel
{
i = Start - widthInTiles;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(right)
{
i = Start + 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(down)
{
i = Start + widthInTiles;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(left)
{
i = Start - 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(up && right)
{
i = Start - widthInTiles + 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(right && down)
{
i = Start + widthInTiles + 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(left && down)
{
i = Start + widthInTiles - 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
if(up && left)
{
i = Start - widthInTiles - 1;
if((Data[i] >= 0) && (Data[i] < current))
return walkPath(Data,i,Points);
{
walkPath(Data,i,Points);
return;
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions org/flixel/system/FlxPreloader.as
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ package org.flixel.system
tmp.addEventListener(MouseEvent.CLICK,goToMyURL);
return;
}
_init = false;
this._init = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}

Expand All @@ -138,12 +138,12 @@ package org.flixel.system

private function onEnterFrame(event:Event):void
{
if(!_init)
if(!this._init)
{
if((stage.stageWidth <= 0) || (stage.stageHeight <= 0))
return;
create();
_init = true;
this._init = true;
}
graphics.clear();
var time:uint = getTimer();
Expand Down
5 changes: 4 additions & 1 deletion org/flixel/system/debug/VCR.as
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ package org.flixel.system.debug
fileContents = data.readUTFBytes(data.bytesAvailable);
_file = null;
if((fileContents == null) || (fileContents.length <= 0))
return FlxG.log("ERROR: Empty flixel gameplay record.");
{
FlxG.log("ERROR: Empty flixel gameplay record.");
return;
}

FlxG.loadReplay(fileContents);
}
Expand Down

0 comments on commit 13cad14

Please sign in to comment.