mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-29 05:49:19 +00:00
81 lines
3.4 KiB
Plaintext
81 lines
3.4 KiB
Plaintext
;
|
||
; File: InvalMenuBarPatch.a
|
||
;
|
||
; Contains: implementation of the InvalMenuBar trap as a patch
|
||
;
|
||
; Written by: Darin Adler
|
||
;
|
||
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
|
||
;
|
||
; This file is used in these builds: BigBang
|
||
;
|
||
; Change History (most recent first):
|
||
;
|
||
; <SM2> 5/20/92 TN Moved new InvalMenuBar routines to MenuMgrExtensions.a
|
||
; <7> 4/16/91 KSM dba,#86852: Add reentrancy bit to fix case where Think Pascal
|
||
; patches DrawMenuBar to call HiliteMenu and we die in a recursive
|
||
; patch conflict.
|
||
; <6> 3/29/91 JSM dba, #85831: Add support for MenuBarGlobalInvalidBit in
|
||
; ValidateMenuBarWhenDrawing and ValidateMenuBar.
|
||
; <5> 7/25/90 dba fix bug that shows up in THINK Pascal (which patches DrawMenuBar
|
||
; to call HiliteMenu) by clearing the invalid bit before calling
|
||
; DrawMenuBar; also get rid of the patch to CheckUpdate that calls
|
||
; validate, since the Layer Manager’s CheckUpdate has a call
|
||
; inside of it now
|
||
; <4> 7/13/90 KSM Add ValidateMenuBar call for WindowMgr's CheckUpdate comefrom
|
||
; patch and to save a tiny bit of code.
|
||
; <3> 7/9/90 KSM Changed InvalMenuBar proc to use opword.
|
||
; <2> 6/7/90 EMT Fix module names so they won’t be likely to conflict with other
|
||
; patches.
|
||
; <1> 4/9/90 dba new to the system today
|
||
;
|
||
; To Do:
|
||
; roll into Menu Manager and Window Manager source
|
||
;
|
||
|
||
load 'StandardEqu.d'
|
||
include 'LinkedPatchMacros.a'
|
||
include 'MenuMgrPriv.a'
|
||
|
||
|
||
;————————————————————————————————————————————————————————————————————————————————————————————————————
|
||
; DrawMenuBar clear MenuBarInvalidBit and MenuBarGlobalInvalidBit
|
||
;
|
||
; Note: We depend on the fact that this patch gets invoked after the Process Mgr patch that
|
||
; determines whether or not to actually draw the menu bar. Otherwise, we could clear the global
|
||
; dirty even if the DrawMenuBar never happens, which we don’t want to do.
|
||
|
||
; Clear the low memory bits whenever we draw the menu bar.
|
||
|
||
ValidateMenuBarWhenDrawing PatchProc _DrawMenuBar,(Plus,SE,II,Portable,IIci)
|
||
|
||
bclr #MenuBarInvalidBit,MenuBarInvalidByte ; clear the local invalid bit
|
||
bclr #MenuBarGlobalInvalidBit,MenuBarGlobalInvalidByte ; clear the global invalid bit <6>
|
||
jmpOld
|
||
|
||
EndProc
|
||
|
||
;————————————————————————————————————————————————————————————————————————————————————————————————————
|
||
; MenuSelect draw menu bar if invalid
|
||
|
||
DrawMenuBarIfInvalidOnMenuSelect PatchProc _MenuSelect,(Plus,SE,II,Portable,IIci)
|
||
|
||
IMPORT ValidateMenuBar
|
||
jsr ValidateMenuBar
|
||
jmpOld
|
||
|
||
EndProc
|
||
|
||
;————————————————————————————————————————————————————————————————————————————————————————————————————
|
||
; HiliteMenu draw menu bar if invalid
|
||
|
||
DrawMenuBarIfInvalidOnHiliteMenu PatchProc _HiliteMenu,(Plus,SE,II,Portable,IIci)
|
||
|
||
IMPORT ValidateMenuBar
|
||
jsr ValidateMenuBar
|
||
jmpOld
|
||
|
||
EndProc
|
||
|
||
end
|