Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
53681163
There was a problem fetching the pipeline summary.
Commit
53681163
authored
4 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
for rexo, with love
parent
3c21a600
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/class/generator/map/StaticPredrawn.lua
+20
-0
20 additions, 0 deletions
game/modules/tome/class/generator/map/StaticPredrawn.lua
with
20 additions
and
0 deletions
game/modules/tome/class/generator/map/StaticPredrawn.lua
+
20
−
0
View file @
53681163
...
...
@@ -185,6 +185,7 @@ function _M:tmxLoad(file)
local
data_ids
=
{}
local
data_images
=
{}
local
data_talls
=
{}
local
data_displays
=
{}
local
g
=
self
:
getLoader
(
t
)
local
map
=
lom
.
parse
(
data
)
local
mapprops
=
{}
...
...
@@ -371,6 +372,21 @@ function _M:tmxLoad(file)
local
i
,
j
=
i
+
1
,
j
+
1
self
.
to_spawn
[
#
self
.
to_spawn
+
1
]
=
{
i
=
i
,
j
=
j
,
particles
=
props
}
end
end
elseif
og
.
attr
.
name
:
find
(
"^particles"
)
then
local
x
,
y
,
w
,
h
=
math.floor
(
tonumber
(
o
.
attr
.
x
)
/
tw
),
math.floor
(
tonumber
(
o
.
attr
.
y
)
/
th
),
math.floor
(
tonumber
(
o
.
attr
.
width
)
/
tw
),
math.floor
(
tonumber
(
o
.
attr
.
height
)
/
th
)
for
i
=
x
,
x
+
w
do
for
j
=
y
,
y
+
h
do
local
i
,
j
=
i
+
1
,
j
+
1
self
.
to_spawn
[
#
self
.
to_spawn
+
1
]
=
{
i
=
i
,
j
=
j
,
particles
=
props
}
end
end
elseif
og
.
attr
.
name
:
find
(
"^deco:"
)
then
local
z
=
tonumber
((
og
.
attr
.
name
:
gsub
(
"^deco:"
,
""
)))
local
x
,
y
,
w
,
h
=
tonumber
(
o
.
attr
.
x
)
/
tw
,
(
tonumber
(
o
.
attr
.
y
)
-
tonumber
(
o
.
attr
.
height
))
/
th
,
tonumber
(
o
.
attr
.
width
)
/
tw
,
tonumber
(
o
.
attr
.
height
)
/
th
local
tid
=
tonumber
(
o
.
attr
.
gid
)
if
tid
and
data_images
[
tid
]
then
local
rx
,
ry
=
math.floor
(
x
+
w
/
2
),
math.floor
(
y
+
h
/
2
)
if
data_ids
[
tid
]
then
m
[
rx
+
1
][
ry
+
1
]
=
data_ids
[
tid
]
end
table.insert
(
m_images
[
rx
+
1
][
ry
+
1
],
{
z
=
z
,
prefix
=
nil
,
image
=
data_images
[
tid
],
dw
=
w
,
dh
=
h
,
dx
=
x
-
rx
,
dy
=
y
-
ry
})
end
end
end
end
...
...
@@ -406,6 +422,10 @@ function _M:generate(lev, old_lev)
g
.
add_displays
[
#
g
.
add_displays
].
display_y
=
-
1
g
.
add_displays
[
#
g
.
add_displays
].
display_h
=
2
end
if
imgs
[
iz
].
dx
then
g
.
add_displays
[
#
g
.
add_displays
].
display_x
=
imgs
[
iz
].
dx
end
if
imgs
[
iz
].
dy
then
g
.
add_displays
[
#
g
.
add_displays
].
display_y
=
imgs
[
iz
].
dy
end
if
imgs
[
iz
].
dw
then
g
.
add_displays
[
#
g
.
add_displays
].
display_w
=
imgs
[
iz
].
dw
end
if
imgs
[
iz
].
dh
then
g
.
add_displays
[
#
g
.
add_displays
].
display_h
=
imgs
[
iz
].
dh
end
end
end
g
:
resolve
()
g
:
resolve
(
nil
,
true
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment