Skip to content

Commit

Permalink
Fix build, fix sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpiroman committed Feb 15, 2020
1 parent afe804b commit a18f763
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion loader.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ LoadFailature:
%include "commonSubroutines.nasm"
times 0200h - 2 - ($ - $$) db 0 ; zerofill up to 510 bytes
times 200h - 2 - ($ - $$) db 0 ; zerofill up to 510 bytes
dw 0AA55h ; Boot Sector signature
16 changes: 8 additions & 8 deletions main.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ StartGame:
.end:
pop dx
dec byte [si+Column.posX]
add si, column_size
add si, Column_size
inc dl
cmp dl, [colCnt]
jne .columnLoop
mov al, column_size ; spawn new Column if necessary
mov al, Column_size ; spawn new column if necessary
mov ah, [colCnt]
dec ah
mul ah
Expand Down Expand Up @@ -206,7 +206,7 @@ StartGame:
jmp GameOver
.noGroundCollision:
cmp word [colCnt], 0 ; remove first Column if off view. add score. check Column collision
cmp word [colCnt], 0 ; remove first column if off view. add score. check column collision
je .noRemove
mov al, [cols+Column.posX]
inc al
Expand Down Expand Up @@ -237,10 +237,10 @@ StartGame:
dec byte [colCnt]
cld
mov si, cols
add si, column_size
add si, Column_size
mov di, cols
mov al, [colCnt]
mov ah, column_size
mov ah, Column_size
mul ah
xor cx, cx
mov cl, al
Expand Down Expand Up @@ -314,7 +314,7 @@ ClearScreen:
; args: dl = x
; invalidates: ax, bx, dx, di
SpawnColumn:
mov al, column_size
mov al, Column_size
mov ah, [colCnt]
mul ah
xor bx, bx
Expand Down Expand Up @@ -378,7 +378,7 @@ playerX db 15 ; const
playerY dd 0.0
playerYInt db 0
playerYVel dd 0.0
cols resb column_size * MAX_VISIBLE_COLUMNS
cols resb Column_size * MAX_VISIBLE_COLUMNS
colCnt db 0
score dw 0

Expand All @@ -396,4 +396,4 @@ updateInterval dd 1_000_000 / 20
restartDelay dd 250_000

%include "commonSubroutines.nasm"
times 1200h - ($ - $$) db 0 ; take up 3 segments
times (3 * 200h) - ($ - $$) db 0 ; take up 3 segments

0 comments on commit a18f763

Please sign in to comment.