Skip to content

Commit

Permalink
add gums and superGuls
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre2103 committed Dec 11, 2023
1 parent 87faa4e commit c7e75f7
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 31 deletions.
72 changes: 43 additions & 29 deletions pacMan/pacman.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ section .data
frame db 1
; maze array
maze db 26,22,22,22,22,22,22,22,22,22,22,22,22,30,31,22,22,22,22,22,22,22,22,22,22,22,22,27
db 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24
db 25, 0,14,10,10,15, 0,14,10,10,10,15, 0,13,12, 0,14,10,10,10,15, 0,14,10,10,15, 0,24
db 25, 0,13, 0, 0,12, 0,13, 0, 0, 0,12, 0,13,12, 0,13, 0, 0, 0,12, 0,13, 0, 0,12, 0,24
db 25, 0,17,11,11,16, 0,17,11,11,11,16, 0,17,16, 0,17,11,11,11,16, 0,17,11,11,16, 0,24
db 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24
db 25, 0,14,10,10,15, 0,14,15, 0,14,10,10,10,10,10,10,15, 0,14,15, 0,14,10,10,15, 0,24
db 25, 0,17,11,11,16, 0,13,12, 0,17,11,11,19,18,11,11,16, 0,13,12, 0,17,11,11,16, 0,24
db 25, 0, 0, 0, 0, 0, 0,13,12, 0, 0, 0, 0,13,12, 0, 0, 0, 0,13,12, 0, 0, 0, 0, 0, 0,24
db 29,23,23,23,23,15, 0,13,21,10,10,15, 0,13,12, 0,14,10,10,20,12, 0,14,23,23,23,23,28
db 0, 0, 0, 0, 0,25, 0,13,18,11,11,16, 0,17,16, 0,17,11,11,19,12, 0,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 0,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 0,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 0,13,12, 0,38,23,36, 1, 1,37,23,39, 0,13,12, 0,24, 0, 0, 0, 0, 0
db 22,22,22,22,22,16, 0,17,16, 0,24, 0, 0, 0, 0, 0, 0,25, 0,17,16, 0,17,22,22,22,22,22
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24, 0, 0, 0, 0, 0, 0,25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
db 23,23,23,23,23,15, 0,14,15, 0,24, 0, 0, 0, 0, 0, 0,25, 0,14,15, 0,14,23,23,23,23,23
db 0, 0, 0, 0, 0,25, 0,13,12, 0,41,22,22,22,22,22,22,40, 0,13,12, 0,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 0,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 0,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 0,13,12, 0,14,10,10,10,10,10,10,15, 0,13,12, 0,24, 0, 0, 0, 0, 0
db 26,22,22,22,22,16, 0,17,16, 0,17,11,11,19,18,11,11,16, 0,17,16, 0,17,22,22,22,22,27
db 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24
db 25, 0,14,10,10,15, 0,14,10,10,10,15, 0,13,12, 0,14,10,10,10,15, 0,14,10,10,15, 0,24
db 25, 0,17,11,19,12, 0,17,11,11,11,16, 0,17,16, 0,17,11,11,11,16, 0,13,18,11,16, 0,24
db 25, 0, 0, 0,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 0, 0, 0,24
db 33,10,15, 0,13,12, 0,14,15, 0,14,10,10,10,10,10,10,15, 0,14,15, 0,13,12, 0,14,10,34
db 32,11,16, 0,17,16, 0,13,12, 0,17,11,11,19,18,11,11,16, 0,13,12, 0,17,16, 0,17,11,35
db 25, 0, 0, 0, 0, 0, 0,13,12, 0, 0, 0, 0,13,12, 0, 0, 0, 0,13,12, 0, 0, 0, 0, 0, 0,24
db 25, 0,14,10,10,10,10,20,21,10,10,15, 0,13,12, 0,14,10,10,20,21,10,10,10,10,15, 0,24
db 25, 0,17,11,11,11,11,11,11,11,11,16, 0,17,16, 0,17,11,11,11,11,11,11,11,11,16, 0,24
db 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,24
db 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,13,12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,24
db 25, 2,14,10,10,15, 2,14,10,10,10,15, 2,13,12, 2,14,10,10,10,15, 2,14,10,10,15, 2,24
db 25, 3,13, 0, 0,12, 2,13, 0, 0, 0,12, 2,13,12, 2,13, 0, 0, 0,12, 2,13, 0, 0,12, 3,24
db 25, 2,17,11,11,16, 2,17,11,11,11,16, 2,17,16, 2,17,11,11,11,16, 2,17,11,11,16, 2,24
db 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,24
db 25, 2,14,10,10,15, 2,14,15, 2,14,10,10,10,10,10,10,15, 2,14,15, 2,14,10,10,15, 2,24
db 25, 2,17,11,11,16, 2,13,12, 2,17,11,11,19,18,11,11,16, 2,13,12, 2,17,11,11,16, 2,24
db 25, 2, 2, 2, 2, 2, 2,13,12, 2, 2, 2, 2,13,12, 2, 2, 2, 2,13,12, 2, 2, 2, 2, 2, 2,24
db 29,23,23,23,23,15, 2,13,21,10,10,15, 2,13,12, 2,14,10,10,20,12, 2,14,23,23,23,23,28
db 0, 0, 0, 0, 0,25, 2,13,18,11,11,16, 0,17,16, 0,17,11,11,19,12, 2,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 2,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 2,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 2,13,12, 0,38,23,36, 1, 1,37,23,39, 0,13,12, 2,24, 0, 0, 0, 0, 0
db 22,22,22,22,22,16, 2,17,16, 0,24, 0, 0, 0, 0, 0, 0,25, 0,17,16, 2,17,22,22,22,22,22
db 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,24, 0, 0, 0, 0, 0, 0,25, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0
db 23,23,23,23,23,15, 2,14,15, 0,24, 0, 0, 0, 0, 0, 0,25, 0,14,15, 2,14,23,23,23,23,23
db 0, 0, 0, 0, 0,25, 2,13,12, 0,41,22,22,22,22,22,22,40, 0,13,12, 2,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 2,13,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,12, 2,24, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0,25, 2,13,12, 0,14,10,10,10,10,10,10,15, 0,13,12, 2,24, 0, 0, 0, 0, 0
db 26,22,22,22,22,16, 2,17,16, 0,17,11,11,19,18,11,11,16, 0,17,16, 2,17,22,22,22,22,27
db 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,13,12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,24
db 25, 2,14,10,10,15, 2,14,10,10,10,15, 2,13,12, 2,14,10,10,10,15, 2,14,10,10,15, 2,24
db 25, 2,17,11,19,12, 2,17,11,11,11,16, 2,17,16, 2,17,11,11,11,16, 2,13,18,11,16, 2,24
db 25, 3, 2, 2,13,12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,13,12, 2, 2, 3,24
db 33,10,15, 2,13,12, 2,14,15, 2,14,10,10,10,10,10,10,15, 2,14,15, 2,13,12, 2,14,10,34
db 32,11,16, 2,17,16, 2,13,12, 2,17,11,11,19,18,11,11,16, 2,13,12, 2,17,16, 2,17,11,35
db 25, 2, 2, 2, 2, 2, 2,13,12, 2, 2, 2, 2,13,12, 2, 2, 2, 2,13,12, 2, 2, 2, 2, 2, 2,24
db 25, 2,14,10,10,10,10,20,21,10,10,15, 2,13,12, 2,14,10,10,20,21,10,10,10,10,15, 2,24
db 25, 2,17,11,11,11,11,11,11,11,11,16, 2,17,16, 2,17,11,11,11,11,11,11,11,11,16, 2,24
db 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,24
db 29,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,28
; ---------------------------------------------------------------------
Column dw 28 ; number of columns
Expand Down Expand Up @@ -139,6 +139,10 @@ section .text
je DrawEmpty ;
cmp al, 1
je DrawDoor
cmp al, 2
je DrawGum
cmp al, 3
je DrawSuperGum
cmp al, 10
je DrawSmplwall1
cmp al, 11
Expand Down Expand Up @@ -207,6 +211,16 @@ section .text
; END WALL CHOICE -----------------

; SET WALL ------------------------
DrawGum:
mov si, gum
call drawWalls
jmp wallchoice
DrawSuperGum:
mov si, superGum
call drawWalls
jmp wallchoice

DrawEmpty: ; tell which sprite he want to draw
mov si, empty ; call the function to draw the tile
call drawWalls ; return to the function where he will look which sprite to use
Expand Down
9 changes: 7 additions & 2 deletions pacMan/sprite.asm
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,13 @@ section .data
db 0x00, 0x57, 0x57, 0x57, 0x57, 0x00

;gum
gum db 0x57, 0x57
db 0x57, 0x57
gum db 0x00,0x00,0x00,0x00,0x00,0x00
db 0x00,0x00,0x00,0x00,0x00,0x00
db 0x00,0x00,0x57,0x57,0x00,0x00
db 0x00,0x00,0x57,0x57,0x00,0x00
db 0x00,0x00,0x00,0x00,0x00,0x00
db 0x00,0x00,0x00,0x00,0x00,0x00


; maze patterns sprite ------------------------------------------------
; simple wall
Expand Down

0 comments on commit c7e75f7

Please sign in to comment.