-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added fade for splash screens - Changed a few assets to palette versions - Improved frame stats - Added a preliminary version of the scroll test
- Loading branch information
1 parent
533843d
commit ce0a885
Showing
14 changed files
with
261 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<Project name="240pn64"><File path="240pSuite.c"></File><File path="Makefile"></File><File path="font.c"></File><File path="font.h"></File><File path="system.c"></File><File path="system.h"></File><File path="image.c"></File><File path="image.h"></File><File path="video.c"></File><File path="video.h"></File><File path="controller.c"></File><File path="controller.h"></File></Project> | ||
<Project name="240pn64"><File path="240pSuite.c"></File><File path="Makefile"></File><File path="font.c"></File><File path="font.h"></File><File path="system.c"></File><File path="system.h"></File><File path="image.c"></File><File path="image.h"></File><File path="video.c"></File><File path="video.h"></File><File path="controller.c"></File><File path="controller.h"></File><File path="tests.c"></File><File path="tests.h"></File></Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/* | ||
* 240p Test Suite for Nintendo 64 | ||
* Copyright (C)2024 Artemio Urbina | ||
* | ||
* This file is part of the 240p Test Suite | ||
* | ||
* The 240p Test Suite is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* The 240p Test Suite is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with 240p Test Suite; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
#include "system.h" | ||
#include "video.h" | ||
#include "font.h" | ||
#include "image.h" | ||
#include "controller.h" | ||
#include "tests.h" | ||
|
||
void drawScroll() | ||
{ | ||
int end = 0, x = 0, y = 0, currentframe = 0; | ||
int speed = 1, acc = -1, pause = 0, vertical = 0; | ||
sprite_t *sonicback, *overlay; | ||
joypad_buttons_t keys; | ||
|
||
sonicback = sprite_load("rom:/sonicback.sprite"); | ||
overlay = sprite_load("rom:/sonicfloor.sprite"); | ||
|
||
while(!end) | ||
{ | ||
getDisplay(); | ||
|
||
rdpqStart(); | ||
if(x > 0) | ||
rdpqDrawImage(sonicback, x-256, 0); | ||
rdpqDrawImage(sonicback, x, 0); | ||
if(x < 64) | ||
rdpqDrawImage(sonicback, x+256, 0); | ||
|
||
if(x > 0) | ||
rdpqDrawImage(overlay, 2*x-256, 48); | ||
rdpqDrawImage(overlay, 2*x, 48); | ||
if(x < 64) | ||
rdpqDrawImage(overlay, 2*x+256, 48); | ||
// Extra gap | ||
if(x < -96) | ||
rdpqDrawImage(overlay, 2*x+512, 48); | ||
|
||
rdpqEnd(); | ||
|
||
waitVsync(); | ||
|
||
joypad_poll(); | ||
keys = controllerButtonsDown(); | ||
|
||
if(keys.d_up) | ||
speed += 1; | ||
|
||
if(keys.d_down) | ||
speed -= 1; | ||
|
||
if(keys.b) | ||
end = 1; | ||
|
||
if(keys.a) | ||
pause = !pause; | ||
|
||
if(keys.c_left) | ||
acc *= -1; | ||
|
||
if(keys.c_right) | ||
vertical = !vertical; | ||
|
||
if(speed > 16) | ||
speed = 16; | ||
|
||
if(speed < 1) | ||
speed = 1; | ||
|
||
if(!pause) | ||
{ | ||
if(!vertical) | ||
x += speed * acc; | ||
else | ||
y -= speed * acc; | ||
} | ||
|
||
if(x < -128) | ||
x = 128 - speed; | ||
if(x > 128) | ||
x = -128 + speed; | ||
|
||
if(y < -7) | ||
y = 0; | ||
if(y > 7) | ||
y = 0; | ||
|
||
if(!vertical) | ||
{ | ||
currentframe ++; | ||
if(currentframe > 10) | ||
{ | ||
currentframe = 0; | ||
} | ||
} | ||
} | ||
|
||
freeImage(&sonicback); | ||
freeImage(&overlay); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef TESTS_H | ||
#define TESTS_H | ||
|
||
void drawScroll(); | ||
|
||
#endif |
Oops, something went wrong.