Skip to content

Commit edd4bef

Browse files
author
JulianoFlores
committed
V20
- Fixed issue #8 - add hi-score to show on menu screen. - Fixed github issue #9 - hanging sound on endscreen. (i had forgot to set PSGStop(), fixed.) - Fixed issue #10 - white border appearing on the text only screens. (set the correct pallete, column seems to be using sprite pallete color 0, since there are no sprites on screen, easy fix).
1 parent 8a00879 commit edd4bef

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

README.MD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ Oh yeah, there's a time limit also. oops.
4747
- To clear the SRAM (delete save high score) press PAUSE on the title screen.
4848

4949
### Version History:
50+
V0.20 (05/24)
51+
- Fixed issue #8 - add hi-score to show on menu screen.
52+
- Fixed github issue #9 - hanging sound on endscreen. (i had forgot to set PSGStop(), fixed.)
53+
- Fixed issue #10 - white border appearing on the text only screens. (set the correct pallete, column seems to be using sprite pallete color 0, since there are no sprites on screen, easy fix).
54+
5055
V0.19 (04/24)
5156
- Separated SRAM functions in its own file. (github issue #3).
5257
- Made randomseed a global variable to avoid having a fixed level on the first random world level, if the user goes straight to it. (github issue #5).

main.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ void level_load_sprites(void) {
193193
void level_bg_load(void) {
194194
int x;
195195
int y;
196+
SMS_setBackdropColor (RGB(0,0,0));
196197
SMS_mapROMBank(2);
197198
SMS_loadPSGaidencompressedTiles(tiles_psgcompr, 100); // files, tilefrom
198199
int tiles_pallete = 1;
@@ -272,6 +273,7 @@ void level_load(int level, int seed) {
272273
int j = 0;
273274
level_counter = 10;
274275
frame_counter = 0;
276+
SMS_setBackdropColor (RGB(0,0,0));
275277
level_bg_load(); // Load the Background Tiles //
276278

277279
SMS_setTileatXY(3,22,210);
@@ -1269,13 +1271,13 @@ void doClearSRAMScreen(void) {
12691271
int i = 0;
12701272

12711273
clearHiScore();
1272-
12731274
black_bg_load();
12741275
SMS_setBGScrollX(0);
12751276
SMS_setBGScrollY(0);
12761277
vdp_clear_sprites();
12771278

12781279
SMS_autoSetUpTextRenderer();
1280+
SMS_setBackdropColor (RGB(0,0,0));
12791281
SMS_printatXY(8,8, "DELETING HI-SCORE...");
12801282
SMS_printatXY(8,9, "PLEASE WAIT");
12811283

@@ -1289,8 +1291,7 @@ void doClearSRAMScreen(void) {
12891291

12901292
void doTitleScreen(void) {
12911293
int a = 0;
1292-
int p = 0;
1293-
1294+
int p = 0;
12941295
black_bg_load();
12951296
SMS_setBGScrollX(0);
12961297
SMS_setBGScrollY(0);
@@ -1366,13 +1367,19 @@ void doTitleScreen(void) {
13661367

13671368
void doMenuScreen(void) {
13681369
int a = 0;
1370+
char temp[5];
13691371
gamemode = 1;
1370-
13711372
black_bg_load();
13721373
vdp_clear_sprites();
13731374
SMS_setBGScrollX(0);
13741375
SMS_setBGScrollY(0);
13751376
SMS_autoSetUpTextRenderer();
1377+
SMS_setSpritePaletteColor(0, RGB(0,0,0));
1378+
1379+
SMS_printatXY(11,2,"HI:");
1380+
sprintf((char*)temp,"%u",hiscore);
1381+
SMS_printatXY(14,2, temp);
1382+
13761383
SMS_printatXY(10,8, "SELECT GAME MODE");
13771384
SMS_printatXY(10,10,"> FIXED WORLD");
13781385
SMS_printatXY(10,12," RANDOM WORLD");
@@ -1406,12 +1413,12 @@ void doMenuScreen(void) {
14061413
void doLivesScreen(void) {
14071414
int i = 0;
14081415
int lives_tile = lives + 16;
1409-
14101416
black_bg_load();
14111417
vdp_clear_sprites();
14121418
SMS_setBGScrollX(0);
14131419
SMS_setBGScrollY(0);
14141420
SMS_autoSetUpTextRenderer();
1421+
SMS_setSpritePaletteColor(0, RGB(0,0,0));
14151422
SMS_printatXY(10,10,"SHIP(S) REMAINING");
14161423
SMS_setNextTileatXY(7,10);
14171424
SMS_setTile(lives_tile);
@@ -1438,6 +1445,7 @@ void doTimeOutScreen(void) {
14381445
SMS_setBGScrollX(0);
14391446
SMS_setBGScrollY(0);
14401447
SMS_autoSetUpTextRenderer();
1448+
SMS_setSpritePaletteColor(0, RGB(0,0,0));
14411449
SMS_printatXY(10,10,"TIME OUT!");
14421450
SMS_setNextTileatXY(7,10);
14431451

@@ -1463,6 +1471,7 @@ void doGameOver(void) {
14631471
SMS_setBGScrollX(0);
14641472
SMS_setBGScrollY(0);
14651473
SMS_autoSetUpTextRenderer();
1474+
SMS_setSpritePaletteColor(0, RGB(0,0,0));
14661475
SMS_printatXY(11,5,"GAME OVER");
14671476
SMS_printatXY(11,10, "SCORE");
14681477
sprintf((char*)temp,"%u",score);
@@ -1487,12 +1496,14 @@ void doGameOver(void) {
14871496

14881497
void doGameEnd(void) {
14891498
int a = 0;
1490-
1499+
PSGStop();
1500+
PSGSFXStop();
14911501
black_bg_load();
14921502
SMS_setBGScrollX(0);
14931503
SMS_setBGScrollY(0);
14941504
vdp_clear_sprites();
14951505
SMS_autoSetUpTextRenderer();
1506+
SMS_setSpritePaletteColor(0, RGB(0,0,0));
14961507
SMS_printatXY(7,5,"ALL SATELLITES HAVE");
14971508
SMS_printatXY(7,6,"BEEN RECOVERED");
14981509
SMS_printatXY(5,10,"THIS IS THE HAPPY ENDING");
@@ -1536,7 +1547,7 @@ void main(void) {
15361547

15371548
vdp_config();
15381549
vdp_vram_clear();
1539-
1550+
15401551
hiscore = loadHiScore();
15411552

15421553
black_bg_load();

vdp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// VDP Stuff //
1313
void vdp_config(void) {
1414
SMS_VDPturnOnFeature(VDPFEATURE_HIDEFIRSTCOL);
15+
SMS_VDPturnOnFeature(VDPFEATURE_LEFTCOLBLANK);
1516
SMS_VRAMmemsetW(0, 0x0000, 16384); // CLEAR VRAM
1617
// SMS_useFirstHalfTilesforSprites(true); // not used atm //
1718
}

0 commit comments

Comments
 (0)