antoine-source/appleworksgs/PL/Src/POBJECT.S

1 line
13 KiB
ArmAsm
Raw Normal View History

2023-03-04 02:45:20 +00:00
load 'macros.dump' include 'driver.equ' ;----------------------------------------------- ; ; Imported addresses ; ;----------------------------------------------- IMPORT P_PageRect IMPORT P_FullPageRect IMPORT D_Deref IMPORT D_DrawPicture IMPORT D_MemoryError IMPORT D_NeedHand IMPORT P_AddThreadRgn IMPORT P_AppleFuck IMPORT P_BuildUndo IMPORT P_DefColor IMPORT P_DefFont IMPORT P_DefJust IMPORT P_DefSize IMPORT P_DefStyle IMPORT P_DrawHandles IMPORT P_DrawRgn IMPORT P_DrawSpec IMPORT P_ExplodeRect IMPORT P_FillMode IMPORT P_FixRect IMPORT P_FixSpecRect IMPORT P_GetPictSize IMPORT P_LastObj IMPORT P_LineAdjust IMPORT P_LineSize IMPORT P_ListOp IMPORT P_MagGuides IMPORT P_MagValue IMPORT P_MakeFigure IMPORT P_NewClip IMPORT P_ObjList IMPORT P_OldClip IMPORT P_Page IMPORT P_PageMode IMPORT P_SetDelFlag IMPORT P_SetPen IMPORT P_SetSpecStr IMPORT P_SmallRect IMPORT P_SpecStr IMPORT P_ValidRect IMPORT D_RectSect IMPORT D_SectClipRect IMPORT D_SetCursor IMPORT T_Activate IMPORT T_CurParHdl IMPORT T_Editing IMPORT T_New IMPORT T_Update IMPORT P_GetModifiers ;----------------------------------------------- ; ; Forward addresses and entries ; ;----------------------------------------------- ENTRY P_NewObj ENTRY P_ObjSizes include 'pl.equ' ;------------------------------------------------------------------------------ ; ; P_InsertObj (ObjHdl:l,PlaceHdl:l) ; ; Inserts the object after PlaceHdl. P_InsertObj PROC EXPORT ;Using P_Data ;Using P_ObjData INPUT ObjHdl:l,PlaceHdl:l LOCAL ObjPtr:l,NextObj:l,NextPtr:l,PlacePtr:l BEGIN cmpl PlaceHdl,P_LastObj bne NotLast movelong ObjHdl,P_LastObj NotLast movelong [ObjHdl],ObjPtr movelong PlaceHdl,[ObjPtr]:#P_Prev cpzl PlaceHdl bne NotFirst movelong P_ObjList,[ObjPtr]:#P_Next movelong P_ObjList,NextObj movelong ObjHdl,P_ObjList cpzl NextObj beq Done movelong [NextObj],NextPtr movelong ObjHdl,[NextPtr]:#P_Prev bra Done NotFirst movelong [PlaceHdl],PlacePtr movelong [PlacePtr],NextObj movelong ObjHdl,[PlacePtr]:#P_Next movelong NextObj,[ObjPtr]:#P_Next cpzl NextObj beq Done movelong [NextObj],NextPtr movelong ObjHdl,[NextPtr]:#P_Prev Done RETURN ENDP ;----------------------------------------------------------------------------- ; ; P_RemoveObj (ObjHdl:l) ; P_RemoveObj PROC EXPORT ;Using P_Data ;Using P_ObjData INPUT ObjHdl:l LOCAL ObjPtr:l,NextObj:l,PrevObj:l,Temp:l BEGIN movelong [ObjHdl],ObjPtr movelong [ObjPtr],NextObj movelong [ObjPtr]:#P_Prev,PrevObj DoPrev cpzl PrevObj bne Normal movelong NextObj,P_ObjList bra DoNext Normal movelong [PrevObj],Temp movelong NextObj,[Temp] DoNext cpzl NextObj bne Normal2 movelong PrevObj,P_LastObj bra Exit Normal2 movelong [NextObj],Temp movelong PrevObj,[Temp]:#P_Prev Exit RETURN ENDP ;------------------------------------------------------------------------------ ; P_DeselectAll () ; P_DeselectAll PROC EXPORT ;Using P_Data ;Using P_ObjData BEGIN call P_ListOp,in=(P_ObjList:l,#PL_DeselectAll:w,#0:l,#0:l) RETURN ENDP ;------------------------------------------------------------------------------ ; ; P_SelectRect (Q_Rect:r) ; ; Adds objects completely inside the rectangle to the selected ; list using eor. P_SelectRect PROC EXPORT ;Using P_Data ;Using P_ObjData INPUT Q_Rect:r BEGIN call P_ValidRect,in=(!Q_Rect:l),out=(a:w) call P_ListOp,in=(P_ObjList:l,#PL_SelRect:w,!Q_Rect:l,#0:l) RETURN ENDP ;----------------------------------------------------------------------------- ; ; P_DelObjects (Type:w) ; ; Marks all the selected objects as deleted and updates the screen. P_DelObjects PROC EXPORT ;Using P_Data ;Using P_ObjData INPUT Type:w LOCAL RgnHdl:l BEGIN tool _NewRgn,out=(RgnHdl:l) call P_ListOp,in=(P_ObjList:l,#PL_AddUpdate:w,RgnHdl:l,#0:l) call P_SetDelFlag,in=(#1:w) call P_DrawRgn,in=(RgnHdl:l) Exit RETURN ENDP ;---------------------------------------------------------------------------