Skip to content

Commit

Permalink
Добавлен рамка для сообщения о конце игры, с учетом цвета.
Browse files Browse the repository at this point in the history
  • Loading branch information
tereshenkovav committed Oct 24, 2024
1 parent 7351437 commit 13b9f52
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
38 changes: 38 additions & 0 deletions src/ponydiamonds.asm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ FILL_GROUND_ROW:
MOV @#TOTALDIAMONDSINGAME,@#DIAMONDSDROP
MOV #0,@#DIAMONDSONAIR
MOV #125252,@#GAMEOVERCOLOR
MOV #2,@#GAMEOVERCOLOR_LINE
MOV @#GENINTERVAL,@#GENCOUNTER

JSR PC, @#SUB_PRINTCAPTIONS
Expand Down Expand Up @@ -391,6 +392,7 @@ NO_PLAY_SOUND:
CMP R5,#-1
BNE NO_STONE_HITTING
MOV #177777,@#GAMEOVERCOLOR
MOV #3,@#GAMEOVERCOLOR_LINE
JMP ENTER_GAMEOVER
NO_STONE_HITTING:

Expand Down Expand Up @@ -499,6 +501,42 @@ TIMERCICLEWAIT:
JMP START

ENTER_GAMEOVER:

MOV #20,-(SP) ; X
MOV #124,-(SP) ; Y
MOV #360,-(SP) ; DX - размер затираемой области по движению
MOV #40,-(SP) ; DY
JSR PC, @#CLEARZONE
ADD #10, SP ; Восстановить стек на 2*число аргументов

MOV #20,-(SP) ; X
MOV #124,-(SP) ; Y
MOV #41,-(SP) ; Height
MOV @#GAMEOVERCOLOR_LINE,-(SP) ; Color
JSR PC, @#DRAW_VERT_LINE
ADD #10, SP ; Восстановить стек на 2*число аргументов

MOV #360,-(SP) ; X
MOV #124,-(SP) ; Y
MOV #41,-(SP) ; Height
MOV @#GAMEOVERCOLOR_LINE,-(SP) ; Color
JSR PC, @#DRAW_VERT_LINE
ADD #10, SP ; Восстановить стек на 2*число аргументов

MOV #20,-(SP) ; X
MOV #124,-(SP) ; Y
MOV #340,-(SP) ; Width
MOV @#GAMEOVERCOLOR,-(SP) ; Color
JSR PC, @#DRAW_HORZ_LINE
ADD #10, SP ; Восстановить стек на 2*число аргументов

MOV #20,-(SP) ; X
MOV #164,-(SP) ; Y
MOV #340,-(SP) ; Width
MOV @#GAMEOVERCOLOR,-(SP) ; Color
JSR PC, @#DRAW_HORZ_LINE
ADD #10, SP ; Восстановить стек на 2*число аргументов

JSR PC, @#SUB_PRINTGAMEOVER
JSR PC, @#SOUND_PLAY_GAMEOVER

Expand Down
4 changes: 2 additions & 2 deletions src/sub_prints.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ SUB_PRINTGAMEOVER:
MOV R1,-(SP)
MOV R2,-(SP)

MOV #1,R1 ; позиция курсора
MOV #2,R2
MOV #3,R1 ; позиция курсора
MOV #10,R2
EMT 24

MOV @#GAMEOVERCOLOR,@#214
Expand Down
1 change: 1 addition & 0 deletions src/vars.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GENINTERVAL: .WORD 14
GENCOUNTER: .WORD 0
TEKSCORE: .WORD 0
GAMEOVERCOLOR: .WORD 0
GAMEOVERCOLOR_LINE: .WORD 0
TOTALDIAMONDSINGAME: .WORD 100
DEBUG: .WORD 0
STRBUF: .BYTE 0,0,0,0,0,0
Expand Down

0 comments on commit 13b9f52

Please sign in to comment.