mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-14 10:30:24 +00:00
Working on blocker sprites.
This commit is contained in:
parent
af0c26944f
commit
02cccb1270
@ -422,6 +422,7 @@ class PackPartitions
|
|||||||
// Determine the set of all referenced textures, and assign numbers to them.
|
// Determine the set of all referenced textures, and assign numbers to them.
|
||||||
def texMap = [:]
|
def texMap = [:]
|
||||||
def texList = []
|
def texList = []
|
||||||
|
def texFlags = []
|
||||||
rows.each { row ->
|
rows.each { row ->
|
||||||
row.each { tile ->
|
row.each { tile ->
|
||||||
def id = tile?.@id
|
def id = tile?.@id
|
||||||
@ -430,8 +431,17 @@ class PackPartitions
|
|||||||
if (name == null || name.toLowerCase() =~ /street|blank|null/)
|
if (name == null || name.toLowerCase() =~ /street|blank|null/)
|
||||||
texMap[id] = 0
|
texMap[id] = 0
|
||||||
else if (stripName(name) in textures) {
|
else if (stripName(name) in textures) {
|
||||||
|
def flags = 0
|
||||||
|
if (tile?.@obstruction == 'true')
|
||||||
|
flags |= 1
|
||||||
|
if (tile?.@sprite == 'true')
|
||||||
|
flags |= 2
|
||||||
|
if (tile?.@blocker == 'true')
|
||||||
|
flags |= 4
|
||||||
texList.add(textures[stripName(name)].num)
|
texList.add(textures[stripName(name)].num)
|
||||||
|
texFlags.add(flags)
|
||||||
texMap[id] = texList.size()
|
texMap[id] = texList.size()
|
||||||
|
println "tex #${texList.size()}: name=$name flags=$flags"
|
||||||
if (tile?.@obstruction != 'true')
|
if (tile?.@obstruction != 'true')
|
||||||
texMap[id] |= 0x80; // hi-bit flag to mark sprite cells
|
texMap[id] |= 0x80; // hi-bit flag to mark sprite cells
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user