Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
infidel- committed Mar 27, 2016
1 parent 0433f57 commit 90cac3e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
14 changes: 10 additions & 4 deletions Makefile
@@ -1,10 +1,16 @@
all: clean windows-mydebug

neko:
openfl build project.nmml neko -Dmydebug
linux32-mydebug:
openfl build project.nmml linux -neko -32 -Dmydebug

linux:
openfl build project.nmml linux -Dmydebug
linux32-clean:
openfl build project.nmml linux -neko

linux64-mydebug:
openfl build project.nmml linux -neko -Dmydebug

linux64-clean:
openfl build project.nmml linux -neko

windows-mydebug:
haxe --connect 6000 -D mydebug .bin/linux64/neko/haxe/release.hxml && \
Expand Down
2 changes: 1 addition & 1 deletion game/AreaGame.hx
Expand Up @@ -535,7 +535,7 @@ class AreaGame
public function getCellType(x: Int, y: Int): Int
{
if (x < 0 || y < 0 || x >= width || y >= height)
return null;
return -1;
return _cells[x][y];
}

Expand Down
18 changes: 9 additions & 9 deletions game/AreaGenerator.hx
Expand Up @@ -28,18 +28,18 @@ class AreaGenerator
for (y in 0...area.height)
{
for (x in 0...area.width)
neko.Lib.print(cells[x][y]);
neko.Lib.println('');
Sys.print(cells[x][y]);
Sys.println('');
}
*/
/*
var cells = area.getCells();
for (y in 0...area.height)
{
for (x in 0...area.width)
// neko.Lib.print(cells[x][y] == Const.TILE_BUILDING ? 1 : 0);
neko.Lib.print(cells[x][y]);
neko.Lib.println('');
// Sys.print(cells[x][y] == Const.TILE_BUILDING ? 1 : 0);
Sys.print(cells[x][y]);
Sys.println('');
}
*/
// Sys.exit(1);
Expand Down Expand Up @@ -388,9 +388,9 @@ class AreaGenerator
for (y in 0...area.height)
{
for (x in 0...area.width)
// neko.Lib.print(cells[x][y] == Const.TILE_BUILDING ? 1 : 0);
neko.Lib.print(cells[x][y]);
neko.Lib.println('');
// Sys.print(cells[x][y] == Const.TILE_BUILDING ? 1 : 0);
Sys.print(cells[x][y]);
Sys.println('');
}
return;

Expand Down Expand Up @@ -608,7 +608,7 @@ class AreaGenerator
for (dx in 0...sx)
{
var cellType = area.getCellType(x + dx, y + dy);
if (cellType == null)
if (cellType == -1)
continue;

area.setCellType(x + dx, y + dy, Const.TILE_BUILDING);
Expand Down
2 changes: 1 addition & 1 deletion game/RegionGame.hx
Expand Up @@ -288,7 +288,7 @@ class RegionGame
public function updateAlertness()
{
// make empty array
var tmp = new Array<Array<Float>>();
var tmp = new Array<Array<Null<Float>>>();
for (i in 0...width)
tmp[i] = [];

Expand Down
4 changes: 2 additions & 2 deletions objects/AreaObject.hx
Expand Up @@ -54,13 +54,13 @@ class AreaObject
// create entity for this AI (using parent type as a row)
public function createEntityByType(parentType: String)
{
var atlasRow: Int = Reflect.field(Const, 'ROW_' + parentType.toUpperCase());
var atlasRow: Null<Int> = Reflect.field(Const, 'ROW_' + parentType.toUpperCase());
if (atlasRow == null)
{
trace('No such entity type: ' + parentType);
return;
}
var atlasCol: Int = Reflect.field(Const, 'FRAME_' + type.toUpperCase());
var atlasCol: Null<Int> = Reflect.field(Const, 'FRAME_' + type.toUpperCase());
if (atlasCol == null)
{
trace('No such entity frame: ' + type);
Expand Down

0 comments on commit 90cac3e

Please sign in to comment.