home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Developer CD v1.2
/
amidev_cd_12.iso
/
devcon
/
milan_1991
/
devcon91.3
/
debug
/
debugger
/
s
/
wack
/
graphics.macros
< prev
next >
Wrap
Text File
|
1992-09-01
|
6KB
|
151 lines
;graphics.macros V1.5
;GRAPHICS GfxBase structure
(macro GfxBase
(Node (@l (+ (@l 4) 17a))) ;ExecBase.LibList
(while (and (!= (strcmp (@l ln_Name) "graphics.library") 0)
(!= (@l ln_Succ) 0))
(Node (@l ln_Succ)))
(addsymbol gb_LibNode ln_Succ)
(addsymbol gb_ActiView (+ gb_LibNode 22))
(addsymbol gb_copinit (+ gb_ActiView 4))
(addsymbol gb_cia (+ gb_copinit 4))
(addsymbol gb_blitter (+ gb_cia 4))
(addsymbol gb_LOFlist (+ gb_blitter 4))
(addsymbol gb_SHFlist (+ gb_LOFlist 4))
(addsymbol gb_blthd (+ gb_SHFlist 4))
(addsymbol gb_blttl (+ gb_blthd 4))
(addsymbol gb_bsblthd (+ gb_blttl 4))
(addsymbol gb_bsblttl (+ gb_bsblthd 4))
(addsymbol gb_vbsrv (+ gb_bsblttl 4))
(addsymbol gb_timsrv (+ gb_vbsrv 16))
(addsymbol gb_bltsrv (+ gb_timsrv 16))
(addsymbol gb_TextFonts (+ gb_bltsrv 16))
(addsymbol gb_DefaultFont (+ gb_TextFonts e))
(addsymbol gb_Modes (+ gb_DefaultFont 4))
(addsymbol gb_VBlank (+ gb_Modes 2))
(addsymbol gb_Debug (+ gb_VBlank 1))
(addsymbol gb_BeamSync (+ gb_Debug 1))
(addsymbol gb_system_bplcon0 (+ gb_BeamSync 2))
(addsymbol gb_SpriteReserved (+ gb_system_bplcon0 2))
(addsymbol gb_bytereserved (+ gb_SpriteReserved 1))
(addsymbol gb_Flags (+ gb_bytereserved 1))
(addsymbol gb_BlitLock (+ gb_Flags 2))
(addsymbol gb_BlitNest (+ gb_BlitLock 2))
(addsymbol gb_BlitWaitQ (+ gb_BlitNest 2))
(addsymbol gb_BlitOwner (+ gb_BlitWaitQ e))
(addsymbol gb_TOF_WaitQ (+ gb_BlitOwner 4))
(addsymbol gb_DisplayFlags (+ gb_TOF_WaitQ e))
(addsymbol gb_SimpleSprites (+ gb_DisplayFlags 2))
(addsymbol gb_MaxDisplayRow (+ gb_SimpleSprites 4))
(addsymbol gb_MaxDisplayColumn (+ gb_MaxDisplayRow 2))
(addsymbol gb_NormalDisplayRows (+ gb_MaxDisplayColumn 2))
(addsymbol gb_NormalDisplayColumns (+ gb_NormalDisplayRows 2))
(addsymbol gb_NormalDPMX (+ gb_NormalDisplayColumns 2))
(addsymbol gb_NormalDPMY (+ gb_NormalDPMX 2))
(addsymbol gb_LastChanceMemory (+ gb_NormalDPMY 2))
(addsymbol gb_LCMptr (+ gb_LastChanceMemory 4))
(addsymbol gb_MicrosPerLine (+ gb_LCMptr 4))
(addsymbol gb_reserved (+ gb_MicrosPerLine 2))
)
;GRAPHICS Layer structure
(macro Layer
(if (!= (nargs) 0)
(addsymbol l_front (arg 1))
(addsymbol l_front (current)))
(addsymbol l_back (+ l_front 4))
(addsymbol l_ClipRect (+ l_back 4))
(addsymbol l_rp (+ l_ClipRect 4))
(addsymbol l_bounds (+ l_rp 4))
(addsymbol l_reserved (+ l_bounds 8))
(addsymbol l_priority (+ l_reserved 4))
(addsymbol l_Flags (+ l_priority 2))
(addsymbol l_SuperBitMap (+ l_Flags 2))
(addsymbol l_SuperClipRect (+ l_SuperBitMap 4))
(addsymbol l_Window (+ l_SuperClipRect 4))
(addsymbol l_Scroll_X (+ l_Window 4))
(addsymbol l_Scroll_Y (+ l_Scroll_X 2))
(addsymbol l_cr (+ l_Scroll_Y 2))
(addsymbol l_cr2 (+ l_cr 4))
(addsymbol l_crnew (+ l_cr2 4))
(addsymbol l_SuperSaveClipRects (+ l_crnew 4))
(addsymbol l__cliprects (+ l_SuperSaveClipRects 4))
(addsymbol l_LayerInfo (+ l__cliprects 4))
(addsymbol l_Lock (+ l_LayerInfo 4))
(addsymbol l_reserved3 (+ l_Lock 2e))
(addsymbol l_ClipRegion (+ l_reserved3 8))
(addsymbol l_saveClipRects (+ l_ClipRegion 4))
(addsymbol l_reserved2 (+ l_saveClipRects 4))
(addsymbol l_DamageList (+ l_reserved2 16))
)
;GRAPHICS Layer_Info structure
(macro Layer_Info
(if (!= (nargs) 0)
(addsymbol li_top_layer (arg 1))
(addsymbol li_top_layer (current)))
(addsymbol li_check_lp (+ li_top_layer 4))
(addsymbol li_obs (+ li_check_lp 4))
(addsymbol li_FreeClipRects (+ li_obs 4))
(addsymbol li_Lock (+ li_FreeClipRects c))
(addsymbol li_gs_Head (+ li_Lock 2e))
(addsymbol li_longreserved (+ li_gs_Head e))
(addsymbol li_Flags (+ li_longreserved 4))
(addsymbol li_fatten_count (+ li_Flags 2))
(addsymbol li_LockLayersCount (+ li_fatten_count 1))
(addsymbol li_LayerInfo_extra_size (+ li_LockLayersCount 1))
(addsymbol li_blitbuff (+ li_LayerInfo_extra_size 2))
(addsymbol li_LayerInfo_extra (+ li_blitbuff 4))
)
;show some important GfxBase members
(macro gfxbase
(GfxBase)
(print "GfxBase at %8lx\n" gb_LibNode)
(print "Modes: %04lx\n" (@ gb_Modes))
(print "Flags: %04lx, DisplayFlags: %04lx\n\n"
(@ gb_Flags) (@ gb_DisplayFlags))
(print "ActiView at %8lx\n" (@l gb_ActiView))
(print "LOFlist at %8lx, SHFlist at %8lx\n"
(@l gb_LOFlist) (@l gb_SHFlist))
(print "Top of Display size stuff at %8lx\n" gb_MaxDisplayRow)
(print "SpriteReserved: %02lx\n" (@b gb_SpriteReserved))
(print "BlitLock: %04lx, BlitNest: %04lx\n"
(@ gb_BlitLock) (@ gb_BlitNest))
(print "BlitOwner at %8lx, BlitWaitQ at %8lx\n"
(@l gb_BlitOwner) gb_BlitWaitQ)
(print "LastCHanceMemory at %8lx\n" (@l gb_LastChanceMemory))
(print "LastCHanceMemory ptr %8lx\n" (@l gb_LCMptr))
(print "Debug (byte) at %8lx\n" gb_Debug)
)
;format given address or current frame as a Layer structure
(macro layer
(if (!= (nargs) 0)
(Layer (arg 1))
(Layer (current)))
(print "Layer at %8lx\n" l_front)
(print "Bounds: MinX = %ld, MinY = %ld, MaxX = %ld, MaxY = %ld\n"
(@ l_bounds) (@ (+ l_bounds 2)) (@ (+ l_bounds 4)) (@ (+ l_bounds 6)))
(print "Flags: %04lx\n" (@ l_Flags))
(print "Window at %8lx\n" (@l l_Window))
(print "Lock at %8lx\n" l_Lock)
(print "DamageList at %8lx\n" (@l l_DamageList))
)
;format given address or current frame as a Layer_Info structure
(macro linfo
(if (!= (nargs) 0)
(Layer_Info (arg 1))
(Layer_Info (current)))
(print "Layer_Info at %8lx\n" li_top_layer)
(print "Flags: %04lx\n" (@ li_Flags))
(print "top_layer at %8lx\n" (@l li_top_layer))
(print "layer info lock at %8lx\n" li_Lock)
(print "semaphore list gs_Head at %8lx\n" li_gs_Head)
)