1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-10 20:23:47 +00:00

Fixed piece rotations to match NES tetris.

This commit is contained in:
jespergravgaard 2018-12-30 01:35:58 +01:00
parent 25d4c89445
commit 84db15759b
3 changed files with 30 additions and 30 deletions

View File

@ -2,24 +2,24 @@
// The T-piece
align($40) byte[4*4*4] PIECE_T = {
1, 1, 1, 0,
0, 0, 0, 0,
1, 1, 1, 0,
0, 1, 0, 0,
0, 0, 0, 0,
0, 1, 0, 0,
1, 1, 0, 0,
0, 1, 0, 0,
0, 0, 0, 0,
0, 0, 1, 0,
0, 1, 1, 0,
0, 0, 1, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 1, 0, 0,
1, 1, 1, 0,
0, 0, 0, 0,
0, 0, 0, 0,
1, 0, 0, 0,
1, 1, 0, 0,
1, 0, 0, 0,
0, 1, 0, 0,
0, 1, 1, 0,
0, 1, 0, 0,
0, 0, 0, 0
};
@ -30,9 +30,9 @@ align($40) byte[4*4*4] PIECE_S = {
1, 1, 0, 0,
0, 0, 0, 0,
1, 0, 0, 0,
1, 1, 0, 0,
0, 1, 0, 0,
0, 1, 1, 0,
0, 0, 1, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@ -40,9 +40,9 @@ align($40) byte[4*4*4] PIECE_S = {
1, 1, 0, 0,
0, 0, 0, 0,
1, 0, 0, 0,
1, 1, 0, 0,
0, 1, 0, 0,
0, 1, 1, 0,
0, 0, 1, 0,
0, 0, 0, 0
};
@ -54,9 +54,9 @@ align($40) byte[4*4*4] PIECE_Z = {
0, 1, 1, 0,
0, 0, 0, 0,
0, 0, 1, 0,
0, 1, 1, 0,
0, 1, 0, 0,
1, 1, 0, 0,
1, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@ -64,9 +64,9 @@ align($40) byte[4*4*4] PIECE_Z = {
0, 1, 1, 0,
0, 0, 0, 0,
0, 0, 1, 0,
0, 1, 1, 0,
0, 1, 0, 0,
1, 1, 0, 0,
1, 0, 0, 0,
0, 0, 0, 0
};
@ -121,24 +121,24 @@ align($40) byte[4*4*4] PIECE_J = {
// The O-piece
align($40) byte[4*4*4] PIECE_O = {
1, 1, 0, 0,
1, 1, 0, 0,
0, 0, 0, 0,
0, 1, 1, 0,
0, 1, 1, 0,
0, 0, 0, 0,
1, 1, 0, 0,
1, 1, 0, 0,
0, 0, 0, 0,
0, 1, 1, 0,
0, 1, 1, 0,
0, 0, 0, 0,
1, 1, 0, 0,
1, 1, 0, 0,
0, 0, 0, 0,
0, 1, 1, 0,
0, 1, 1, 0,
0, 0, 0, 0,
1, 1, 0, 0,
1, 1, 0, 0,
0, 0, 0, 0,
0, 1, 1, 0,
0, 1, 1, 0,
0, 0, 0, 0
};
@ -173,5 +173,5 @@ word[] PIECES = { (word)PIECE_T, (word)PIECE_S, (word)PIECE_Z, (word)PIECE_J, (w
// The chars to use for the different pieces
byte[] PIECES_CHARS = { $64, $65, $a5, $65, $64, $64, $a5 };
// The initial X/Y for each piece
byte[] PIECES_START_X = { 4, 4, 4, 4, 4, 3, 4};
byte[] PIECES_START_Y = { 2, 1, 1, 1, 2, 0, 1};
byte[] PIECES_START_X = { 4, 4, 4, 4, 4, 4, 4 };
byte[] PIECES_START_Y = { 1, 1, 1, 1, 2, 1, 1 };

View File

@ -239,7 +239,7 @@ void play_update_score(byte removed) {
if(removed!=0){
dword add_bcd = score_add_bcd[removed<<2];
asm { sed }
score_bcd += add_bcd;
score_bcd += add_bcd;
asm { cld }
}
}

View File

@ -79,7 +79,7 @@ void render_screen_swap() {
void render_score() {
const byte ZERO_CHAR = 51;
byte SCREEN_SCORE_ROW = $05;
byte SCREEN_SCORE_COL = $1d;
byte SCREEN_SCORE_COL = $21;
byte* screen_score_pos;
if(render_screen_render==0) {
screen_score_pos = PLAYFIELD_SCREEN_1 + 40*SCREEN_SCORE_ROW + SCREEN_SCORE_COL;