Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tetris example #88

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4d7e230
drawing tetrominos
sajattack Oct 8, 2020
a65be8c
WIP all blue
sajattack Oct 8, 2020
fd42324
cache fix and cleanup
sajattack Oct 8, 2020
d4f391a
more cleanup
sajattack Oct 8, 2020
c203e4b
simplify tetromino struct and add rotation
sajattack Oct 11, 2020
b67a8b5
minor changes
sajattack Oct 11, 2020
be4f76e
grid test
sajattack Oct 11, 2020
63f5846
add todo files
sajattack Oct 11, 2020
3f97f64
700fps performance boost
sajattack Oct 12, 2020
a5aaf0b
function to convert tetromino to vertices
sajattack Oct 13, 2020
bb65740
gameboard
sajattack Oct 14, 2020
58421ac
playable tetris
sajattack Oct 15, 2020
09fa84a
fix rng
sajattack Oct 15, 2020
b4c61ac
enable home button
sajattack Oct 15, 2020
c57ac7d
better background hack
sajattack Oct 15, 2020
42863d3
hardcode background vertices
sajattack Oct 15, 2020
354a5e5
make the background semi-transparent
sajattack Oct 15, 2020
e8aaeec
rotation correction
sajattack Oct 15, 2020
1fec8ac
remove unused file
sajattack Oct 15, 2020
a7052d0
cleanup background draw code a bit
sajattack Oct 15, 2020
89d7ea1
loop timing and hard drop
sajattack Oct 15, 2020
78e5eb0
clean up/silence warnings
sajattack Oct 15, 2020
2ff517c
rebase changes to gu blending
sajattack Oct 16, 2020
011ffc0
remove outdated comment
sajattack Oct 16, 2020
085f200
remove unused features
sajattack Oct 16, 2020
98d1a30
improve controls
sajattack Oct 16, 2020
3680639
method refactor
sajattack Oct 16, 2020
697073f
add music
sajattack Oct 17, 2020
780b4e6
document and refactor
sajattack Oct 18, 2020
84f29e7
move the block sprite out of the graphics module into main.rs
sajattack Oct 18, 2020
d0d6e99
minor cleanups
sajattack Oct 18, 2020
e968f16
force vram_alloc to return 16-byte aligned VramMemChunks, fix alignme…
sajattack Oct 18, 2020
63076c5
fix vram_alloc test
sajattack Oct 18, 2020
ee8cfe9
remove Box
sajattack Oct 18, 2020
aaf9952
cleanup docs and sprite stuff
sajattack Oct 18, 2020
02d123b
reduce scope of unsafe
sajattack Oct 20, 2020
83b3f48
rebase and fix
sajattack Nov 29, 2021
9ac3c4b
rebase and fix
sajattack Jul 11, 2022
4b14fe2
undo changes to allocator tests
sajattack Jul 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up/silence warnings
  • Loading branch information
sajattack committed Jul 11, 2022
commit 78e5eb0380768798f65e52d4abc638de05e369db
4 changes: 2 additions & 2 deletions examples/tetris/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![no_std]
#![no_main]

#![allow(incomplete_features)]
#![allow(incomplete_features, dead_code)]
#![feature(const_generics, const_fn)]

extern crate alloc;
Expand Down Expand Up @@ -55,7 +55,7 @@ fn psp_main() {
let mut loop_end = 0;
let mut loop_start = 0;
let ticks_per_sec = sys::sceRtcGetTickResolution();
let mut seconds_since_last_loop: f32 = 0.0;
let mut seconds_since_last_loop: f32;

loop {
seconds_since_last_loop = (loop_end - loop_start) as f32 / ticks_per_sec as f32;
Expand Down