mirror of https://github.com/jeremysrand/BuGS.git
Display the position of the players score after upload.
This commit is contained in:
parent
701585df1a
commit
739d89add0
|
@ -170,6 +170,7 @@ Boolean hasGlobalHighScores = FALSE;
|
||||||
tScoresResponse highScoreResponse;
|
tScoresResponse highScoreResponse;
|
||||||
Word globalScoreAge = 0;
|
Word globalScoreAge = 0;
|
||||||
tSetHighScoreRequestWithHash setHighScoreRequest;
|
tSetHighScoreRequestWithHash setHighScoreRequest;
|
||||||
|
char globalScoreInfo[GAME_NUM_TILES_WIDE + 1];
|
||||||
|
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
|
@ -691,7 +692,7 @@ BOOLEAN sendHighScore(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x10:
|
case 0x10:
|
||||||
uploadSpin1();
|
uploadSpin3();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x18:
|
case 0x18:
|
||||||
|
@ -701,5 +702,19 @@ BOOLEAN sendHighScore(void)
|
||||||
}
|
}
|
||||||
} while (networkGlobals->gameNetworkState > GAME_NETWORK_TCP_UNCONNECTED);
|
} while (networkGlobals->gameNetworkState > GAME_NETWORK_TCP_UNCONNECTED);
|
||||||
|
|
||||||
return (networkGlobals->gameNetworkState == GAME_NETWORK_TCP_UNCONNECTED);
|
if (networkGlobals->gameNetworkState != GAME_NETWORK_TCP_UNCONNECTED)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
sprintf(globalScoreInfo, " %u OF %u SCORES", networkGlobals->setHighScoreResponse.position, networkGlobals->setHighScoreResponse.numberOfScores);
|
||||||
|
for (cycleCount = strlen(globalScoreInfo); cycleCount < sizeof(globalScoreInfo); cycleCount++) {
|
||||||
|
globalScoreInfo[cycleCount] = ' ';
|
||||||
|
}
|
||||||
|
globalScoreInfo[GAME_NUM_TILES_WIDE] = '\0';
|
||||||
|
displayScorePosition();
|
||||||
|
|
||||||
|
for (cycleCount = 4 * 60; cycleCount > 0; cycleCount--) {
|
||||||
|
waitForVbl();
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
|
#include "tileData.h"
|
||||||
|
|
||||||
typedef struct tHighScore
|
typedef struct tHighScore
|
||||||
{
|
{
|
||||||
|
@ -20,6 +21,8 @@ typedef struct tHighScore
|
||||||
unsigned long score;
|
unsigned long score;
|
||||||
} tHighScore;
|
} tHighScore;
|
||||||
|
|
||||||
|
extern char globalScoreInfo[GAME_NUM_TILES_WIDE + 1];
|
||||||
|
|
||||||
extern unsigned int myUserId;
|
extern unsigned int myUserId;
|
||||||
|
|
||||||
extern void initNetwork(void);
|
extern void initNetwork(void);
|
||||||
|
@ -34,6 +37,7 @@ extern void uploadSpin1(void);
|
||||||
extern void uploadSpin2(void);
|
extern void uploadSpin2(void);
|
||||||
extern void uploadSpin3(void);
|
extern void uploadSpin3(void);
|
||||||
extern void displayConnectionString(void);
|
extern void displayConnectionString(void);
|
||||||
|
extern void displayScorePosition(void);
|
||||||
|
|
||||||
|
|
||||||
#endif /* define _GUARD_PROJECTBuGS_FILEglobalScores_ */
|
#endif /* define _GUARD_PROJECTBuGS_FILEglobalScores_ */
|
||||||
|
|
|
@ -63,7 +63,7 @@ resource rVersion (1) {
|
||||||
{
|
{
|
||||||
1, /* Major version number in BCD */
|
1, /* Major version number in BCD */
|
||||||
9, /* Minor version number in BCD */
|
9, /* Minor version number in BCD */
|
||||||
1, /* Bug version number in BCD */
|
2, /* Bug version number in BCD */
|
||||||
beta, /* Development phase */
|
beta, /* Development phase */
|
||||||
0 /* Release number */
|
0 /* Release number */
|
||||||
},
|
},
|
||||||
|
|
44
BuGS/score.s
44
BuGS/score.s
|
@ -781,6 +781,7 @@ checkHighScore_isInvalid anop
|
||||||
bra checkHighScore_nextKey
|
bra checkHighScore_nextKey
|
||||||
|
|
||||||
checkHighScore_doneInitials anop
|
checkHighScore_doneInitials anop
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
lda settings+SETTINGS_HIGH_SCORE_OFFSET+HIGH_SCORE_WHO_OFFSET-3,y
|
lda settings+SETTINGS_HIGH_SCORE_OFFSET+HIGH_SCORE_WHO_OFFSET-3,y
|
||||||
sta setHighScoreRequest+2
|
sta setHighScoreRequest+2
|
||||||
lda settings+SETTINGS_HIGH_SCORE_OFFSET+HIGH_SCORE_WHO_OFFSET-1,y
|
lda settings+SETTINGS_HIGH_SCORE_OFFSET+HIGH_SCORE_WHO_OFFSET-1,y
|
||||||
|
@ -879,5 +880,48 @@ uploadSpin3 entry
|
||||||
_overwriteGameTile TILE_EMPTY
|
_overwriteGameTile TILE_EMPTY
|
||||||
_overwriteGameTile TILE_SOLID1
|
_overwriteGameTile TILE_SOLID1
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
|
|
||||||
|
displayScorePosition entry
|
||||||
|
ldx #GAME_NUM_TILES_WIDE*22
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
|
_overwriteGameTile TILE_LETTER_Y
|
||||||
|
_overwriteGameTile TILE_LETTER_O
|
||||||
|
_overwriteGameTile TILE_LETTER_U
|
||||||
|
_overwriteGameTile TILE_LETTER_R
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
|
_overwriteGameTile TILE_LETTER_S
|
||||||
|
_overwriteGameTile TILE_LETTER_C
|
||||||
|
_overwriteGameTile TILE_LETTER_O
|
||||||
|
_overwriteGameTile TILE_LETTER_R
|
||||||
|
_overwriteGameTile TILE_LETTER_E
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
|
_overwriteGameTile TILE_LETTER_G
|
||||||
|
_overwriteGameTile TILE_LETTER_L
|
||||||
|
_overwriteGameTile TILE_LETTER_O
|
||||||
|
_overwriteGameTile TILE_LETTER_B
|
||||||
|
_overwriteGameTile TILE_LETTER_A
|
||||||
|
_overwriteGameTile TILE_LETTER_L
|
||||||
|
_overwriteGameTile TILE_LETTER_L
|
||||||
|
_overwriteGameTile TILE_LETTER_Y
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
|
_overwriteGameTile TILE_LETTER_I
|
||||||
|
_overwriteGameTile TILE_LETTER_S
|
||||||
|
_overwriteGameTile TILE_SYMBOL_COLON
|
||||||
|
_overwriteGameTile TILE_EMPTY
|
||||||
|
|
||||||
|
ldx #GAME_NUM_TILES_WIDE*24
|
||||||
|
ldy #0
|
||||||
|
displayScorePosition_loop anop
|
||||||
|
lda globalScoreInfo,y
|
||||||
|
and #$ff
|
||||||
|
beq displayScorePosition_done
|
||||||
|
jsl asciiToTileType
|
||||||
|
jsl overwriteGameTile
|
||||||
|
iny
|
||||||
|
bra displayScorePosition_loop
|
||||||
|
|
||||||
|
displayScorePosition_done anop
|
||||||
|
rtl
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue