PT_ wrote:
Which hook is called (or none) if you press + on a token (not necessary via the Catalog)? Is there already documentation about it?
http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:Catalog
OpenEditBuffer:
push hl
scf
sbc hl, hl
ld (hl), 2
ld hl, OP1+1
ld de, progToEdit
call _Mov8b
ld a, kPrgmEd
call _EnoughMem
ld a, kPrgmEd
call _NewContext
call _EnoughMem
pop hl
EditBufferSMC = $+1
ld de, 0
or a
sbc hl, de
push hl
pop bc
ld de, (editTop)
ld hl, (editTail)
jr z, +_
ldir
ld (editCursor), de
ld (editTail), hl
_: push bc
pop hl
push hl
EditorLoop:
ld de, (editTop)
or a
sbc hl, de
jr z, EditorFound
call _BufLeft
ld hl, (editCursor)
ld a, (hl)
cp tEnter
jr z, EditorFound
pop hl
inc hl
push hl
jr EditorLoop
EditorFound:
call _BufRight
call _DispEOW
pop hl
call _SetAToHLU
or a, h
or a, l
jr z, EditorMon
EditorScroll:
dec hl
call _SetAToHLU
or a, h
or a, l
jr z, EditorMon
push hl
call _CursorRight
pop hl
jr EditorScroll
EditorMon:
res 2, (iy+50)
res 7, (iy+20)
res 3, (iy+5)
jp _Mon
for i in range(num):
print("\t.dw _sprite_offset_"+str(i)+"\n")
Trying to open "graphics.asm"...
Succesfully opened!
Reading lines...
File found: "gfx/Buildings/gfx_buildings.inc"
Trying to open "gfx/Buildings/gfx_buildings.inc"...
Succesfully opened!
Reading lines...
File found: "gfx/Buildings/barracks.asm"
Trying to open "gfx/Buildings/barracks.asm"...
Succesfully opened!
Reading lines...
_barracks .equ 0000000h
_barracks_height .equ 81
File found: "gfx/Buildings/farm.asm"
Trying to open "gfx/Buildings/farm.asm"...
Succesfully opened!
Reading lines...
_farm .equ 0001E62h
_farm_height .equ 49
File found: "gfx/Buildings/house.asm"
Trying to open "gfx/Buildings/house.asm"...
Succesfully opened!
Reading lines...
_house .equ 00030C4h
_house_height .equ 56
File found: "gfx/Buildings/lumbercamp.asm"
Trying to open "gfx/Buildings/lumbercamp.asm"...
Succesfully opened!
Reading lines...
_lumbercamp .equ 0003EC6h
_lumbercamp_height .equ 46
File found: "gfx/Buildings/mill.asm"
Trying to open "gfx/Buildings/mill.asm"...
Succesfully opened!
Reading lines...
_mill .equ 0004A48h
_mill_height .equ 48
File found: "gfx/Buildings/miningcamp.asm"
Trying to open "gfx/Buildings/miningcamp.asm"...
Succesfully opened!
Reading lines...
_miningcamp .equ 000564Ah
_miningcamp_height .equ 41
File found: "gfx/Buildings/towncenter.asm"
Trying to open "gfx/Buildings/towncenter.asm"...
Succesfully opened!
Reading lines...
_towncenter .equ 000608Ch
_towncenter_height .equ 97
File found: "gfx/Gameplay/gfx_gameplay.inc"
Trying to open "gfx/Gameplay/gfx_gameplay.inc"...
Succesfully opened!
Reading lines...
File found: "gfx/Gameplay/resources.asm"
Trying to open "gfx/Gameplay/resources.asm"...
Succesfully opened!
Reading lines...
_resources .equ 000910Eh
_resources_height .equ 15
File found: "gfx/Tiles/gfx_tiles.inc"
Trying to open "gfx/Tiles/gfx_tiles.inc"...
Succesfully opened!
Reading lines...
File found: "gfx/Tiles/tile_test.asm"
Trying to open "gfx/Tiles/tile_test.asm"...
Succesfully opened!
Reading lines...
_tile_test .equ 000A3D0h
_tile_test_height .equ 17
File found: "gfx/Main/gfx_main1.inc"
Trying to open "gfx/Main/gfx_main1.inc"...
Succesfully opened!
Reading lines...
File found: "gfx/Main/AoCEI.asm"
Trying to open "gfx/Main/AoCEI.asm"...
Succesfully opened!
Reading lines...
_AoCEI_compressed .equ 000A5F2h
_AoCEI_compressed_height .equ 85
File found: "gfx/Main/soldier.asm"
Trying to open "gfx/Main/soldier.asm"...
Succesfully opened!
Reading lines...
_soldier_compressed .equ 000EB02h
_soldier_compressed_height .equ 222
File found: "gfx/Main/playhelpquit.asm"
Trying to open "gfx/Main/playhelpquit.asm"...
Succesfully opened!
Reading lines...
_playhelpquit_compressed .equ 0014610h
_playhelpquit_compressed_height .equ 116
File found: "gfx/Main/singlemultiplayer.asm"
Trying to open "gfx/Main/singlemultiplayer.asm"...
Succesfully opened!
Reading lines...
_singlemultiplayer_compressed .equ 0016968h
_singlemultiplayer_compressed_height .equ 80
File found: "gfx/Main/gfx_main2.inc"
Trying to open "gfx/Main/gfx_main2.inc"...
Succesfully opened!
Reading lines...
File found: "gfx/Main/pointer.asm"
Trying to open "gfx/Main/pointer.asm"...
Succesfully opened!
Reading lines...
_pointer .equ 001ADD8h
_pointer_height .equ 36
Succes!
; uhl = sqrt(uhl)
Sqrt24:
dec sp ; (sp) = ?
push hl ; (sp) = ?uhl
dec sp ; (sp) = ?uhl?
pop ix ; (sp) = ?u, uix = hl?
dec sp ; (sp) = ?u?
pop af ; af = u?
or a,a
sbc hl,hl
ex de,hl ; de = 0
sbc hl,hl ; hl = 0
ld bc,$C40 ; b = 12, c = 0x40
Sqrt24Loop:
sub a,c
sbc hl,de
jr nc,Sqrt24Skip
add a,c
adc hl,de
Sqrt24Skip:
ccf
rl e
rl d
add ix,ix
rla
adc hl,hl
add ix,ix
rla
adc hl,hl
djnz Sqrt24Loop
ex de,hl
ret
Advertisement