antoine-source/appleworksgs/WP/Src/Fonts.aii

1 line
15 KiB
Plaintext
Raw Normal View History

2023-03-04 02:45:20 +00:00
load 'macros.dump' include 'driver.equ' include 'wp.equ' ;----------------------------------------------- ; ; Imported addresses ; ;----------------------------------------------- IMPORT D_BeachBall IMPORT W_CalcDocRect IMPORT W_CalcFBytes IMPORT W_CalcPages IMPORT D_CheckMenuFID IMPORT W_ColorFl IMPORT W_CurDoc IMPORT W_DoRoom IMPORT EFont IMPORT W_EndLine IMPORT W_EndOffset IMPORT W_EndPar IMPORT W_FindFont IMPORT W_FindLine IMPORT W_FontFl IMPORT W_GetAddr IMPORT W_GetParRec IMPORT W_JunkLeft IMPORT W_JunkRight IMPORT D_KillFont IMPORT W_MakeLines IMPORT W_NewColor IMPORT W_NewFont IMPORT W_NewInvStyle IMPORT W_NewSize IMPORT W_NewStyle IMPORT W_ParRec IMPORT W_PutOnScreen IMPORT W_ReadFont IMPORT SFont IMPORT W_SetDocRect IMPORT D_SetFileChanged IMPORT W_SetFullREct IMPORT W_SizeFl IMPORT W_StartLine IMPORT W_StartOffset IMPORT W_StartPar IMPORT W_StyleFl IMPORT W_UndoHandle IMPORT W_UndoOn IMPORT W_UpdateText IMPORT W_UpdateDoc IMPORT W_WPColor IMPORT W_WpFont IMPORT W_WPFontFlag IMPORT W_WPSize IMPORT W_WpStyle IMPORT W_WPUndoType IMPORT W_WpCopy IMPORT W_WriteFBytes IMPORT Q_Rect IMPORT W_Selected ;----------------------------------------------- ; ; Forward addresses and entries ; ;----------------------------------------------- ENTRY W_CalcFonts ENTRY W_CalcNewLines ENTRY W_DoChange ENTRY W_KillChanges ENTRY W_NoSC ******************************************************************** * Includes... * * Monday, May 1, 1989 12:36:36 AM ******************************************************************** **************************************************************** W_TextChange PROC EXPORT ;Using wpglobals EXPORT W_NoSC local ChrPtr:l,CurPar:w,W_ParRec:l,Q_Rect:r,EOffset2:w,SFlag:w local SFont1:l,SColor1:w,SFont2:l,SColor2:w,EFont1:l,EColor1:w local EFont2:l,EColor2:w,SOffset1:w,SOffset2:w,EOffset1:w,EFlag:w begin ; SStyle equ SFont+2 ; SSize equ SStyle+1 ; EStyle equ EFont+2 ; ESize equ EStyle+1 lda W_Selected jeq TCExit pushlong W_CurDoc jsl D_SetFileChanged pushword W_StartPar pushword W_StartLine pushlong #0 jsl W_PutOnScreen cmpw #W_StyleUndo,W_WPUndoType beq UndoBeOn pushword #W_StyleUndo jsl W_UndoOn spacelong pushword W_StartPar pushword W_StartLine pushword W_StartOffset pushword W_EndPar pushword W_EndLine pushword W_EndOffset jsl W_WpCopy pulllong W_UndoHandle bcc UndoBeOn stz W_WPUndoType UndoBeOn stz SFlag stz EFlag pha pushword W_StartPar pushword W_StartLine pushword W_StartOffset jsl W_JunkLeft pullword SOffset1 pha pushword W_StartPar pushword W_StartLine pushword W_StartOffset jsl W_JunkRight pullword SOffset2 pha pushword W_EndPar pushword W_EndLine pushword W_EndOffset jsl W_JunkLeft pullword EOffset1 pha pushword W_EndPar pushword W_EndLine pushword W_EndOffset jsl W_JunkRight pullword EOffset2 spacelong spaceword pushword W_StartPar pushword W_StartLine pushword SOffset1 jsl W_FindFont pullword SColor1 pulllong SFont1 spacelong spaceword pushword W_StartPar pushword W_StartLine pushword SOffset2 jsl W_FindFont pullword SColor2 pulllong SFont2 spacelong spaceword pushword W_EndPar pushword W_EndLine pushword EOffset1 jsl W_FindFont pullword EColor1 pulllong EFont1 spacelong spaceword pushword W_EndPar pushword W_EndLine pushword EOffset2 jsl W_FindFont pullword EColor2 pulllong EFont2 moveword SOffset2,W_StartOffset moveword EOffset1,W_EndOffset lda W_EndPar ldx EOffset2 jsl W_GetAddr movelong ax,ChrPtr cmpb [ChrPtr],#cr bne NotEnd inc EFlag NotEnd cmpw SOffset1,#W_TextHeader bne NotSt inc SFlag stz W_StartOffset NotSt ;first change the font lda W_FontFl beq W_NoFC lda W_NewFont sta SFont2 sta EFont1 pushword #0 pushword #1 pushword W_NewFont jsl W_DoChange W_NoFC ;now check for a size change lda W_SizeFl jeq W_NoSC shortm moveword W_NewSize,SFont2+3 sta EFont1