Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
quadtree
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan de Oliveira
quadtree
Commits
bac6ed24
Commit
bac6ed24
authored
Jul 06, 2022
by
Alan de Oliveira Silva Lenk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correção da impressão por nivel
parent
83f0ea91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
quadtree.cpp
quadtree.cpp
+10
-7
No files found.
quadtree.cpp
View file @
bac6ed24
...
@@ -261,15 +261,18 @@ void cutRange(quadtree* qt) {
...
@@ -261,15 +261,18 @@ void cutRange(quadtree* qt) {
}
}
void
printarCompacto
(
quadtree
*
qt
,
SDL_Surface
*
img
,
SDL_Renderer
*
renderer
,
int
&
pixels
)
{
void
printarCompacto
(
quadtree
*
qt
,
SDL_Surface
*
img
,
SDL_Renderer
*
renderer
,
int
&
pixels
)
{
pixels
++
;
if
(
qt
->
nivel
==
nivelCompacto
)
{
if
(
qt
->
nivel
==
nivelCompacto
)
{
pixels
++
;
SDL_SetRenderDrawColor
(
renderer
,
qt
->
r
,
qt
->
g
,
qt
->
b
,
0
);
SDL_SetRenderDrawColor
(
renderer
,
qt
->
r
,
qt
->
g
,
qt
->
b
,
0
);
for
(
int
i
=
qt
->
x1
;
i
<
(
qt
->
x2
+
qt
->
x1
);
i
++
)
{
if
(
qt
->
x2
>
0
)
{
for
(
int
j
=
qt
->
y1
;
j
<
(
qt
->
y2
+
qt
->
y1
);
j
++
)
{
SDL_Rect
rect
;
rect
.
x
=
qt
->
x1
;
rect
.
y
=
qt
->
y1
;
SDL_RenderDrawPoint
(
renderer
,
i
,
j
);
rect
.
w
=
qt
->
x2
;
rect
.
h
=
qt
->
y2
;
}
SDL_RenderFillRect
(
renderer
,
&
rect
);
}
}
else
SDL_RenderDrawPoint
(
renderer
,
qt
->
x
,
qt
->
y
);
}
}
else
{
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment