[Refactor] jp [hl] -> jp hl; ld hl,[sp+N] -> ld hl,sp+N

This commit is contained in:
Abe Pralle 2020-05-30 21:03:34 -07:00
parent 71ede70bbe
commit f6644ee6fe
4 changed files with 9 additions and 9 deletions

View File

@ -39,7 +39,7 @@ routine rogo_build
local obj_files = String[]
forEach (asm_file in File.listing("Source/***/*.asm"))
local obj_file = "Build/$.obj" (File.filename(asm_file).leftmost(-4))
execute "rgbasm -Wextra $ -o $" (asm_file,obj_file)
execute "rgbasm -Wextra -Wobsolete $ -o $" (asm_file,obj_file)
obj_files.add( obj_file )
endForEach

View File

@ -156,7 +156,7 @@ LongCall::
ld [$2100],a
push hl
ld hl,[sp+6] ;point hl to empty spot in stack
ld hl,sp+6 ;point hl to empty spot in stack
ld [hl],e
inc hl
ld [hl],d ;save addr of method
@ -2191,7 +2191,7 @@ TimerDelay::
;---------------------------------------------------------------------
SetDialogSkip::
push hl
ld hl,[sp+4] ;stack ptr pos once returned from this fn
ld hl,sp+4 ;stack ptr pos once returned from this fn
ld a,e
ld [levelCheckSkip+2],a ;set skip forward addr
ld a,d
@ -2200,7 +2200,7 @@ SetDialogSkip::
SetDialogForward::
push hl
ld hl,[sp+4] ;stack ptr pos once returned from this fn
ld hl,sp+4 ;stack ptr pos once returned from this fn
ld a,e ;set fast forward addr
ld [levelCheckSkip],a
ld a,d
@ -2209,7 +2209,7 @@ SetDialogForward::
SetSkipStackPos::
push hl
ld hl,[sp+4] ;stack ptr pos once returned from this fn
ld hl,sp+4 ;stack ptr pos once returned from this fn
SetDialogCommon:
ld a,l
@ -2285,7 +2285,7 @@ SetLinkBailOutAddress::
ld [linkBailOut+1],a
;save stack pointer (plus a*2 + 6 for things pushed on stack)
ld hl,[sp+6]
ld hl,sp+6
pop af
or a
jr z,.afterAdjustStackPointer
@ -3508,7 +3508,7 @@ GeneratePauseMessage:
;write map coordinates
add sp,-24 ;create temporary buffer on stack
push hl
ld hl,[sp+2]
ld hl,sp+2
ld d,h
ld e,l
ld [hl],16 ;spaces to center

View File

@ -11453,7 +11453,7 @@ WispCheck:
call GetCurLocation
push hl
call .wispRemove
ld hl,[sp+2] ;other object's location
ld hl,sp+2 ;other object's location
ld a,[hl+]
ld h,[hl]
ld l,a

View File

@ -671,7 +671,7 @@ LoadMap::
ld a,OBJROM
call SetActiveROM
ld hl,[sp+0]
ld hl,sp
ld a,l
ld [loadStackPosL],a
ld a,h