Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
João Magalhães
boytacean
Commits
40a9edbb
Verified
Commit
40a9edbb
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
fix: issue related to max sprites per line
parent
33198767
No related branches found
No related tags found
No related merge requests found
Pipeline
#1645
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-1
1 addition, 1 deletion
CHANGELOG.md
src/ppu.rs
+12
-0
12 additions, 0 deletions
src/ppu.rs
with
13 additions
and
1 deletion
CHANGELOG.md
+
1
−
1
View file @
40a9edbb
...
...
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
*
*
PPU issue related to the maximum number of objects/sprite per line being 10
## [0.5.4] - 2022-11-15
...
...
This diff is collapsed.
Click to expand it.
src/ppu.rs
+
12
−
0
View file @
40a9edbb
...
...
@@ -802,7 +802,15 @@ impl Ppu {
}
fn
render_objects
(
&
mut
self
)
{
let
mut
draw_count
=
0u8
;
for
index
in
0
..
OBJ_COUNT
{
// in case the limit on number of object to be draw per
// line has been reached breaks the loop avoiding more draws
if
draw_count
==
10
{
break
;
}
// obtains the meta data of the object that is currently
// under iteration to be checked for drawing
let
obj
=
self
.obj_data
[
index
];
...
...
@@ -899,6 +907,10 @@ impl Ppu {
// size of an RGB pixel (which is 3 bytes)
frame_offset
+=
RGB_SIZE
as
i32
;
}
// increments the counter so that we're able to keep
// track on the number of object drawn
draw_count
+=
1
;
}
}
...
...
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