aboutsummaryrefslogtreecommitdiff
path: root/examples/demos
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-01-22 15:40:14 +0100
committerspicyjpeg <thatspicyjpeg@gmail.com>2023-01-22 15:40:14 +0100
commita21e949c9aea98cb4b3feee48bb98579bbdfba70 (patch)
tree5fad8655bc674bebdbecb385d3e4878acbac3597 /examples/demos
parent3095b4571dabc8d6cee90673d679f3e77b21b164 (diff)
downloadpsn00bsdk-a21e949c9aea98cb4b3feee48bb98579bbdfba70.tar.gz
Fix VSync(), assert(), warnings and some examples
Diffstat (limited to 'examples/demos')
-rw-r--r--examples/demos/n00bdemo/main.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/examples/demos/n00bdemo/main.c b/examples/demos/n00bdemo/main.c
index 6d0be3c..c9ca3ce 100644
--- a/examples/demos/n00bdemo/main.c
+++ b/examples/demos/n00bdemo/main.c
@@ -624,7 +624,7 @@ void plasmastuff() {
// Simple stripe transition effect
void transition() {
- int i,count,comp;
+ int count = 0;
int bheight[16] = { 0 };
TILE *tile = (TILE*)nextpri;
@@ -632,9 +632,9 @@ void transition() {
while( 1 ) {
- comp = 0;
+ int comp = 0;
- for( i=0; i<16; i++ ) {
+ for( int i=0; i<16; i++ ) {
if( bheight[i] > 0 ) {
@@ -657,19 +657,11 @@ void transition() {
if( bheight[count>>1] == 0 )
bheight[count>>1] = 1;
-
display();
count++;
if( comp >= 16 )
break;
-
- /*
- I haven't yet managed to figure out why this loop hangs on no$psx
- if I comment out this completely useless call to puts(). Some
- alignment or timing crap perhaps? -- spicyjpeg
- */
- puts(".");
}
DrawSync(0);