Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Otowa Kotori
Tales of MajEyal
Commits
3668b45e
Commit
3668b45e
authored
14 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
fix
git-svn-id:
http://svn.net-core.org/repos/t-engine4@2868
51575b47-30f0-44d4-a5cc-537603b46e54
parent
e24c425a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/Particles.lua
+1
-1
1 addition, 1 deletion
game/engines/default/engine/Particles.lua
game/loader/pre-init.lua
+12
-6
12 additions, 6 deletions
game/loader/pre-init.lua
with
13 additions
and
7 deletions
game/engines/default/engine/Particles.lua
+
1
−
1
View file @
3668b45e
...
...
@@ -96,7 +96,7 @@ function _M:loaded()
self
:
updateZoom
()
-- Serialize arguments for passing into the particles threads
local
args
=
table
.
serialize
(
self
.
args
or
{})
local
args
=
table
.
serialize
(
self
.
args
or
{}
,
nil
,
true
)
args
=
args
..
"tile_w="
..
engine
.
Map
.
tile_w
..
"
\n
tile_h="
..
engine
.
Map
.
tile_h
self
.
update
=
fct
...
...
This diff is collapsed.
Click to expand it.
game/loader/pre-init.lua
+
12
−
6
View file @
3668b45e
...
...
@@ -75,20 +75,26 @@ end
--- This is a really naive algorithm, it will not handle objects and such.
-- Use only for small tables
function
table
.
serialize
(
src
,
sub
)
function
table
.
serialize
(
src
,
sub
,
no_G
)
local
str
=
""
if
sub
then
str
=
"{"
end
for
k
,
e
in
pairs
(
src
)
do
local
nk
,
ne
=
k
,
e
local
tk
,
te
=
type
(
k
),
type
(
e
)
if
tk
==
"table"
then
nk
=
"["
..
table
.
serialize
(
nk
,
true
)
..
"]"
elseif
tk
==
"string"
then
nk
=
string.format
(
"[%q]"
,
nk
)
else
nk
=
"["
..
nk
..
"]"
if
no_G
then
if
tk
==
"table"
then
nk
=
"["
..
table
.
serialize
(
nk
,
true
)
..
"]"
elseif
tk
==
"string"
then
-- nothing
else
nk
=
"["
..
nk
..
"]"
end
else
if
tk
==
"table"
then
nk
=
"["
..
table
.
serialize
(
nk
,
true
)
..
"]"
elseif
tk
==
"string"
then
nk
=
string.format
(
"[%q]"
,
nk
)
else
nk
=
"["
..
nk
..
"]"
end
if
not
sub
then
nk
=
"_G"
..
nk
end
end
if
not
sub
then
nk
=
"_G"
..
nk
end
if
te
==
"table"
then
str
=
str
..
string.format
(
"%s=%s "
,
nk
,
table
.
serialize
(
ne
,
true
))
elseif
te
==
"number"
then
...
...
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