Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Service Desk
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
Illuna-Minetest
illuna-minetest
Commits
e74668ef
Commit
e74668ef
authored
12 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
Update and fix doc/mapformat.txt; make current format more solid in mapblock.cpp
parent
22502f80
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
doc/mapformat.txt
+13
-13
13 additions, 13 deletions
doc/mapformat.txt
src/mapblock.cpp
+13
-5
13 additions, 5 deletions
src/mapblock.cpp
with
26 additions
and
18 deletions
doc/mapformat.txt
+
13
−
13
View file @
e74668ef
=============================
====================
Minetest World Format
used as of 0.4.dev-20120322
=============================
====================
=============================
Minetest World Format
22...23
=============================
This applies to a world format carrying the block serialization version
22
which is
used at least in
version
0.4.dev-20120322.
This applies to a world format carrying the block serialization version
22...23,
used at least in 0.4.dev-20120322
... 0.4.dev-20120606
.
The block serialization version
used is 22. It
does not fully specify every
aspect of this
format; if compliance with this format is to be checked, it
needs to be
done by detecting if the files and data indeed follows it.
The block serialization version does not fully specify every
aspect of this
format; if compliance with this format is to be checked, it
needs to be
done by detecting if the files and data indeed follows it.
Legacy stuff
=============
...
...
@@ -20,8 +20,8 @@ Files
Everything is contained in a directory, the name of which is freeform, but
often serves as the name of the world.
Currently the authentication and ban data is stored on a per-world basis.
It
can be copied over from an old world to a newly created world.
Currently the authentication and ban data is stored on a per-world basis.
It
can be copied over from an old world to a newly created world.
World
|-- auth.txt ----- Authentication data
...
...
@@ -283,9 +283,9 @@ zlib-compressed node metadata list
u16 content_size
u8[content_size] (content of metadata)
u16 mapblockobject_count
- Always 0
- Should be removed in version 23 (TODO
)
- unused node timers (version will be 24 when they are actually used):
if version == 23:
u8 unused version (always 0
)
u8 static object version:
- Always 0
...
...
This diff is collapsed.
Click to expand it.
src/mapblock.cpp
+
13
−
5
View file @
e74668ef
...
...
@@ -616,9 +616,13 @@ void MapBlock::serialize(std::ostream &os, u8 version, bool disk)
*/
if
(
disk
)
{
// Node timers
if
(
version
>=
23
)
m_node_timers
.
serialize
(
os
);
// Version 23 doesn't actually contain node timers
// (this field should have not been added)
if
(
version
==
23
)
writeU8
(
os
,
0
);
// Node timers (uncomment when node timers are taken into use)
/*if(version >= 24)
m_node_timers.serialize(os);*/
// Static objects
m_static_objects
.
serialize
(
os
);
...
...
@@ -698,11 +702,15 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk)
if
(
disk
)
{
// Node timers
if
(
version
>=
23
){
if
(
version
==
23
)
// Read unused zero
readU8
(
is
);
// Uncomment when node timers are taken into use
/*else if(version >= 24){
TRACESTREAM(<<"MapBlock::deSerialize "<<PP(getPos())
<<": Node timers"<<std::endl);
m_node_timers.deSerialize(is);
}
}
*/
// Static objects
TRACESTREAM
(
<<
"MapBlock::deSerialize "
<<
PP
(
getPos
())
...
...
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