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
868a1a5c
Commit
868a1a5c
authored
9 years ago
by
Břetislav Štec
Committed by
est31
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
src/client/tile.cpp: Fix reference counting
parent
47225346
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/client/tile.cpp
+13
-11
13 additions, 11 deletions
src/client/tile.cpp
with
13 additions
and
11 deletions
src/client/tile.cpp
+
13
−
11
View file @
868a1a5c
...
...
@@ -1011,7 +1011,7 @@ video::IImage* TextureSource::generateImage(const std::string &name)
std
::
string
last_part_of_name
=
name
.
substr
(
last_separator_pos
+
1
);
/*
/*
If this name is enclosed in parentheses, generate it
and blit it onto the base image
*/
...
...
@@ -1209,21 +1209,22 @@ bool TextureSource::generateImagePart(std::string part_of_name,
s32
frame_count
=
stoi
(
sf
.
next
(
":"
));
s32
progression
=
stoi
(
sf
.
next
(
":"
));
/*
Load crack image.
if
(
progression
>=
0
)
{
/*
Load crack image.
It is an image with a number of cracking stages
horizontally tiled.
*/
video
::
IImage
*
img_crack
=
m_sourcecache
.
getOrLoad
(
It is an image with a number of cracking stages
horizontally tiled.
*/
video
::
IImage
*
img_crack
=
m_sourcecache
.
getOrLoad
(
"crack_anylength.png"
,
m_device
);
if
(
img_crack
&&
progression
>=
0
)
{
draw_crack
(
img_crack
,
baseimg
,
if
(
img_crack
)
{
draw_crack
(
img_crack
,
baseimg
,
use_overlay
,
frame_count
,
progression
,
driver
);
img_crack
->
drop
();
img_crack
->
drop
();
}
}
}
/*
...
...
@@ -1612,6 +1613,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
if
(
img
)
{
apply_mask
(
img
,
baseimg
,
v2s32
(
0
,
0
),
v2s32
(
0
,
0
),
img
->
getDimension
());
img
->
drop
();
}
else
{
errorstream
<<
"generateImage(): Failed to load
\"
"
<<
filename
<<
"
\"
."
;
...
...
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