mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-08-15 06:27:24 +00:00
Laxen rules on name matching.
This commit is contained in:
@@ -364,8 +364,8 @@ class PackPartitions
|
|||||||
if (!texMap.containsKey(id)) {
|
if (!texMap.containsKey(id)) {
|
||||||
texMap[id] = 0
|
texMap[id] = 0
|
||||||
if (tile?.@obstruction == 'true') {
|
if (tile?.@obstruction == 'true') {
|
||||||
if (name in textures) {
|
if (stripName(name) in textures) {
|
||||||
texList.add(textures[name].num)
|
texList.add(textures[stripName(name)].num)
|
||||||
texMap[id] = texList.size()
|
texMap[id] = texList.size()
|
||||||
}
|
}
|
||||||
else if (id)
|
else if (id)
|
||||||
@@ -424,6 +424,11 @@ class PackPartitions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def stripName(name)
|
||||||
|
{
|
||||||
|
return name.toLowerCase().replaceAll(" ", "")
|
||||||
|
}
|
||||||
|
|
||||||
def packTexture(imgEl)
|
def packTexture(imgEl)
|
||||||
{
|
{
|
||||||
def num = textures.size() + 1
|
def num = textures.size() + 1
|
||||||
@@ -433,7 +438,7 @@ class PackPartitions
|
|||||||
calcTransparency(pixels)
|
calcTransparency(pixels)
|
||||||
def buf = ByteBuffer.allocate(50000)
|
def buf = ByteBuffer.allocate(50000)
|
||||||
writeTexture(buf, pixels)
|
writeTexture(buf, pixels)
|
||||||
textures[imgEl.@name] = [num:num, buf:buf]
|
textures[stripName(imgEl.@name)] = [num:num, buf:buf]
|
||||||
}
|
}
|
||||||
|
|
||||||
def packFrameImage(imgEl)
|
def packFrameImage(imgEl)
|
||||||
|
@@ -5,13 +5,13 @@ var dc = function(tag) { return document.createElement(tag); };
|
|||||||
|
|
||||||
var map = [
|
var map = [
|
||||||
[1,4,3,4,2,3,2,4,3,2,4,3,4],
|
[1,4,3,4,2,3,2,4,3,2,4,3,4],
|
||||||
[1,0,0,0,0,0,0,3,0,0,2,0,3],
|
[1,0,0,1,0,0,0,3,0,0,2,0,3],
|
||||||
[1,0,0,0,0,0,0,1,0,0,3,0,2],
|
[1,1,0,1,1,0,0,1,0,0,3,0,2],
|
||||||
[3,0,0,1,2,3,0,4,0,0,4,0,3],
|
[1,0,0,1,2,3,0,4,0,0,4,0,3],
|
||||||
[1,0,0,0,0,4,0,0,0,0,0,0,4],
|
[1,0,0,0,0,4,0,0,0,0,0,0,4],
|
||||||
[2,0,0,2,0,2,0,0,0,0,0,0,4],
|
[2,0,0,0,0,2,0,0,0,0,0,0,4],
|
||||||
[1,0,0,3,0,0,0,3,0,0,3,0,1],
|
[0,2,2,2,0,0,0,3,0,0,3,0,1],
|
||||||
[3,0,0,1,0,0,0,3,0,0,2,0,3],
|
[3,0,0,2,0,0,0,3,0,0,2,0,3],
|
||||||
[1,0,0,2,0,3,0,2,0,0,4,0,3],
|
[1,0,0,2,0,3,0,2,0,0,4,0,3],
|
||||||
[1,0,0,0,0,2,0,0,0,0,0,0,1],
|
[1,0,0,0,0,2,0,0,0,0,0,0,1],
|
||||||
[3,0,0,0,0,1,0,0,0,0,0,0,3],
|
[3,0,0,0,0,1,0,0,0,0,0,0,3],
|
||||||
@@ -29,6 +29,9 @@ var itemTypes = [
|
|||||||
|
|
||||||
var allSprites = [
|
var allSprites = [
|
||||||
|
|
||||||
|
// lamp where tree would be
|
||||||
|
{type:3, x:1.5, y:4.5},
|
||||||
|
|
||||||
// lamps in center area
|
// lamps in center area
|
||||||
{type:3, x:9.5, y:7.5},
|
{type:3, x:9.5, y:7.5},
|
||||||
{type:3, x:15.5, y:7.5},
|
{type:3, x:15.5, y:7.5},
|
||||||
@@ -43,13 +46,13 @@ var allSprites = [
|
|||||||
{type:1, x:11.5, y:10.5},
|
{type:1, x:11.5, y:10.5},
|
||||||
// lamps in long bottom room
|
// lamps in long bottom room
|
||||||
{type:3, x:8.5, y:10.5},
|
{type:3, x:8.5, y:10.5},
|
||||||
{type:3, x:9.5, y:10.5}
|
{type:3, x:9.5, y:10.5}
|
||||||
];
|
];
|
||||||
|
|
||||||
// Player attributes [ref BigBlue2_10]
|
// Player attributes [ref BigBlue2_10]
|
||||||
var player = {
|
var player = {
|
||||||
x : 11.5, // current x, y position
|
x : 1.5, // current x, y position
|
||||||
y : 1.5,
|
y : 2.5,
|
||||||
dir : 0, // the direction that the player is turning, either -1 for left or 1 for right.
|
dir : 0, // the direction that the player is turning, either -1 for left or 1 for right.
|
||||||
angleNum : 4, // the current angle of rotation
|
angleNum : 4, // the current angle of rotation
|
||||||
speed : 0, // is the playing moving forward (speed = 1) or backwards (speed = -1).
|
speed : 0, // is the playing moving forward (speed = 1) or backwards (speed = -1).
|
||||||
|
Reference in New Issue
Block a user