home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-21 | 110.5 KB | 5,403 lines |
- *************************************************
- * *
- * (C)opyright 1991 *
- * *
- * by Tomi Blinnikka *
- * *
- * Don´t try to understand the code *
- * *
- * Version 0.01a 25/07/1991 *
- * - 0.98ö 24/12/1991 *
- * *
- * BUGS: (Not finished) *
- * *
- *************************************************
-
- *************************************************
- * *
- * ADD THESE *
- * *
- * Timer etc. *
- * *
- * A check if .QUE is at the end of filename *
- * when saving in questions format. If not, *
- * add it. *
- * *
- * After save, re-activate the first (or last *
- * used) gadget. *
- * *
- * Ask in random order *
- * *
- * Goto # question *
- * *
- * *
- * *
- *************************************************
-
- INCDIR "INCLUDES:"
- INCLUDE "JMPLibs.i"
- INCLUDE "exec/types.i"
- INCLUDE "libraries/dos.i"
- ; INCLUDE "libraries/reqbase.i"
- INCLUDE "libraries/diskfont.i"
- INCLUDE "graphics/gfx.i"
- INCLUDE "graphics/gels.i"
- ; INCLUDE "intuition/intuition.i"
- INCLUDE "intuition/gadgetclass.i"
- INCLUDE "libraries/gadtools.i"
-
- INCLUDE "XREF:2.0.xref"
-
- INCLUDE "XREF:gfx.xref"
- INCLUDE "XREF:intuition.xref"
- INCLUDE "XREF:exec.xref"
- INCLUDE "XREF:dos.xref"
- INCLUDE "XREF:diskfont.xref"
-
- ;Gee, don't you just hate XREFs and XDEFs?
-
- XREF IOMode
- XREF Help
- XREF Load
- XREF LoadV
- XREF Save
- XREF SaveAs
- XREF Prefs20
- XREF SToW5
- XREF SToW7
- XREF PrefsWin1
- XREF NoPrefsWin1
- XREF glist2
- XREF mlist2
- XREF GadMagic2
- XREF MenuMagic2
- XREF glist3
- XREF mlist3
- XREF GadMagic3
- XREF MenuMagic3
- XREF DefPrefs
- XREF Talk
- XREF TalkSys
- XREF TalkDes
- XREF TalkQue
- XREF TalkAns
- XREF TalkScore
- XREF IHandler
- XREF FileRequest2
- XREF SpeakName
- XREF SpeakName2
- XREF PrefsFile
- XREF SpeakFile
- XREF SpeakFile2
- XREF FRPathName2
- XREF Colors
- XREF ColorsBuf
- XREF P1CheckFile
- XREF PrefsBuf
- XREF CurrentPrefs
- XREF PrefsSize
- XREF MakeIHand
- XREF RemIHand
- XREF SigBit2
- XREF OurIntuiMsg
-
- XDEF OKTxt
- XDEF FCorruptTxt1
- XDEF FileMem1
- XDEF FileLeng1
- XDEF InitQAList
- XDEF AddMode
- XDEF AddQues
- XDEF CheckFile
- XDEF VCheckFile
- XDEF _stdout
- XDEF DesStrGad1
- XDEF OurTask
- XDEF SysPrefsBuf
- XDEF About
- XDEF Find
- XDEF DesMem1
- XDEF FRPathName
- XDEF SaveQuestion
- XDEF GetLength
- XDEF KillQueMem1
- XDEF QueCount
- XDEF QueCount2
- XDEF QueFile
- XDEF NoMem1
- XDEF NotSupported
- XDEF FileRequester
- XDEF PrintTeach
- XDEF DoTeach
- XDEF QAList
- XDEF SetActivation
- XDEF OthActivation
- XDEF OthActivation1
- XDEF NoHelpWin1
- XDEF LoadName
- XDEF LoadName2
- XDEF SaveName
- XDEF LoadCommKey
- XDEF SaveCommKey
- XDEF SaveAsCommKey
- XDEF QuitCommKey
- XDEF QuitMenu1I2Text
- XDEF PrefsM2Text
- XDEF PrefsM3Text
- XDEF PrefsM4Text
- XDEF Speaker
- XDEF Window1IDCMP
- XDEF vi
- XDEF Screen1
- XDEF ViewPort1
- XDEF SS_Font1
- XDEF SS_Load
- XDEF SS_Load2
- XDEF SS_Load3
- XDEF SS_Save
- XDEF SS_Save2
- XDEF SS_SaveAs
- XDEF SS_SaveAs2
- XDEF SS_Help
- XDEF SS_HelpHelp
- XDEF SS_Next2
- XDEF SS_Prev2
- XDEF SS_Prefs
- XDEF SS_Colors
- XDEF SS_On
- XDEF SS_Done
- XDEF SS_Default
- XDEF SS_Next2
- XDEF SS_Prev2
- XDEF SS_Quit
- XDEF SS_Use
- XDEF SS_Page1
- XDEF SS_Page2
- XDEF SS_Page3
- XDEF SS_Page4
- XDEF SS_Page5
- XDEF SS_Page6
- XDEF SS_Page7
- XDEF SS_Page8
- XDEF SS_Page9
- XDEF SS_Page10
- XDEF SS_Page11
- XDEF SS_Page12
- XDEF SS_Page13
- XDEF SS_Page14
- XDEF SS_Page15
- XDEF SS_Page16
- XDEF SS_Page17
- XDEF SS_Page18
- XDEF SS_Page19
- XDEF SS_Page20
- XDEF SS_ERR_Win1
- XDEF SS_ERR_File1
- XDEF SS_ERR_File2
- XDEF SS_ERR_File3
- XDEF SS_ERR_File4
- XDEF SS_ERR_Font1
- XDEF Mode
- XDEF Que
- XDEF VQue
- XDEF VType
- XDEF NumQ
- XDEF Game
- XDEF AskReplace
- XDEF ClockPointer1
- XDEF SimpleRequest
- XDEF TwoGadRequest
- XDEF MenusOff
- XDEF FileError
- XDEF MenusOn
- XDEF SleepPointer
- XDEF NormalPointer
- XDEF MenuNull
- XDEF CheckIDCMP
- XDEF ClearMSGs
- XDEF OKTxt
- XDEF _GadToolsBase
- XDEF _IntuitionBase
- XDEF _DosBase
- XDEF _GfxBase
- XDEF _ReqBase
- XDEF _DiskfontBase
- XDEF ShutDown
- XDEF QName
- XDEF Topaz
- XDEF TopazName
- XDEF PrefTop
- XDEF Window1
- XDEF MainMGad1
- XDEF MainMenu
-
- DesTop: EQU 14 ;Desciption Y-Top
- QueTop: EQU 77 ;Question Y-Top
- MulTop: EQU 99 ;Multiselect Y-Top
- AnsTop: EQU 190 ;Answer Y-Top
- NameTop: EQU 105 ;Name Y-Top
- TimTop: EQU 46 ;Timer Y-Top
- NumQTop: EQU 56 ;Number(of)Questions Y-Top
- ScoTop: EQU 66 ;Score Y-Top
- OptionTop: EQU 59 ;Option(Teacher BOOL gad) Y-Top
- OptionTop2: EQU 56 ;Option(Teacher BOOL gad) Y-Top
- OptionTop3: EQU 47 ;Option(Teacher BOOL gad) Y-Top
- PrefTop: EQU -130 ;Preference(BOOL gad) Y-Top
- MainMTop: EQU 40 ;Preference(BOOL gad) Y-Top
- InfoLeft1: EQU 300 ;Info Left Edge
- InfoLeft2: EQU 520 ;Info Left Edge
- TypeLeft: EQU 5 ;Type Left Edge
- CheckLeft: EQU 534 ;CASE/ORDER/PUNC Left Edge
- CheckTop: EQU 14 ;CASE/ORDER/PUNC Left Edge
-
- StudentMenuN: EQU $F804
- TeachMenuN: EQU $F824
-
- MaxStrings: EQU 11
- MaxButtons: EQU 10
-
- TRUE: EQU 1
- OURCODE: EQU $DEADBEEF
-
- DGadTools: set 1
- DReq: set 1
-
- section Q,CODE
-
- Start: push d2-d7/a2-a6
-
- sub.l a1,a1 ;Find our task
- lib Exec,FindTask
- move.l d0,OurTask
- move.l d0,a4
-
- move.l pr_CLI(a4),d0
- bne OpenDos
-
- lea.l pr_MsgPort(a4),a0
- lib Exec,WaitPort
- lea.l pr_MsgPort(a4),a0
- lib Exec,GetMsg
- move.l d0,WBMsg
-
- OpenDos: openlib Dos,NoDos
-
- tst.l WBMsg
- beq CLIStart
-
- lea.l NILName,a0
- move.l a0,d1
- move.l #MODE_NEWFILE,d2
- lib Dos,Open
- move.l d0,NILFile
- beq ShutDown
- move.l NILFile,_stdout
- jmp MainStart
-
- CLIStart: lib Dos,Output
- move.l d0,_stdout
-
- ;Init list here so ks1.3 doesn't crash...
-
- MainStart: jsr InitQAList
-
- ;To see if we have ks2.0 we'll try to open the gadtools.library
-
- move.l #37,d0
- lea.l _GadToolsLib,a1
- lib Exec,OpenLibrary
- move.l d0,_GadToolsBase
- beq NoKS20
-
- ;Go make us all one input handler
-
- jsr MakeIHand
- tst.l d0
- beq ShutDown
-
- openlib Intuition,ShutDown
- openlib Gfx,ShutDown
- move.l #2,d0
- lea.l _ReqLib,a1
- lib Exec,OpenLibrary
- move.l d0,_ReqBase
- beq NoReq
-
- ;Open diskfont.library
-
- openlib Diskfont,NoDiskfont
-
- ;Get system pref-colors.
-
- lea.l SysPrefsBuf,a0
- move.l #118,d0
- lib Intuition,GetPrefs
-
- ;Load user preferences
-
- lea.l FRPathName2,a1
- move.l a1,d1
- cmp.b #$00,(a1)
- beq PrefsLoad_OUT2
- move.l #MODE_OLDFILE,d2
- lib Dos,Open
- move.l d0,PrefsFile
- beq NoPrefsFile
-
- PrefsLoad1: jsr P1CheckFile
- tst.l d0
- beq PrefsLoad_OUT.1
-
- PrefsLoad2: move.l PrefsFile,d1
- lea.l ColorsBuf,a0
- move.l a0,d2
- move.l #PrefsSize-4,d3
- lib Dos,Read
- tst.l d0
- bne PrefsLoad_OUT1
- jsr FileError
- lea.l SS_ERR_File1,a0
- jsr Speaker
- jmp PrefsLoad_OUT.1
-
- NoPrefsFile: lea.l SysPrefsBuf,a0
- move.l $6e(a0),Colors
- move.l $6e+4(a0),Colors+4
- jmp PrefsLoad_OUT2
-
- PrefsLoad_OUT1: lea.l PrefsBuf,a0
- lea.l CurrentPrefs,a1
- move.l #PrefsSize,d0
- lib Exec,CopyMem
-
- PrefsLoad_OUT.1 move.l PrefsFile,d1
- lib Dos,Close
- move.l #$00,PrefsFile
-
- PrefsLoad_OUT2: tst.w Talk
- beq PrefsLoad_OUT3
- lea.l SpeakName,a0
- move.l a0,d1
- move.l #MODE_NEWFILE,d2
- lib Dos,Open
- move.l d0,SpeakFile
- beq NoSpeaking
-
- PrefsLoad_OUT3:
-
- OpenLibs: ;openlib Iff,ShutDown
-
- lea.l Screen1Font,a0
- lib Diskfont,OpenDiskFont
- move.l d0,FontFile
- bne OpenLibs2
- lea.l NoFontText1,a0
- move.l #$00,a1
- jsr SimpleRequest
-
- OpenLibs2: jsr Do2.0Magic
-
- ;Open Window1
-
- StartWin1: move.l Screen1,d0
- lea.l NewWindow1,a0
- move.l d0,nw_Screen(a0)
- move.l d0,a1
- move.l sc_Width(a1),nw_Width(a0)
- move.l d0,SToW2
- move.l d0,SToW3
- move.l d0,SToW4
- move.l d0,SToW5
- move.l d0,SToW6
- move.l d0,SToW7
- add.l #$2c,d0
- move.l d0,ViewPort1
-
- move.l ViewPort1,a0
- lea.l Colors,a1
- move.l #$04,d0
- lib Gfx,LoadRGB4
-
- lea.l NewWindow1,a0
- lib Intuition,OpenWindow
- move.l d0,Window1
- beq NoWindow1
- move.l d0,a0
- move.l $32(a0),RP1
-
- ;move requesters to Window1
-
- move.l OurTask,a0
- move.l $b8(a0),OldTaskWinPtr
- move.l Window1,$b8(a0)
-
-
- ;Reserve memory for description
- ;
- ;We're going to add 12 bytes to the amount of memory to be reserved,
- ;just in case.
-
- move.l #DesLeng+12,d0
- move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 ;Type of memory wanted
- lib Exec,AllocMem ;Allocate memory
- move.l d0,DesMem1
- bne AddMens1
- jsr NoMem1 ;Tell user about memory
- jmp ShutDown
-
- ;Add Menus to Window1
-
- AddMens1: lea.l SS_Welcome,a0
- jsr Speaker
- move.l Window1,a0
- move.l mlist,a1
- lib Intuition,SetMenuStrip
-
- jsr MainMenu
-
- Window1IDCMP: move.l Window1,a0
- jsr CheckIDCMP
- cmp.l #REFRESHWINDOW,d2
- beq Refresher
- cmp.l #VANILLAKEY,d2
- beq VanillaKeys
- cmp.l #GADGETUP,d2
- beq GotAnswer
- cmp.l #MENUPICK,d2
- beq Win1Menus
- cmp.l #RAWKEY,d2
- beq RawKeys
- cmp.l #ACTIVEWINDOW,d2
- beq GoActivateGads
- cmp.l #OURCODE,d2
- beq IHandEvent
- jmp Window1IDCMP
-
- GoActivateGads: cmp.w #$01,Mode
- bne Window1IDCMP
- lea.l AStrGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- lib Intuition,ActivateGadget
- jmp Window1IDCMP
-
- Refresher: move.l Window1,a0
- lib GadTools,GT_BeginRefresh
- move.l Window1,a0
- move.l #TRUE,d0
- lib GadTools,GT_EndRefresh
- jmp Window1IDCMP
-
- GetName: jsr MenusOff
-
- move.l Window1,a0
- lea.l MainMGad1,a1
- move.l #-1,d0
- lib Intuition,RemoveGList
-
- move.l RP1,a1
- clr.l d0
- clr.l d1
- lib Gfx,Move
-
- move.l RP1,a1
- lib Gfx,ClearScreen
-
- move.l Window1,a0
- lea.l NameGad1,a1
- move.l #-1,d0
- lib Intuition,AddGadget
-
- lea.l NameGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #$01,d0
- lib Intuition,RefreshGList
-
- GetName1: lea.l SS_EName,a0
- jsr Speaker
-
- lea.l NameGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- lib Intuition,ActivateGadget
-
- GetName2: move.l Window1,a0
- jsr CheckIDCMP
- cmp.l #GADGETUP,d2
- beq GetName3
- jmp GetName2
-
- GetName3: ;tst.b (NameGad1Buf)
- ;beq GetName1
-
- GetName_OUT: move.l Window1,a0
- lea.l NameGad1,a1
- lib Intuition,RemoveGadget
-
- move.l RP1,a1
- clr.l d0
- clr.l d1
- lib Gfx,Move
-
- move.l RP1,a1
- lib Gfx,ClearScreen
-
- lea.l NameGad1Buf,a2
- move.l a2,d2
- jsr GetLength
- move.b #$dc,0(a2,d3.l)
-
- lea.l SS_Welcome2,a0
- jsr Speaker
- lea.l NameGad1Buf,a0
- jsr Speaker
-
- move.l Window1,a0
- move.l #-1,a1
- lea.l MenuBarName,a2
- lib Intuition,SetWindowTitles
- jsr MenusOn
- rts
-
- IHandEvent: cmp.w #$44,d3 ;Return
- beq ActPrevGad
- cmp.w #$65,d3 ;Alt
- beq GoDeActStrings
- cmp.w #$45,d3 ;Escape
- beq Quit
- cmp.w #$20,d3 ;Amiga-A
- beq GoAddQues
- cmp.w #$28,d3 ;Amiga-L
- beq Load
- cmp.w #$21,d3 ;Amiga-S
- beq Save
- cmp.w #$11,d3 ;Amiga-W
- beq SaveAs
- cmp.w #$27,d3 ;Amiga-K
- beq GoClear
- cmp.w #$01,d3 ;Amiga-1
- beq Student
- cmp.w #$02,d3 ;Amiga-2
- beq Teacher
- cmp.l #$03,d3 ;Amiga-3
- beq Prefs20
- ; cmp.l #$04,d3 ;Amiga-4
- ; beq LoadPrefs
- ; cmp.l #$05,d3 ;Amiga-5
- ; beq SavePrefs
- ; cmp.l #$06,d3 ;Amiga-6
- ; beq DefPrefs
- cmp.w #00,NumQ
- beq Window1IDCMP
- cmp.w #$32,d3 ;Amiga-X
- beq GoCut
- cmp.w #$33,d3 ;Amiga-C
- beq GoCopy
- cmp.w #$34,d3 ;Amiga-V
- beq GoPaste
- cmp.w #$22,d3 ;Amiga-D
- beq GoDeleteQues
- cmp.w #$23,d3 ;Amiga-F
- beq GoFindFirst
- cmp.w #$39,d3 ;Amiga-.
- beq GoFindLast
- cmp.w #$19,d3 ;Amiga-P
- beq GoFindPrev
- cmp.w #$36,d3 ;Amiga-N
- beq GoFindNext
- cmp.w #$16,d3 ;Amiga-U
- beq GoUndo
- cmp.w #$12,d3 ;Amiga-E
- beq GoSClear
- cmp.w #$4f,d3 ;arrow back
- beq GoFindPrev
- cmp.w #$4e,d3 ;arrow forward
- beq GoFindNext
- cmp.w #$4d,d3 ;arrow down
- beq GoFindPrev
- cmp.w #$4c,d3 ;arrow up
- beq GoFindNext
- jmp Window1IDCMP
-
- VanillaKeys: cmp.w #$1b,d3
- beq Quit
- cmp.w #$02,Mode
- bne VanillaKeys2
- cmp.w #"a",d3
- beq GoAddQues
- cmp.w #"A",d3
- beq GoAddQues
- cmp.w #"k",d3
- beq GoClear
- cmp.w #"K",d3
- beq GoClear
- cmp.w #00,NumQ
- beq Window1IDCMP
- cmp.w #'/',d3
- beq GoFindFirst
- cmp.w #'*',d3
- beq GoFindLast
- cmp.w #"f",d3
- beq GoFindFirst
- cmp.w #"F",d3
- beq GoFindFirst
- cmp.w #'l',d3
- beq GoFindLast
- cmp.w #'L',d3
- beq GoFindLast
- cmp.w #'-',d3
- beq GoFindPrev
- cmp.w #"p",d3
- beq GoFindPrev
- cmp.w #"P",d3
- beq GoFindPrev
- cmp.w #'+',d3
- beq GoFindNext
- cmp.w #"n",d3
- beq GoFindNext
- cmp.w #"N",d3
- beq GoFindNext
- cmp.w #"u",d3
- beq GoUndo
- cmp.w #"U",d3
- beq GoUndo
- cmp.w #01,NumQ
- beq Window1IDCMP
- cmp.w #"d",d3
- beq GoDeleteQues
- cmp.w #"D",d3
- beq GoDeleteQues
- jmp Window1IDCMP
- VanillaKeys2: cmp.w #$00,Mode
- bne Window1IDCMP
- cmp.w #"1",d3
- beq Game
- cmp.w #"2",d3
- beq GoToGetName
- cmp.w #"3",d3
- beq Load
- cmp.w #"4",d3
- beq GoTeacher
- cmp.w #"5",d3
- beq Prefs20
- cmp.w #"6",d3
- beq Help
- cmp.w #"7",d3
- beq About
- cmp.w #"8",d3
- beq Quit
- jmp Window1IDCMP
- RawKeys: cmp.w #$5f,d3
- beq Help
- cmp.w #$02,Mode
- bne Window1IDCMP
- cmp.w #00,NumQ
- beq Window1IDCMP
- cmp.w #$4f,d3 ;arrow back
- beq GoFindPrev
- cmp.w #$4e,d3 ;arrow forward
- beq GoFindNext
- cmp.w #$4d,d3 ;arrow down
- beq GoFindPrev
- cmp.w #$4c,d3 ;arrow up
- beq GoFindNext
- jmp Window1IDCMP
-
- Win1Menus: jsr MenuNull
- cmp.l #$00,d6
- beq Win1Menus1
- cmp.l #$01,d6
- beq Win1Menus2
- cmp.l #$02,d6
- beq Win1Menus3
- cmp.l #$03,d6
- beq Win1Menus4
- cmp.l #$04,d6
- beq Win1Menus5
- cmp.l #$05,d6
- beq Win1Menus6
- jmp Window1IDCMP
- Win1Menus1: cmp.l #$00,d5
- beq Game
- cmp.l #$01,d5
- beq GoToGetName
- cmp.l #$02,d5
- beq GoLoad
- cmp.l #$03,d5
- beq GoSave
- cmp.l #$04,d5
- beq GoSaveAs
- cmp.l #$05,d5
- beq Help
- cmp.l #$06,d5
- beq About
- cmp.l #$08,d5
- beq Quit
- jmp Window1IDCMP
- Win1Menus2: cmp.l #$00,d5
- beq GoAddQues
- cmp.w #$00,NumQ
- beq Window1IDCMP
- cmp.l #$02,d5
- beq GoCut
- cmp.l #$03,d5
- beq GoCopy
- cmp.l #$04,d5
- beq GoPaste
- cmp.l #$06,d5
- beq GoSClear
- cmp.l #$07,d5
- beq GoDeleteQues
- cmp.l #$09,d5
- beq GoUndo
- jmp Window1IDCMP
- Win1Menus3: cmp.l #$00,d5
- beq GoClear
- jmp Window1IDCMP
- Win1Menus4: cmp.w #$00,NumQ
- beq Window1IDCMP
- cmp.l #$00,d5
- beq GoFindFirst
- cmp.l #$01,d5
- beq GoFindLast
- cmp.l #$02,d5
- beq GoFindPrev
- cmp.l #$03,d5
- beq GoFindNext
- jmp Window1IDCMP
- Win1Menus5: cmp.l #$00,d5
- beq Student
- cmp.l #$01,d5
- beq Teacher
- jmp Window1IDCMP
- Win1Menus6: cmp.l #$00,d5
- beq Prefs20
- ; cmp.l #$01,d5
- ; beq LoadPrefs
- ; cmp.l #$02,d5
- ; beq SavePrefs
- ; cmp.l #$03,d5
- ; beq DefPrefs
- jmp Window1IDCMP
-
- GoLoad: clr.w IOMode
- cmp.l #$00,d4
- beq Load
- cmp.l #$01,d4
- beq LoadV
- jmp Window1IDCMP
-
- GoSave: jmp Save
- GoSaveAs: jmp SaveAs
-
- ;GoSetPrefs: jmp Prefs20
-
- DoHandler: lea.l OurIntuiMsg,a1
- move.l $14(a1),d2 ;Class in d2
- move.w $18(a1),d3 ;Code in d3
- move.w $1a(a1),a4 ;Qualifier in a4
- move.l $1c(a1),a5 ;IAddress in a5
-
- ;check if our window is the active one
-
- DoHandler1: move.l Window1,a0
- move.l #WINDOWACTIVE,d0
- move.l d0,d1
- and.l wd_Flags(a0),d1
- cmp.l d0,d1
- bne CheckIDCMP
-
- ;See if in teacher mode
-
- cmp.w #$02,Mode
- bne CheckIDCMP
-
- move.l #-1,d0
- rts
-
- GoToGetName: jsr GetName
- jsr MainMenu
- jmp Window1IDCMP
-
- Student: lea.l SS_Mode1,a0
- jsr Speaker
- cmp.w #$02,Mode
- bne Window1IDCMP
-
- jsr SaveQuestion
-
- move.w #$00,Mode
- move.l #$f800,d0 ;First, Game!
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$f820,d0 ;Second, Enter name
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$f860,d0 ;Fourth, Save
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l #$f880,d0 ;Fifth, Save As
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l #$ffe1,d0 ;Second menu list, Edit single
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l #$ffe2,d0 ;Third menu list, Edit all
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l #$ffe3,d0 ;Fourth menu list, Move
- move.l Window1,a0
- lib Intuition,OffMenu
-
- jsr RemButtons
- jsr RemStrings
- jsr EmptyPage
- jsr MainMenu
- jmp Window1IDCMP
-
- GoTeacher: move.l mlist,a0
- move.l #StudentMenuN,d0
- lib Intuition,ItemAddress
- move.l d0,a0
- and.w #~CHECKED,$c(a0)
-
- move.l mlist,a0
- move.l #TeachMenuN,d0
- lib Intuition,ItemAddress
- move.l d0,a0
- or.w #CHECKED,$c(a0)
-
- ;Nothing here please!
-
- Teacher: lea.l SS_Mode2,a0
- jsr Speaker
- cmp.w #$00,Mode
- bne Window1IDCMP
-
- cmp.w #$00,NumQ
- bne Teacher1
- jsr AddQues
-
- Teacher1: move.l Window1,a0
- lea.l MainMGad1,a1
- move.l #-1,d0
- lib Intuition,RemoveGList
-
- move.w #$02,Mode
- move.w #$00,QueCount
-
- move.l #$f800,d0 ;First, Game!
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l #$f820,d0 ;Second, Enter name
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l #$f860,d0 ;Fourth, Save
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$f880,d0 ;Fifth, Save As
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l #$ffe1,d0 ;Second menu list, Edit single
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l #$ffe2,d0 ;Third menu list, Edit all
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l #$ffe3,d0 ;Fourth menu list, Move
- move.l Window1,a0
- lib Intuition,OnMenu
-
- jsr DoPage
-
- jsr DoTeachPage
-
- jsr AddButtons ;Keep this
- jsr AddStrings
- jsr RefreshButtons ;and this, together
-
- jsr SetActivation ;Gadgets refreshed and
- jsr OthActivation1 ;drawn here
-
- jmp DoTeach
-
- TeacherAction: cmp.w #61,$26(a5)
- beq ChangeAddMode
- cmp.w #40,$26(a5)
- beq GoAddQues
- cmp.w #44,$26(a5)
- beq GoSClear
- cmp.w #60,$26(a5)
- beq GoClear
- cmp.w #00,NumQ
- beq Window1IDCMP
- cmp.w #45,$26(a5)
- beq GoDeleteQues
- cmp.w #10,$26(a5)
- beq GoFindFirst
- cmp.w #15,$26(a5)
- beq GoFindLast
- cmp.w #20,$26(a5)
- beq GoFindPrev
- cmp.w #30,$26(a5)
- beq GoFindNext
- cmp.w #50,$26(a5)
- beq GoUndo
- jmp Window1IDCMP
-
- ChangeAddMode: add.w #$01,AddMode
- cmp.w #$03,AddMode
- bne Window1IDCMP
- move.w #$00,AddMode
- jmp Window1IDCMP
-
- GoFindFirst: lea.l SS_First,a0
- jsr Speaker
- jsr SaveQuestion
- jsr FindFirst
- jsr PrintTeach
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoFindPrev: lea.l SS_Prev,a0
- jsr Speaker
- jsr SaveQuestion
- tst.w QueCount
- beq Window1IDCMP
- jsr FindPrev
- jsr SetActivation
- GoFindPrev1: jsr PrintTeach
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoFindNext: lea.l SS_Next,a0
- jsr Speaker
- jsr SaveQuestion
- move.w NumQ,d0
- sub.w #1,d0
- cmp.w QueCount,d0
- beq Window1IDCMP
- jsr FindNext
- jsr SetActivation
- GoFindNext1: jsr PrintTeach
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoFindLast: lea.l SS_Last,a0
- jsr Speaker
- jsr SaveQuestion
- jsr FindLast
- jsr PrintTeach
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoAddQues: lea.l SS_Add,a0
- jsr Speaker
- jsr SaveQuestion
- jsr AddQues
- jsr PrintNumQ
- jsr PrintTeach
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoCut: lea.l SS_Cut,a0
- jsr Speaker
- jsr Copy
- jsr DeleteQues
- jsr PrintNumQ
- jsr PrintTeach
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoCopy: lea.l SS_Copy,a0
- jsr Speaker
- jsr Copy
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoPaste: lea.l SS_Paste,a0
- jsr Speaker
- move.w AddMode,d7
- move.w #$02,AddMode
- jsr AddQues
- move.w d7,AddMode
- jsr Paste
- jsr PrintTeach
- jsr PrintNumQ
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
-
- GoSClear: lea.l SS_AClear,a0
- jsr Speaker
- jsr SaveQuestion
- jsr RemStrings
- jsr SClear
- jsr AddStrings
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoDeleteQues: lea.l SS_SDelete,a0
- jsr Speaker
- jsr SaveQuestion
- jsr DeleteQues
- jsr PrintNumQ
- jsr PrintTeach
- jsr SetActivation
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoUndo: lea.l SS_SUndo,a0
- jsr Speaker
- jsr Find
- jsr PrintTeach
- lea.l SS_Done,a0
- jsr Speaker
- lea.l DesStrGad3,a5
- jmp ActivateGads
- GoClear: lea.l SS_AClear2,a0
- jsr Speaker
- jsr SleepPointer
- jsr AskDoIt
- cmp.l #TRUE,d0
- bne GoClear_OUT
- lea.l SS_AClear,a0
- jsr Speaker
- jsr Clear
- jsr AddQues
- jsr PrintNumQ
- jsr PrintTeach
- jsr SetActivation
- GoClear_OUT: jsr NormalPointer
- lea.l DesStrGad3,a5
- jmp ActivateGads
-
- ;
- ;SetActivation subroutine. To be called to turn off gadgets if they can't
- ;be used, i.e. can't use first gadget if at first question etc.
- ; Use also with load and save, with fake NumQ (set to zero) to turn off
- ;gads during loads.
- ;
- ;inputs (from NumQ, QueCount etc.)
- ;
- ;result (said above)
- ;
-
- SetActivation: move.l Window1,a0
- move.l FirstGad1P,a1
- move.l #10,d0 ;Max buttons
- lib Intuition,RemoveGList
- tst.w QueCount
- bne SetActivation2
- move.l FirstGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f803,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l PrevGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f843,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- jmp SetActivation3
-
- SetActivation2: move.l PrevGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f843,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l FirstGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f803,d0
- move.l Window1,a0
- lib Intuition,OnMenu
-
- SetActivation3: move.w NumQ,d0
- sub.w #1,d0
- cmp.w QueCount,d0
- beq SetActivation4
-
- move.l LastGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f823,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l NextGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f863,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- jmp SetActivation5
-
- SetActivation4: move.l LastGad1P,a0 ;Was last one.
- bset.l #8,$c(a0)
- move.l #$f823,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l NextGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f863,d0
- move.l Window1,a0
- lib Intuition,OffMenu
-
- SetActivation5: tst.w NumQ ;If not NumQ=0
- beq SetActivation6 ;turn these on
- move.l UndoGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f921,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- cmp.w #$01,NumQ ;If though was 1
- beq SetActivation6.1 ;skip DeleteGad/Menu
- move.l DelGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f8e1,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- jmp SetActivation7
-
- SetActivation6: move.l UndoGad1P,a0 ;Here we turn off all
- bset.l #8,$c(a0) ;gadgets (+menus) that can't
- move.l #$f921,d0 ;be used if NumQ = 0 or 1
- move.l Window1,a0
- lib Intuition,OffMenu
- SetActivation6.1: move.l FirstGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f803,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l LastGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f823,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l PrevGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f843,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l NextGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f863,d0
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l DelGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f8e1,d0
- move.l Window1,a0
- lib Intuition,OffMenu
-
- SetActivation7: move.l Window1,a0
- move.l FirstGad1P,a1
- move.l #$00,a2
- move.l #-1,d0
- move.l #10,d1 :max buttons
- lib Intuition,AddGList
- move.l FirstGad1P,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #10,d0 ;max buttons
- lib Intuition,RefreshGList
- rts
-
- ;Turns off Add gadget (and menu) + Clear gadget (and menu)
-
- OthActivation: move.l Window1,a0
- move.l AddGad1P,a1
- move.l #6,d0
- lib Intuition,RemoveGList
-
- move.l AddGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f801,d0
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l SClearGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f8c1,d0
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l ClearGad1P,a0
- bset.l #8,$c(a0)
- move.l #$f802,d0
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.l AddMGad1P,a0
- bset.l #8,$c(a0)
-
- move.l Window1,a0
- move.l AddGad1P,a1
- move.l #$00,a2
- move.l #-1,d0
- move.l #6,d1
- lib Intuition,AddGList
-
- move.l AddGad1P,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #-1,d0
- lib Intuition,RefreshGList
- rts
-
- ;Turns on Add gadget (and menu) + Clear gadget (and menu)
-
- OthActivation1: move.l Window1,a0
- move.l AddGad1P,a1
- move.l #-1,d0 ;To the end of the list
- lib Intuition,RemoveGList
- move.l AddGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f801,d0
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l SClearGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f8c1,d0
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l ClearGad1P,a0
- bclr.l #8,$c(a0)
- move.l #$f802,d0
- move.l Window1,a0
- lib Intuition,OnMenu
-
- move.l AddMGad1P,a0
-
- bclr.l #8,$c(a0)
- move.l Window1,a0
-
- move.l AddGad1P,a1
- move.l #$00,a2
- move.l #-1,d0 ;Position: end
- move.l #-1,d1 ;Till end
- lib Intuition,AddGList
-
- move.l AddGad1P,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #-1,d0 ;Till end of list
- lib Intuition,RefreshGList
- rts
-
- ;Get length of text in given address (d2), including 0
- ;
- ;Input d2 = Address of null terminated text string
- ;
- ;Result d3 = Length
-
- GetLength: move.l #$00,d3
- move.l d2,a0
- GetLength2: add.l #1,d3
- tst.b (a0)+
- bne GetLength2
- rts
-
- PrintTeach: cmp.w #$00,NumQ
- beq PrintTeach_OUT
-
- ;Copy description into correct buffers
-
- move.l DesMem1,a0
- lea.l DesStr1Buf,a1
- move.l #DesLeng,d0
- lib Exec,CopyMem
-
- jsr RemStrings
-
- ;Copy current questions and answers into gadget buffers
-
- move.l CurrentQue,a0
- lea.l QueStr1Buf,a1
- move.l #NextQues,d0
- lib Exec,CopyMem
-
- jsr AddStrings
- jsr PrintQueCount
- PrintTeach_OUT: rts
-
- ;Add Gadget to Window 1
-
- AddaGad: move.l Window1,a0
- lea.l AStrGad1,a1
- move.l #1,d0
- lib Intuition,AddGadget
-
- ;Refresh gadget so its drawn on the screen
-
- lea.l AStrGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #$01,d0
- lib Intuition,RefreshGList
- rts
-
- AddButtons: move.l Window1,a0 ;add buttons
- move.l FirstGad1P,a1
- move.l #-1,d0
- move.l #10,d1 ;Change to max buttons
- move.l #$00,a2
- lib Intuition,AddGList ;(a0,a1,d0,d1,a2)
- rts
-
- RefreshButtons: move.l FirstGad1P,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #-1,d0
- lib Intuition,RefreshGList
-
- move.l Window1,a0
- move.l #$00,a1
- lib GadTools,GT_RefreshWindow
- rts
-
- AddStrings: move.l Window1,a0 ;Add string gadgets
- lea.l DesStrGad1,a1
- move.l #-1,d0
- move.l #14,d1 ;Change to max strings
- move.l #$00,a2
- lib Intuition,AddGList
-
- ;Refresh gadget so they're drawn on the screen
-
- lea.l DesStrGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #-1,d0
- lib Intuition,RefreshGList ;(a0,a1,a2,d0)
- rts
-
- RemaGad: move.l Window1,a0
- lea.l AStrGad1,a1
- lib Intuition,RemoveGadget
- rts
-
- RemButtons: move.l Window1,a0
- move.l FirstGad1P,a1
- move.l #10,d0 ;Change to max buttons
- lib Intuition,RemoveGList
- rts
-
- RemStrings: move.l Window1,a0
- lea.l DesStrGad1,a1
- move.l #14,d0 ;Change to max string gads
- lib Intuition,RemoveGList
- rts
-
- ;Copy description into memory
-
- SaveQuestion: cmp.w #$00,NumQ
- beq SaveQ_OUT
- lea.l DesStr1Buf,a0
- move.l DesMem1,a1
- move.l #DesLeng,d0
- lib Exec,CopyMem
-
- ;Copy current question and answers into memory
-
- lea.l QueStr1Buf,a0
- move.l CurrentQue,a1
- move.l #NextQues,d0
- lib Exec,CopyMem
- SaveQ_OUT: rts
-
- DoTeach: jsr FindFirst
- jsr PrintTeach
- jsr PrintNumQ
- jsr PrintTimer
- jsr PrintTime
-
- lea.l DesStrGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- lib Intuition,ActivateGadget
- bra Window1IDCMP
-
- ActivateGads: cmp.w #1,$26(a5)
- bne TeacherAction
- move.l (a5),a0
- lea.l MulStrGad9,a1
- cmp.l a5,a1
- bne ActivateGads1
- lea.l DesStrGad1,a0
- ActivateGads1: move.l Window1,a1
- move.l #$00,a2
- lib Intuition,ActivateGadget
- bra Window1IDCMP
-
- ActPrevGad: lea.l DesStrGad1,a1
- move.w #SELECTED,d0
- move.w d0,d1
- and.w gg_Flags(a1),d1
- cmp.w d0,d1
- bne ActPrevGad1
- lea.l MulStrGad9,a0
- jmp ActPrevGad2
-
- ActPrevGad1: move.w #SELECTED,d0
- move.w d0,d1
- and.w gg_Flags(a1),d1
- cmp.w d0,d1
- beq ActPrevGad2
-
- move.l a1,a0
- move.l (a1),a1
- cmp.l #$00,a1
- bne ActPrevGad1
- lea.l MulStrGad9,a0
-
- ActPrevGad2: push a0
- jsr DeActStrings
- pull a0
- move.l Window1,a1
- move.l #$00,a2
- lib Intuition,ActivateGadget
- jmp Window1IDCMP
-
- ;This removes the strings gadgets, deactivates them and puts them back
-
- DeActStrings: jsr RemStrings
-
- lea.l DesStrGad1,a1
- DeActStrings1: and.w #~SELECTED,gg_Flags(a1)
- move.l (a1),a1
- cmp.l #$00,a1
- bne DeActStrings1
-
- jsr AddStrings
- rts
-
- GoDeActStrings: jsr DeActStrings
- jmp Window1IDCMP
-
- ;Single clear, now erase, clears the current question and answers
- ;
- ;Need only to reset the first byte of all buffers
-
- SClear: move.b #$00,QueStr1Buf
- move.b #$00,QueStr2Buf
-
- move.b #$00,MulStr1Buf
- move.b #$00,MulStr2Buf
- move.b #$00,MulStr3Buf
- move.b #$00,MulStr4Buf
- move.b #$00,MulStr5Buf
- move.b #$00,MulStr6Buf
- move.b #$00,MulStr7Buf
- move.b #$00,MulStr8Buf
- move.b #$00,MulStr9Buf
- rts
-
- ;This kills all Ques-Ans memory, removes all nodes and resets list
-
- Clear: jsr KillQueMem1 ;Free mem
- move.w #$00,NumQ
- move.w #$00,QueCount
- move.b #$00,DesStr1Buf
- move.b #$00,DesStr2Buf
-
- ;Clear description
-
- tst.l DesMem1
- beq ClearDes1
- move.l DesMem1,a1
- move.l #DesLeng+12,d0
- lib Exec,FreeMem
- move.l #$00,DesMem1
-
- ClearDes1: move.l #DesLeng+12,d0
- move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 ;Type of memory wanted
- lib Exec,AllocMem ;Allocate memory
- move.l d0,DesMem1
- bne ClearDes_OUT
- jsr NoMem1 ;Tell user about memory
- jmp ShutDown
- ClearDes_OUT: jsr InitQAList
- rts
-
- AddQues: move.l #QA_SIZE,d0 ;reserve memory for node
- move.l #MEMF_CLEAR!MEMF_PUBLIC,d1
- lib Exec,AllocMem
- tst.l d0
- bne AddQues1
- jsr NoMem1
- jsr FindFirst
- rts
- AddQues1: move.l d0,a2 ;Hold node address in a2
- move.l #NextQues,d0 ;Reserve ques-ans memory
- move.l #MEMF_CLEAR!MEMF_PUBLIC,d1
- lib Exec,AllocMem
- tst.l d0
- bne AddQues2
- move.l a2,a1 ;No mem. Clear Node mem
- move.l #QA_SIZE,d0
- lib Exec,FreeMem
- jsr NoMem1
- jsr FindFirst
- rts
- AddQues2: move.l d0,a3 ;Hold memory info in a3
- lea.l QAList,a0
- move.l a2,a1
- cmp.w #$00,AddMode
- bne AddQues3
- ADDTAIL ;Add Node to list
- move.l a3,QA_Data(a2) ;Add memory info to node
- add.w #1,NumQ ;Add amount of Ques-Ans
- jsr FindLast ;Find this question
- rts
- AddQues3: cmp.w #$00,NumQ ;Insert part gets wrong
- beq AddQues3.1 ;QueCount spot and
- cmp.w #$01,AddMode ;CurrentQue
- bne AddQues4
- AddQues3.1: ADDHEAD
- move.l a3,QA_Data(a2) ;Add memory info to node
- add.w #1,NumQ ;Add amount of Ques-Ans
- jsr FindFirst ;Find this question
- rts
- AddQues4: push a2
- jsr FindNode ;After this node please
- lea.l QAList,a0 ;List address
- move.l a2,a1 ;Address of new node
- move.l a4,a2 ;Address of previous node
- lib Exec,Insert
- pull a2
- move.l a3,QA_Data(a2) ;Add memory info to node
- add.w #1,NumQ ;Add amount of Ques-Ans
- add.w #1,QueCount
- jsr Find ;Find this question
- rts
-
- ;Copy current question and answers into copy buffers
-
- Copy: move.l CurrentQue,a0
- lea.l QueStr1CBuf,a1
- move.l #NextQues,d0
- lib Exec,CopyMem
- Copy_OUT: rts
-
- ;Copy current question and answers into gadgets
-
- Paste: lea.l QueStr1CBuf,a0
- move.l CurrentQue,a1
- move.l #NextQues,d0
- lib Exec,CopyMem
- Paste_OUT: rts
-
- DeleteQues: cmp.w #$01,NumQ
- beq DeleteQues_OUT
-
- lea.l QAList,a3
- move.l MLH_HEAD(a3),a2
- move.l CurrentQue,a1
- move.l #NextQues,d0 ;Free Que-Ans memory
- lib Exec,FreeMem
-
- move.w QueCount,d4
- add.w #$01,d4
- move.w #$00,d3
- lea.l QAList,a4 ;Goes through list until
- move.l MLH_HEAD(a4),a4 ;at current question
- DeleteQues1: add.w #1,d3
- cmp.w d3,d4
- beq DeleteQues2
- move.l MLN_SUCC(a4),a4
- jmp DeleteQues1
-
- DeleteQues2: move.l a4,a1
- REMOVE
- move.l a4,a1
- move.l #QA_SIZE,d0
- lib Exec,FreeMem ;Free Node memory
- move.w NumQ,d0
- sub.w #1,d0
- cmp.w QueCount,d0
- bne DeleteQues3
- sub.w #1,QueCount
- DeleteQues3: sub.w #1,NumQ
- jsr Find
- DeleteQues_OUT: rts
-
- FindFirst: move.w #0,QueCount
- lea.l QAList,a1
- move.l MLH_HEAD(a1),a2
- move.l QA_Data(a2),a4
- move.l a4,QueBegin
- move.l a4,CurrentQue
- rts
- FindLast: move.w NumQ,QueCount
- sub.w #1,QueCount
- lea.l QAList,a1
- move.l MLH_TAILPRED(a1),a2
- move.l QA_Data(a2),a4 ;QA_Data(a2),CurrentQue??
- move.l a4,CurrentQue
- rts
- FindPrev: sub.w #1,QueCount
- jsr Find
- rts
- FindNext: add.w #1,QueCount
- jsr Find
- rts
-
- ;Find subroutine. Input from QueCount. Output in a4 and CurrentQue
-
- Find: move.l #$00,d4
- lea.l QAList,a1
- move.l MLH_HEAD(a1),a4
- Find2: cmp.w QueCount,d4
- beq Find3
- add.w #1,d4
- SUCC a4,a4
- jmp Find2
- Find3: move.l QA_Data(a4),a4
- move.l a4,CurrentQue
- rts
-
- ;Find node subroutine. Input from QueCount. Output in a4
- ;Returns zero in a4 if list is empty
- ;
- FindNode: move.l #$00,d4
- lea.l QAList,a0
- IFEMPTY a0,FindN4
- move.l MLH_HEAD(a0),a4
- FindN2: cmp.w QueCount,d4
- beq FindN3
- add.w #1,d4
- SUCC a4,a4
- jmp FindN2
- FindN3: rts
- FindN4: move.l #$00,a4
- rts
-
- KillQueMem1: lea.l QAList,a0
- IFEMPTY a0,KillQM1_OUT
- lea.l QAList,a3
- move.l MLH_HEAD(a3),a2
- KillQueMem2: move.l QA_Data(a2),a1 ;This loop frees
- move.l #NextQues,d0 ;Que-Ans memory
- lib Exec,FreeMem
- TSTNODE a2,a2
- bne KillQueMem2
-
- KillQueMem3: move.l MLH_HEAD(a3),a2 ;remove all nodes
- move.l a2,a1 ;from list and free
- REMOVE ;used memory
- move.l a2,a1
- move.l #QA_SIZE,d0
- lib Exec,FreeMem
- KillQueMem4: IFNOTEMPTY a3,KillQueMem3
- KillQM1_OUT: rts
-
- InitQAList: lea.l QAList,a0
- NEWLIST a0
- rts
-
- MainMenuSelect: cmp.w #70,$26(a5)
- beq Game
- cmp.w #71,$26(a5)
- beq GoToGetName
- cmp.w #72,$26(a5)
- beq Load
- cmp.w #73,$26(a5)
- beq GoTeacher
- cmp.w #74,$26(a5)
- beq Prefs20
- cmp.w #75,$26(a5)
- beq Help
- cmp.w #76,$26(a5)
- beq About
- cmp.w #77,$26(a5)
- beq Quit
- jmp Window1IDCMP
- GotAnswer: cmp.w #$00,Mode
- beq MainMenuSelect
- cmp.w #$02,Mode
- beq ActivateGads
- lea.l AStrGad1Buf,a3
- move.l CAnsBegin,a5
- move.l QueBegin,a4
-
- ;
- ;a3 = Gadget buffer start
- ;a4 = Question begin
- ;a5 = Correct answer start
- ;
-
- move.w #$00,AnsCount
- move.l a3,a1
- move.l a5,a2
- TestAnswer: tst.b (a2) ;If correct answer = 0
- beq TestAnswer2
- cmp.b (a1)+,(a2)+ ;Compare correct & user answer
- beq TestAnswer
-
- TestAnswer1: cmp.w #09,AnsCount ;See if done last correct answer
- beq WrongAnswer ;If have, user hasn't given correct answer
- add.l #AnsLeng,a5 ;If not, get next correct answer
- move.l a5,a2 ;Move it for checker
- tst.b (a2) ;Next answer is empty
- beq WrongAnswer ;So users answer was wrong
- move.l a3,a1 ;Get start of user answer
- add.w #$01,AnsCount ;Get ready for next correct answer
- jmp TestAnswer
-
- TestAnswer2: tst.b (a1) ;If correct & user answer
- bne TestAnswer1 ;don't equal 0 answer is wrong
- jmp RightAnswer ;so get next correct answer
-
- ;Wrong answer
-
- WrongAnswer: jsr PrintScore
- jsr PrintQueCount
-
- move.w #$00,LastAns
- jsr GiveAnswer
- move.l ViewPort1,a0
- move.l #$03,d0
- move.l #$0f,d1
- clr.l d2
- clr.l d3
- lib Gfx,SetRGB4
-
- lea.l NewWrongWin1,a0
- lea.l NWrongTL,a1
- lib Intuition,OpenWindowTagList
- move.l d0,WrongWin1
- beq NoWrongWin1
- move.l d0,a0
- move.l $32(a0),a4
-
- move.l a4,a0
- lea.l WrongTxt2,a1
- clr.l d0
- clr.l d1
- lib Intuition,PrintIText
-
- lea.l SS_Wrong,a0
- jsr Speaker
-
- move.l WrongWin1,a0
- push a3-a5
- jsr CheckIDCMP
- pull a3-a5
- move.l WrongWin1,a0
- jsr ClearMSGs
- move.l #$00,WrongWin1
-
- move.l ViewPort1,a0
- lea.l Colors,a1
- move.l #$04,d0
- lib Gfx,LoadRGB4
- jmp TestAns_OUT
-
- RightAnswer: add.w #1,Score
-
- jsr PrintScore
- jsr PrintQueCount
-
- move.w #$01,LastAns
- jsr GiveAnswer
- move.l ViewPort1,a0
- move.l #$03,d0
- clr.l d1
- move.l #$0a,d2
- clr.l d3
- lib Gfx,SetRGB4
-
- lea.l NewRightWin1,a0
- lea.l NWrongTL,a1
- lib Intuition,OpenWindowTagList
- move.l d0,RightWin1
- beq NoRightWin1
- move.l d0,a0
- move.l $32(a0),a4
-
- move.l a4,a0
- lea.l RightTxt1,a1
- clr.l d0
- clr.l d1
- lib Intuition,PrintIText
-
- lea.l SS_Right,a0
- jsr Speaker
-
- move.l RightWin1,a0
- push a3-a5
- jsr CheckIDCMP
- pull a3-a5
- move.l RightWin1,a0
- jsr ClearMSGs
- move.l #$00,RightWin1
-
- move.l ViewPort1,a0
- lea.l Colors,a1
- move.l #$04,d0
- lib Gfx,LoadRGB4
- jmp TestAns_OUT
-
- TestAns_OUT: add.w #$01,QueCount
-
- ;remove gadget, clear inputs and put it back
-
- move.l Window1,a0
- lea.l AStrGad1,a1
- lib Intuition,RemoveGadget
- move.b #$00,AStrGad1Buf
- move.l Window1,a0
- lea.l AStrGad1,a1
- move.l #-1,d0
- lib Intuition,AddGadget
-
- lea.l AStrGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #1,d0
- lib Intuition,RefreshGList
-
- jmp Ask
-
- PutChProc: tst.b d0
- beq PutChProc_OUT
- move.b d0,(a3)+
- PutChProc_OUT: rts
-
- PrintCheck: move.l RP1,a1
- move.l #$01,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Clear old timer text
- move.l #CheckLeft-4,d0
- move.l #CheckTop-1,d1
- move.l #638,d2
- move.l #CheckTop+30,d3
- lib Gfx,RectFill
-
- move.l RP1,a0 ;Print Case/Order/Punc
- lea.l CaseTxt1,a1
- move.l #0,d0
- move.l #0,d1
- lib Intuition,PrintIText
-
- jsr HiLite3
- rts
-
-
- PrintType: move.l RP1,a1
- move.l #$01,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Clear old timer text
- move.l #TypeLeft-5,d0
- move.l #TimTop-1,d1
- move.l #288,d2
- move.l #TimTop+28,d3
- lib Gfx,RectFill
-
- move.l RP1,a0 ;Print all types
- lea.l MenuMTxt1,a1
- move.l #0,d0
- move.l #0,d1
- lib Intuition,PrintIText
-
- cmp.b #$f1,VType
- bne PrintType2
-
- move.l #$00,d4
- jsr HiLite2
- rts
-
- PrintType2: cmp.b #$f2,VType
- bne PrintType3
- move.l #$01,d4
- jsr HiLite2
- rts
-
- PrintType3: move.l #$02,d4
- jsr HiLite2
- rts
-
- PrintFName: move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Clear old timer text
- move.l #InfoLeft1,d0
- move.l #TimTop,d1
- move.l #InfoLeft2,d2
- move.l #TimTop+9,d3
- lib Gfx,RectFill
-
- move.l RP1,a0 ;Print "File name :"
- lea.l FNameTxt1,a1
- move.l #InfoLeft1,d0
- move.l #TimTop,d1
- lib Intuition,PrintIText
- rts
-
- PrintTimer: move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Clear old timer text
- move.l #InfoLeft2,d0
- move.l #TimTop,d1
- move.l #638,d2
- move.l #TimTop+9,d3
- lib Gfx,RectFill
-
- cmp.b #$f0,VTimer
- bne PrintTimer2
-
- move.l RP1,a0 ;Print Timer: No
- lea.l TimerTxt1,a1
- move.l #InfoLeft2,d0
- move.l #TimTop,d1
- lib Intuition,PrintIText
- rts
-
- PrintTimer2: move.l RP1,a0 ;Print Timer: Yes
- lea.l TimerTxt2,a1
- move.l #InfoLeft2,d0
- move.l #TimTop,d1
- lib Intuition,PrintIText
- rts
-
- ;Add check for time in someTime and print that
-
- PrintTime: move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Clear old timer text
- move.l #InfoLeft2,d0
- move.l #NumQTop,d1
- move.l #638,d2
- move.l #NumQTop+9,d3
- lib Gfx,RectFill
-
- move.l RP1,a0 ;Print Time:
- lea.l TimeTxt1,a1
- move.l #InfoLeft2,d0
- move.l #NumQTop,d1
- lib Intuition,PrintIText
- rts
-
- ;Print score
-
- PrintScore: lea.l fstrl,a0
- lea.l Score,a1
- lea.l PutChProc,a2
- lea.l ScoreText2,a3
- lib Exec,RawDoFmt
-
- ;Clear old score
-
- move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Question
- move.l #InfoLeft2,d0
- move.l #ScoTop,d1
- move.l #638,d2
- move.l #ScoTop+8,d3
- lib Gfx,RectFill
-
- ;Print score
-
- move.l RP1,a0
- lea.l ScoreTxt1,a1
- move.l #InfoLeft2,d0
- move.l #ScoTop,d1
- lib Intuition,PrintIText
- move.l #$DEAFBEEF,d2
- lea.l ScoreText1,a0
- jsr Speaker
- rts
-
- PrintNumQ: lea.l fstrl,a0 ;HEX->ASCII
- lea.l NumQ,a1
- lea.l PutChProc,a2
- lea.l QuestionsText2,a3
- lib Exec,RawDoFmt
-
- lea.l fstrl,a0 ;HEX->ASCII
- lea.l NumQ,a1
- lea.l PutChProc,a2
- lea.l QuestionsText3,a3
- lib Exec,RawDoFmt
-
- ;Clear old NumQ
-
- move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Question
- move.l #InfoLeft1,d0
- move.l #NumQTop,d1
- move.l #InfoLeft2,d2
- move.l #NumQTop+8,d3
- lib Gfx,RectFill
-
- ;Print NumQ
-
- move.l RP1,a0
- lea.l QuestionsTxt1,a1
- move.l #InfoLeft1,d0
- move.l #NumQTop,d1
- lib Intuition,PrintIText
- rts
-
- PrintQueCount: lea.l fstrl,a0 ;HEX->ASCII
- move.w QueCount,QueCount2
- add.w #1,QueCount2
- lea.l QueCount2,a1
- lea.l PutChProc,a2
- lea.l QuestionText2,a3
- lib Exec,RawDoFmt
-
- ;Clear old QueCount texts
-
- move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Question
- move.l #InfoLeft1,d0
- move.l #ScoTop,d1
- move.l #InfoLeft2,d2
- move.l #ScoTop+8,d3
- lib Gfx,RectFill
-
- ;Print QueCount
-
- move.l RP1,a0
- lea.l QuestionTxt1,a1
- move.l #InfoLeft1,d0
- move.l #ScoTop,d1
- lib Intuition,PrintIText
- rts
-
- ;Print answer
-
- GiveAnswer: move.l #$DEADBEEF,d2
- lea.l SS_Answers,a0
- jsr Speaker
- move.w #$00,d5
- move.l CAnsBegin,a5
- GiveAnswer1: move.l d5,d4
- mulu.w #10,d4 ;Calculate place to print answer
- move.l a5,AnsTextAdd ;Place address of answer text...
- move.l RP1,a0 ;into IText structure
- lea.l AnsTxt1,a1
- move.l #1,d0
- move.l #MulTop,d1
- add.l d4,d1
- lib Intuition,PrintIText
-
- move.l #$DEADBEEF,d2
- move.l a5,a0
- jsr Speaker
-
- add.w #1,d5
- add.l #AnsLeng,a5
- tst.b (a5)
- bne GiveAnswer1
-
- cmp.w #$01,LastAns
- bne GiveAnswer_OUT
- jsr HiLite
- GiveAnswer_OUT: rts
-
- Game: tst.b (NameGad1Buf) ;See if we have the player's name or not
- bne Game1 ;continue if we do
- jsr GetName ;ask for if we don't
- tst.b (NameGad1Buf) ;See if we have the player's name or not
- bne Game1 ;continue if we do
- jsr MainMenu
- jmp Window1IDCMP
-
- Game1: cmp.w #$00,NumQ
- beq Load
-
- move.l Window1,a0 ;Remove Main menu's gadgets
- lea.l MainMGad1,a1
- move.l #-1,d0
- lib Intuition,RemoveGList
-
- move.l #$f800,d0 ;Disable menus (first, Game)
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l #$f820,d0 ;Second, Enter name
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l #$f840,d0 ;Third, Load
- move.l Window1,a0
- lib Intuition,OffMenu
- move.l #$ffe4,d0 ;Fifth menu list (Student, Teacher)
- move.l Window1,a0
- lib Intuition,OffMenu
-
- move.w #01,Mode
-
- jsr DoPage ;Draw the boxes and add gadgets
- jsr AddaGad
- jsr PrintCheck ;CASE/ORDER/PUNC (in the wrong place)
- jsr PrintType ;Menu mode/Menu mode/Fill in
- jsr PrintFName ;FileName
- jsr PrintNumQ ;Number of questions
- jsr PrintDesc ;Print description of questions
- ;(What to do)
- ;
- ;start asking...
-
- StartAsk: move.w #$00,QueCount ;Reset question counter
- move.w #$00,Score ;Reset score
- jsr PressAnyKey
- jsr PrintScore
- jsr PrintQueCount
-
- ;Calculate memory address of question (a4) and answer (a5)
-
- Ask: move.w QueCount,d4
- cmp.w NumQ,d4
- bcc Game_Out ;Check if done all questions
-
- add.w #$01,d4
- move.w #$00,d3
-
- lea.l QAList,a4 ;Goes through list until
- move.l MLH_HEAD(a4),a4 ;at current question
- Ask1: add.w #1,d3
- cmp.w d3,d4
- beq Ask2
- move.l MLN_SUCC(a4),a4
- jmp Ask1
-
- Ask2: move.l QA_Data(a4),a4 ;Address of question
- move.l a4,a5
- add.l #QueLeng,a5 ;Address of answers
- move.l a5,CAnsBegin
- move.w QueCount,d4
- ;
- ;d4 = QueCount
- ;
- ;a4 = Question address
- ;a5 = Answer address
-
-
- jsr ResetPage
-
- ;Print question
-
- move.l a4,QueTextAdd
- move.l RP1,a0
- lea.l QueTxt1,a1
- move.l #1,d0
- move.l #QueTop,d1
- lib Intuition,PrintIText
-
- move.l #$C0FFEE,d2
- move.l a4,a0
- jsr Speaker
-
- add.l #LineLeng,a4
- move.l a4,QueTextAdd
- move.l RP1,a0
- lea.l QueTxt1,a1
- move.l #1,d0
- move.l #QueTop+10,d1
- lib Intuition,PrintIText
-
- move.l #$C0FFEE,d2
- move.l a4,a0
- jsr Speaker
-
- jmp Window1IDCMP
-
- ;Print description
-
- PrintDesc: move.l DesMem1,DesTextAdd
- move.l RP1,a0
- lea.l DesTxt1,a1
- move.l #1,d0
- move.l #DesTop,d1
- lib Intuition,PrintIText
-
- move.l DesMem1,d0
- add.l #80,d0
- move.l d0,DesTextAdd
- move.l RP1,a0
- lea.l DesTxt1,a1
- move.l #1,d0
- move.l #DesTop+10,d1
- lib Intuition,PrintIText
-
- move.l DesMem1,a0
- jsr Speaker
- move.l #$CADBEEF,d2
- move.l DesMem1,a0
- add.l #80,a0
- jsr Speaker
- rts
-
- Game_Out: lea.l SS_GameOver,a0
- jsr Speaker
-
- move.l #$DEAFBEEF,d2
- lea.l SS_Score,a0
- jsr Speaker
- move.l #$DEAFBEEF,d2
- lea.l ScoreText1,a0
- jsr Speaker
-
- move.w QueCount,d0
- ; add.w #1,d0
- cmp.w Score,d0
- bne Game_OUT1
- move.l #$DEAFBEEF,d2
- lea.l SS_Score2,a0
- jsr Speaker
-
- Game_OUT1: jsr PressAnyKey
-
- jsr RemaGad ;remove all gadgets from window
-
- jsr ClearPage
-
- move.w #$00,Mode
- move.l #$f800,d0 ;Enable menus
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$f820,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$f840,d0
- move.l Window1,a0
- lib Intuition,OnMenu
- move.l #$ffe4,d0
- move.l Window1,a0
- lib Intuition,OnMenu
-
- jsr MainMenu
- jmp Window1IDCMP
-
- PressAnyKey: lea.l NewAnyKeyWin1,a0
- lea.l NAnyKeyTL,a1
- lib Intuition,OpenWindowTagList
- move.l d0,AnyKeyWin1
- beq NoAnyKeyWin1
- move.l d0,a0
- move.l $32(a0),a3
-
- move.l a3,a0
- lea.l AnyKeyTxt1,a1
- clr.l d0
- clr.l d1
- lib Intuition,PrintIText
-
- lea.l SS_AnyKey,a0
- jsr Speaker
-
- move.l AnyKeyWin1,a0
- jsr CheckIDCMP
- move.l AnyKeyWin1,a0
- jsr ClearMSGs
- move.l #$00,AnyKeyWin1
- rts
-
- ;Clear question area. Now a subroutine.
-
- ResetPage: move.l RP1,a1
- move.l #$00,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1 ;Question
- move.l #1,d0
- move.l #QueTop,d1
- move.l #638,d2
- move.l #QueTop+19,d3
- lib Gfx,RectFill
-
- move.l RP1,a1 ;Multibox
- move.l #01,d0
- move.l #MulTop-1,d1
- move.l #638,d2
- move.l #MulTop+88,d3
- lib Gfx,RectFill
-
- ;Print numbers again
-
- move.l RP1,a0
- lea.l Num1Txt1,a1
- move.l #00,d0
- move.l #MulTop,d1
- lib Intuition,PrintIText
- rts
-
- ;Clean the screen of all text and Answer-Gadget
-
- ClearPage: move.l Window1,a0
- lea.l AStrGad1,a1
- lib Intuition,RemoveGadget
-
- move.l RP1,a1
- clr.l d0
- clr.l d1
- lib Gfx,Move
-
- move.l RP1,a1
- lib Gfx,ClearScreen
- rts
-
- ;Draw main menu
-
- MainMenu: tst.w Mode
- bne Window1IDCMP
- move.l RP1,a1
- move.l #$03,d0
- lib Gfx,SetAPen
-
- move.l RP1,a1
- move.l #50,d0 ;*1
- move.l #MainMTop,d1 ;*2
- move.l #590,d2
- move.l #MainMTop+100,d3
- lib Gfx,RectFill
-
- move.l RP1,a0
- lea.l MainMBorder1,a1
- move.l #50,d0 ;*1
- move.l #MainMTop,d1 ;*2
- lib Intuition,DrawBorder
-
- ;Print 'Please select option:' etc.
-
- move.l RP1,a0
- lea.l SelectTxt1,a1
- move.l #50+7,d0 ;*1
- move.l #MainMTop+4,d1 ;*2
- lib Intuition,PrintIText
-
- ;Add gadgets
-
- move.l Window1,a0
- lea.l MainMGad1,a1
- move.l #00,a2
- move.l #-1,d0
- move.l #-1,d1
- lib Intuition,AddGList
-
- ;Refresh gadget so its drawn on the screen
-
- lea.l MainMGad1,a0
- move.l Window1,a1
- move.l #$00,a2
- move.l #-1,d0
- lib Intuition,RefreshGList
- rts
-
- ;Clear everything.
-
- EmptyPage: move.l RP1,a1
- clr.l d0
- clr.l d1
- lib Gfx,Move
-
- move.l RP1,a1
- lib Gfx,ClearScreen
- rts
-
- ;Clear screen and add boxes to Window 1. Now a subroutine.
-
- DoPage: move.l RP1,a1
- clr.l d0
- clr.l d1
- lib Gfx,Move ;(a1,d0,d1)
-
- move.l RP1,a1
- lib Gfx,ClearScreen ;(a1)
-
- move.l RP1,a0
- lea.l ThreeLineBox1,a1 ;What-to-do box
- move.l #0,d0
- move.l #DesTop,d1
- lib Intuition,DrawBorder ;(a0,a1,d0,d1)
-
- move.l RP1,a0
- lea.l TwoLineBox1,a1 ;Question box
- move.l #0,d0
- move.l #QueTop,d1
- lib Intuition,DrawBorder
-
- move.l RP1,a0
- lea.l NineLineBox1,a1 ;Multi-question box
- move.l #0,d0 ;and answer
- move.l #MulTop,d1
- lib Intuition,DrawBorder
-
- jsr PrintTimer
- jsr PrintTime
- rts
-
- ;EDIT EDIT EDIT EDIT
-
- DoTeachPage: move.l RP1,a0
- lea.l MoveBorder1,a1 ;Draw borders around option
- move.l #0,d0 ;gadgets
- move.l #OptionTop-13,d1
- lib Intuition,DrawBorder ;(a0,a1,d0,d1)
-
- ;Add all the texts to Window1
-
- ; move.l RP1,a0
- ; lea.l MoveTxt1,a1
- ; move.l #00,d0
- ; move.l #OptionTop-12,d1
- ; lib Intuition,PrintIText
-
- rts
-
- About: jsr SleepPointer
-
- cmp.w #$00,Mode
- bne AboutCont1
- move.l Window1,a0
- lea.l MainMGad1,a1
- move.l #-1,d0
- lib Intuition,RemoveGList
- jmp AboutCont2
-
- AboutCont1: cmp.w #$02,Mode
- bne AboutCont2
- move.w NumQ,d6
- clr.w NumQ
- jsr SetActivation
- jsr OthActivation
- move.w d6,NumQ
-
- AboutCont2: jsr MenusOff
- lea.l SS_About,a0
- jsr Speaker
-
- move.l Window1,a0
- lea.l AboutTxt1,a1
- move.l #$00,a2 ;positive text
- lea.l OKTxt,a3 ;a bit the wrong way around but...
- move.l #$00,d0
- move.l #$00,d1
- move.l #320,d2
- move.l #$50,d3
- lib Intuition,AutoRequest
- jsr MenusOn
- jsr NormalPointer
- cmp.w #$00,Mode
- bne AboutCont3
- jsr MainMenu
- jmp Window1IDCMP
- AboutCont3: cmp.w #$02,Mode
- bne Window1IDCMP
- jsr SetActivation
- jsr OthActivation1
- jmp Window1IDCMP
-
- Quit: lea.l SS_Quit,a0
- jsr Speaker
-
- cmp.w #$01,Mode
- beq Game_Out
- cmp.w #$02,Mode
- bne Quit2
- jsr SaveQuestion
- jsr MenusOff
-
- move.l mlist,a0
- move.l #StudentMenuN,d0
- lib Intuition,ItemAddress
- move.l d0,a0
- or.w #CHECKED,$c(a0)
-
- move.l mlist,a0
- move.l #TeachMenuN,d0
- lib Intuition,ItemAddress
- move.l d0,a0
- and.w #~CHECKED,$c(a0)
-
- Quit1.1: jsr MenusOn
- jmp Student
-
- Quit2: jsr MenusOff
- jsr SleepPointer
-
- lea.l SS_Quit2,a0
- jsr Speaker
-
- jsr AskDoIt
- cmp.l #TRUE,d0
- bne Quit3
- jsr MenusOn
- jsr NormalPointer
- jmp ShutDown
- Quit3: jsr MenusOn
- jsr NormalPointer
- jmp Window1IDCMP
-
- FileRequester: move.l a5,FRTitle
- or.l d5,FRFlags
- lea.l FileRequest1,a0
- lib Req,FileRequester
- rts
-
- ;HiLite correct Answer
- ;d4 = Position to HiLite
-
- HiLite: move.w AnsCount,d4
- mulu.w #10,d4
- move.l RP1,a0
- move.l #01,d0
- move.l #MulTop-1,d1
- add.l d4,d1
- move.l a0,a1
- move.l d0,d2
- move.l d1,d3
- move.l #637,d4
- move.l #10,d5
- move.l #$30,d6 ;replace with inverted source
- lib Gfx,ClipBlit
- rts
-
- ;HiLite correct Type
- ;d4 = Position to HiLite (0, 1 or 2)
-
- HiLite2: mulu.w #10,d4
- move.l RP1,a0
- move.l #01,d0
- move.l #TimTop-1,d1
- add.l d4,d1
- move.l d4,d7
- move.l a0,a1
- move.l d0,d2
- move.l d1,d3
- move.l #288,d4
- move.l #10,d5
- move.l #$30,d6 ;replace with inverted source
- lib Gfx,ClipBlit
- rts
-
- ;HiLite correct CASE/ORDER/PUNC
- ;d4 = Position to HiLite (0, 1 or 2)
- ;Beta version marks all, since it checks all...
-
- HiLite3: move.l RP1,a0 ;Source
- move.l #CheckLeft-4,d0 ;X top corner
- move.l #CheckTop-1,d1 ;Y top corner
- move.l a0,a1 ;Destination = Source
- move.l d0,d2 ;Dest. X top corner
- move.l d1,d3 ;Dest. Y top corner
- move.l #638-CheckLeft+4,d4 ;X Size
- move.l #31,d5 ;Y Size
- move.l #$30,d6 ;replace with inverted source
- lib Gfx,ClipBlit
- rts
-
- CheckFile: move.l QueFile,d1
- move.l #0,d2
- move.l #-1,d3
- lib Dos,Seek
- move.l QueFile,d1
- lea.l Que,a0
- move.l a0,d2
- move.l #$08,d3
- flib Dos,Read
- tst.l d0
- bne CheckFile1
- jsr FileError
- move.l #0,d0
- rts
- CheckFile1: move.l Que,d0
- cmp.l #"Ques",d0
- bne CheckFile2
- tst.w NumQ
- beq CheckFile3
- move.l #-1,d0
- rts
- CheckFile2: lea.l SS_ERR_File2,a0
- jsr Speaker
- move.l Window1,a0
- lea.l WrongTxt1,a1
- move.l #$00,a2 ;positive text
- lea.l OKTxt,a3 ;a bit the wrong way around but...
- move.l #$00,d0
- move.l #$00,d1
- move.l #$90,d2
- move.l #$40,d3
- lib Intuition,AutoRequest
- rts
- CheckFile3: jsr NoQues
- rts
-
- VCheckFile: move.l QueFile,d1
- move.l #0,d2
- move.l #-1,d3
- lib Dos,Seek
- move.l QueFile,d1
- lea.l VQue,a0
- move.l a0,d2
- move.l #$3f,d3
- flib Dos,Read
- tst.l d0
- bne VCheckFile1
- jsr FileError
- move.l #0,d0
- rts
- VCheckFile1: lea.l VQue,a0
- cmp.l #$0A564953,(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'AMA ',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'QUIZ',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #' FIL',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'E - ',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'NOT ',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'TO B',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'E AL',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'TERE',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'D MA',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #'NUAL',(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #$4C59210D,(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #$0a070707,(a0)
- bne CheckFile2
- add.l #4,a0
- cmp.l #$07070707,(a0)
- bne CheckFile2
- cmp.b #$F3,VType
- bne NotSupported
- move.l #-1,d0
- rts
-
- AskDoIt: move.l Window1,a0
- lea.l DoItTxt1,a1
- lea.l OKTxt,a2 ;Positive text
- lea.l CancelTxt,a3 ;Negative text
- move.l #$00,d0
- move.l #$00,d1
- move.l #200,d2
- move.l #$30,d3
- lib Intuition,AutoRequest
- rts
-
- NoMem1: lea.l SS_ERR_Mem1,a0
- jsr Speaker
-
- move.l Window1,a0
- lea.l NoMemTxt1,a1
- move.l #$00,a2 ;positive text
- lea.l OKTxt,a3 ;a bit the wrong way around but...
- move.l #$00,d0
- move.l #$00,d1
- move.l #320,d2
- move.l #$40,d3
- lib Intuition,AutoRequest
- rts
-
- NoQues: lea.l SS_ERR_Que1,a0
- jsr Speaker
-
- move.l Window1,a0
- lea.l NoQuesTxt1,a1
- move.l #$00,a2 ;positive text
- lea.l OKTxt,a3 ;a bit the wrong way around but...
- move.l #$00,d0
- move.l #$00,d1
- move.l #320,d2
- move.l #$40,d3
- lib Intuition,AutoRequest
- rts
-
- NotSupported: lea.l SS_ERR_File5,a0
- jsr Speaker
-
- move.l Window1,a0
- lea.l FNSupportTxt1,a1
- move.l #$00,a2 ;positive text
- lea.l OKTxt,a3 ;a bit the wrong way around but...
- move.l #$00,d0
- move.l #$00,d1
- move.l #320,d2
- move.l #$40,d3
- lib Intuition,AutoRequest
- rts
-
- ShutDown: move.l OurTask,a0
- move.l OldTaskWinPtr,$b8(a0)
-
- tst.l _DosBase
- beq ShutDown9300
- lea.l SS_Quiting,a0
- jsr Speaker
-
- ShutDown9300: tst.l NILFile
- beq ShutDown9200
- move.l NILFile,d1
- lib Dos,Close
- move.l #$00,NILFile
-
- ShutDown9200: tst.l PrefsFile
- beq ShutDown9100
- move.l PrefsFile,d1
- lib Dos,Close
- move.l #$00,PrefsFile
-
- ShutDown9100: tst.l SpeakFile
- beq ShutDown9050
- move.l SpeakFile,d1
- lib Dos,Close
- move.l #$00,SpeakFile
-
- ShutDown9050: tst.l SpeakFile2
- beq ShutDown9025
- move.l SpeakFile2,d1
- lib Dos,Close
- move.l #$00,SpeakFile2
-
- ShutDown9025: tst.l FontFile
- beq ShutDown9000
- move.l FontFile,a1
- lib Gfx,CloseFont
- move.l #$00,FontFile
-
- ShutDown9000: tst.l QueFile
- beq ShutDown8100
- move.l QueFile,d1
- lib Dos,Close
- move.l #$00,QueFile
-
- ShutDown8100: tst.l DesMem1
- beq ShutDown8050
- move.l DesMem1,a1
- move.l #DesLeng+12,d0
- lib Exec,FreeMem
- move.l #$00,DesMem1
-
- ShutDown8050: tst.l FileMem1
- beq ShutDown8000
- move.l FileMem1,a1
- move.l FileLeng1,d0
- lib Exec,FreeMem
- move.l #$00,FileMem1
-
- ShutDown8000: jsr KillQueMem1
- jsr RemIHand
-
- ShutDown7300: tst.l PrefsWin1
- beq ShutDown7200
- move.l PrefsWin1,a0
- jsr ClearMSGs
- ShutDown7200: tst.l AnyKeyWin1
- beq ShutDown7100
- move.l AnyKeyWin1,a0
- jsr ClearMSGs
- ShutDown7100: tst.l WrongWin1
- beq ShutDown7000
- move.l WrongWin1,a0
- jsr ClearMSGs
- ShutDown7000: tst.l RightWin1
- beq ShutDown5000
- move.l RightWin1,a0
- jsr ClearMSGs
-
- ShutDown5000: tst.l Window1
- beq ShutDown4900
- move.l Window1,a0
- lib Intuition,ClearMenuStrip
- move.l Window1,a0
- jsr ClearMSGs
-
- ShutDown4900: jsr Clean2.0Magic
-
- ShutDown4500: tst.l Screen1
- beq ShutDown3000
- move.l Screen1,a0
- lib Intuition,CloseScreen
-
- ShutDown3000: tst.l _ReqBase
- beq ShutDown2000
- lea.l FileRequest1,a0
- lib Req,PurgeFiles
- lea.l FileRequest2,a0
- lib Req,PurgeFiles
-
- ShutDown2000:
-
- ShutDown1100: tst.l _IntuitionBase
- beq ShutDown1000
- lib Intuition,OpenWorkBench ;For that xtra touch
- ShutDown1000: closlib Intuition
- closlib GadTools
- closlib Req
- closlib Gfx
- ; closlib Iff
- closlib Dos
- ShutDown999: move.l WBMsg,d2
- beq ShutDownOut
- lib Exec,Forbid
- move.l d2,a1
- flib Exec,ReplyMsg
- ShutDownOut: pull d2-d7/a2-a6
- move.l #RETURN_OK,d0
- rts
-
- ShowGuru: lea.l NoMemGuru,a0
- move.l #52,d1
- move.l #RECOVERY_ALERT,d0
- lib Intuition,DisplayAlert
- rts
-
- NoKS20: print <"This program requires Kickstart 2.0 or higher!",13,10>,_stdout
- lea.l SS_ERR_KS20,a0
- jsr Speaker
- jmp ShutDown
- NoDos: jmp ShutDown
-
- NoDiskfont: print <"Couldn't open diskfont.library!",13,10>,_stdout
- lea.l SS_ERR_Lib1,a0
- jsr Speaker
- jmp ShutDown
- NoInt: print <"Couldn't open intuition.library!",13,10>,_stdout
- lea.l SS_ERR_Lib1,a0
- jsr Speaker
- jmp ShutDown
- NoGfx: print <"Couldn't open graphics.library!",13,10>,_stdout
- lea.l SS_ERR_Lib1,a0
- jsr Speaker
- jmp ShutDown
- NoReq: print <"You need req.library 2.5 or higher!",13,10>,_stdout
- move.l #$00,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Lib1,a0
- jsr Speaker
- jmp ShutDown
- NoScreen1.1: print <"Couldn't open (TagList) Screen1!",13,10>,_stdout
- move.l #$00,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Scr1,a0
- jsr Speaker
- jmp ShutDown
- NoWrongWin1: print <"Couldn't open Wrong-Window1!",13,10>,_stdout
- move.l Screen1,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Win1,a0
- jsr Speaker
- jmp ShutDown
- NoRightWin1: print <"Couldn't open Right-Window1!",13,10>,_stdout
- move.l Screen1,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Win1,a0
- jsr Speaker
- jmp ShutDown
- NoAnyKeyWin1: print <"Couldn't open AnyKey-Window1!",13,10>,_stdout
- move.l Screen1,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Win1,a0
- jsr Speaker
- jmp ShutDown
-
- NoWindow1: print <"Couldn't open Window1!",13,10>,_stdout
- move.l Screen1,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Win1,a0
- jsr Speaker
- jmp ShutDown
-
- NoHelpWin1: print <"Couldn't open Help-Window!",13,10>,_stdout
- move.l Screen1,a0
- lib Intuition,DisplayBeep
- lea.l SS_ERR_Win1,a0
- jsr Speaker
- jmp ShutDown
-
- NoSpeaking: move.l #$00,a0
- lib Intuition,DisplayBeep
- lea.l NoSPEAKText1,a0
- move.l #$00,a1
- jsr SimpleRequest
- move.w #$00,Talk ;Disable talking
- jmp OpenLibs
-
- SleepPointer: move.l Window1,a0
- lea.l ClockPointer1,a1
- move.l #16,d0
- move.l #16,d1 ;WHAT-THE-HECK IS THIS FOR?
- move.l #-6,d2
- move.l #0,d3
- lib Intuition,SetPointer
- rts
-
- NormalPointer: move.l Window1,a0
- lib Intuition,ClearPointer
- rts
-
- MenusOn: move.l Window1,a0
- move.l mlist,a1
- lib Intuition,SetMenuStrip
- rts
-
- MenusOff: move.l Window1,a0
- lib Intuition,ClearMenuStrip
- rts
-
- MenuNull: move.l d3,d6
-
- ror.l #5,d6
- lsr.l #8,d6
- lsr.l #8,d6
- lsr.l #8,d6
- lsr.l #3,d6
-
- move.l d3,d5
-
- ror.l #5,d5
- ror.l #6,d5
- lsr.l #8,d5
- lsr.l #8,d5
- lsr.l #8,d5
- lsr.l #2,d5
-
- move.l #$00,d4
- move.w d3,d4
- lsr.l #5,d4
- lsr.l #6,d4
- rts
-
- ;CheckIDCMP gets messages from both our Input-Handler and Intuition.
- ;Give it the window structure in a0
-
- CheckIDCMP: move.l $56(a0),a2 ;Get window's port
- move.l #0,d1 ;Set signals for
- move.b $0f(a2),d1 ;IntuiMessages
- move.l SigBit2,d0 ;and for our IHandler
- bset.l d1,d0
- lib Exec,Wait
-
- cmp.l SigBit2,d0
- beq DoHandler
-
- GetMsg1: move.l a2,a0
- lib GadTools,GT_GetIMsg
- tst.l d0
- beq GetMsg2
-
- move.l d0,a1
- move.l $14(a1),d2 ;answers with Class in d2,
- move.w $18(a1),d3 ;Code in d3 and
- move.w $1a(a1),a4 ;Qualifier in a4
- move.l $1c(a1),a5 ;IAddress in a5
- lib GadTools,GT_ReplyIMsg
- jmp GetMsg1
- GetMsg2: move.l #-1,d0
- rts
-
- ClearMSGs: move.l a0,d0
- tst.l d0
- beq ClearMsg3
- move.l a0,a3
- lib Exec,Forbid
- move.l $56(a3),a2 ;Give it the window structure in a0
- ClearMsg1: move.l a2,a0
- lib GadTools,GT_GetIMsg
- tst.l d0
- beq ClearMsg2
- move.l d0,a1
- lib GadTools,GT_ReplyIMsg
- jmp ClearMsg1
- ClearMsg2: move.l a3,a0
- move.l #$00,d0
- lib Intuition,ModifyIDCMP
- lib Exec,Permit
- move.l a3,a0
- lib Intuition,CloseWindow
- ClearMsg3: rts
-
- INCLUDE "FH0:Language/WF/Questions/QFileRequester.i"
- INCLUDE "FH0:Language/WF/Questions/DosError.i"
-
- Do2.0Magic: lea.l NewScreen1,a0
- lea.l Screen1TagList,a1
- lib Intuition,OpenScreenTagList
- move.l d0,Screen1
- beq NoScreen1.1
-
- ;New style gadget stuff
-
- lea.l glist,a0
- lib GadTools,CreateContext
- move.l d0,ContextGad
- beq Do2.0Magic2
-
- move.l Screen1,a0
- lea.l Screen1TagList,a1
- lib GadTools,GetVisualInfoA
- move.l d0,vi
-
- move.l glist,a0
- lea.l NGFirstGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,FirstGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGLastGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,LastGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGPrevGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,PrevGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGNextGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,NextGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGAddGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,AddGad1P
-
- lea.l NGDeleteGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,DelGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGUndoGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,UndoGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGSClearGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,a0
- move.l a0,SClearGad1P
- or.w #GADGDISABLED,$c(a0)
-
- lea.l NGClearGad,a1
- move.l #BUTTON_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l GadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,ClearGad1P
- move.l d0,a0
-
- lea.l NGAddMGad,a1
- move.l #CYCLE_KIND,d0
- move.l vi,gng_VisualInfo(a1)
- lea.l AMGadTagList,a2
- lib GadTools,CreateGadgetA
-
- move.l d0,AddMGad1P
-
- move.b #1,GadMagic
-
- ;New style menu stuff
-
- Do2.0Magic2: lea.l MNMainMenu1,a0
- lea.l MenuTagList,a1
- lib GadTools,CreateMenusA
- move.l d0,mlist
- beq Do2.0_OUT
-
- Do2.0Magic3: move.l mlist,a0
- move.l vi,a1
- lea.l MenuTagList,a2
- lib GadTools,LayoutMenusA
- move.b #1,MenuMagic
- Do2.0_OUT: rts
-
- Clean2.0Magic: tst.b GadMagic
- beq Clean2.0M2
- move.l glist,a0
- lib GadTools,FreeGadgets
-
- Clean2.0M2: tst.b MenuMagic
- beq Clean2.0M3
- move.l mlist,a0
- lib GadTools,FreeMenus
-
- Clean2.0M3: tst.b GadMagic2
- beq Clean2.0M4
- move.l glist2,a0
- lib GadTools,FreeGadgets
-
- Clean2.0M4: tst.b MenuMagic2
- beq Clean2.0M5
- move.l mlist2,a0
- lib GadTools,FreeMenus
-
- Clean2.0M5: tst.b GadMagic3
- beq Clean2.0M6
- move.l glist3,a0
- lib GadTools,FreeGadgets
-
- Clean2.0M6: tst.b MenuMagic3
- beq Clean2.0M7
- move.l mlist3,a0
- lib GadTools,FreeMenus
-
- Clean2.0M7: tst.l vi
- beq Clean2.0_OUT
- move.l vi,a0
- lib GadTools,FreeVisualInfo
-
- Clean2.0_OUT: rts
-
- ;Give this subroutine the address of the text in d2
- ;
- ;It will then write the text to the SPEAK: device
- ;
- ;This will hopefully be changed to something doing with narrator.device
- ;
-
- Speaker: cmp.l #$00,a0
- beq Speaker_OUT
- tst.w Talk
- beq Speaker_OUT ;No speech wanted
- move.l SpeakFile,d1
- beq Speaker_OUT ;If we couldn't get SPEAK:
- Speaker1: tst.w TalkDes
- beq Speaker2
- cmp.l DesMem1,a0
- beq SpeakerDo
- cmp.l #$CADBEEF,d2
- beq SpeakerDo
- Speaker2: tst.w TalkQue
- beq Speaker3
- cmp.l #$C0FFEE,d2
- beq SpeakerDo
- Speaker3: tst.w TalkAns
- beq Speaker4
- cmp.l #$DEADBEEF,d2
- beq SpeakerDo
- Speaker4: tst.w TalkScore
- beq Speaker5
- cmp.l #$DEAFBEEF,d2
- beq SpeakerDo
- Speaker5: move.l a0,d2
- jsr GetLength
- tst.w TalkSys
- beq Speaker_OUT
- move.l d2,a0
- cmp.b #$dc,0(a0,d3.l)
- beq SpeakerDo
- jmp Speaker_OUT
- SpeakerDo: move.l a0,d2
- jsr GetLength
- lib Dos,Write
- Speaker_OUT: rts
-
- INCLUDE "FH0:Language/WF/Questions/Que.i"
- INCLUDE "FH0:Language/WF/Questions/QueSpeak.i"
-
- ;Question file stuff - a straight copy of the .Que files and vice versa
-
- ds.w 0
-
- Que: dc.b "Ques" ;Header
- NumQ: dc.w 0 ;Number of questions (max 65535?)
- Type: dc.b 0 ;Multiple correct, One correct etc.
- Timer: dc.b 0 ;0=No timer, 1-255 Seconds
-
- ;Visama file stuff - a straight copy of the .Que files and vice versa
-
- VQue: dc.b $0d,"VISAMA QUIZ FILE - NOT TO BE ALTERED MANUALLY!"
- dc.b $0d,$0a,7,7,7,7,7,7,7
- HuuhaaI: dc.b $1a ;Don't now yet (version?)
- VType: dc.b $f3 ;Visama type ($f1-$f3)
- VTimer: dc.b $f0 ;Timer ($f0 = no, $f1 = yes)
- VRndSeq: dc.b $f1 ;RND/SEQ ($f0 = SEQ, $f1 = RND)
- VTDQ: dc.b $20,$20,$20,$20 ;How many? (RND-Mode, ASCII)
-
- ;Pointers
-
- ;GadTools stuff
-
- vi: dc.l 0
- mlist: dc.l 0
- GadMagic: dc.b 0 ;using new gadgets? (0=No, 1=Yes)
- MenuMagic: dc.b 0 ;using new menus? (0=No, 1=Yes)
- ContextGad: dc.l 0
- FirstGad1P: dc.l 0
- LastGad1P: dc.l 0
- PrevGad1P: dc.l 0
- NextGad1P: dc.l 0
- AddGad1P: dc.l 0
- CutGad1P: dc.l 0
- CopyGad1P: dc.l 0
- PasteGad1P: dc.l 0
- DelGad1P: dc.l 0
- UndoGad1P: dc.l 0
- SClearGad1P: dc.l 0
- ClearGad1P: dc.l 0
- AddMGad1P: dc.l 0
-
- ;Display stuff
-
- Screen1: dc.l 0
- ViewPort1: dc.l 0
- Window1: dc.l 0
- RP1: dc.l 0
- WrongWin1: dc.l 0
- RightWin1: dc.l 0
- AnyKeyWin1: dc.l 0
-
- ;Library stuff (well what's needed anymore)
-
- libnames
-
- ;_IffBase: dc.l 0
- ;_IffLib: dc.b "iff.library",0
- ; ds.w 0
-
- ;File stuff
-
- _stdout: dc.l 0
- ;IffFile: dc.l 0
- QueFile dc.l 0
- NILName: dc.b "NIL:",0
- ds.w 0
- NILFile: dc.l 0
- FontFile: dc.l 0
-
- ;WB stuff
-
- WBMsg: dc.l 0
-
- ;Memory stuff
-
- DesMem1: dc.l 0 ;Address of description
- FileMem1: dc.l 0 ;Tempory memory for file
- FileLeng1: dc.l 0 ;Length of file
-
- ;Other question stuff
-
- QueCount: dc.w 0 ;Asking QueCount'th question
- AnsCount: dc.w 0 ;Checking AnsCount'th answer,
- ;also used for printing
- Score: dc.w 0 ;Player score
- QueCount2: dc.w 0 ;out of QueCount'th questions
- LastAns: dc.w 0 ;Wrong (0) or right (1)?
- QueBegin: dc.l 0 ;Question begin
- CAnsBegin: dc.l 0 ;Correct answer begin
- CurrentQue: dc.l 0 ;Current question
- PrevActSGad: dc.l 0 ;Previous active string gad
-
- ;Task stuff
-
- OurTask: dc.l 0
- OldTaskWinPtr: dc.l 0
-
- ;Other stuff XIV
-
- Mode: dc.w 0 ;0=Waiting, 1=Running, 2=Editing
- AddMode: dc.w 0 ;0=To end, 1=To start, 2=Insert
-
- ;Texts, Part I
-
- QName: dc.b "Questions (C)opyright 1991 Tomi Blinnikka",0
- QName2: dc.b "Questions",0
- LoadName: dc.b "Load quiz. Questions format",0
- SaveName: dc.b "Save quiz. Questions format",0
- LoadName2: dc.b "Load quiz. Visama format",0
- SaveName2: dc.b "Save quiz. Visama format",0
- NoSPEAKText1: dc.b "Couldn't open SPEAK: device! No speaking available",0
- NoFontText1: dc.b "Couldn't open pcfont.font (size 8).",0
- ds.w 0
-
- ;Structures
-
- ;Alert stuff
-
- NoMemGuru: dc.b $0,$f0,16,"Out of memory.",0,1
- dc.b $0,$f,45,"Left for OK",0,1
- dc.b $1,$f1,45,"Right for CANCEL",0,1
- ds.w 0
-
- ;New screen & new window structures
-
- NewScreen1 dc.w 0,0 ;X,Y POS
- Screen1MaxCol dc.w -1 ;640 ;WIDTH
- Screen1MaxRow dc.w -1 ;200 ;HEIGHT
- dc.w 2 ;DEPTH
- dc.b 0,1 ;COLORS
- dc.w V_HIRES ;VIEWMODES
- dc.w CUSTOMSCREEN ;TYPE
- dc.l Topaz ;Screen1Font ;FONT
- dc.l QName ;DEFULT TITLE
- dc.l 0 ;GADGETS
- dc.l 0 ;CUSTOMBITMAP
-
- Screen1TagList: dc.l SA_Pens,default_pens
- ; dc.l SA_Width,640
- ; dc.l SA_Height,200
- dc.l TAG_DONE,0
-
- default_pens dc.w ~0
-
- NewWindow1 dc.w 0,0 ;X,Y POS
- dc.w 640 ;724 ;WIDTH
- dc.w 200 ;283 ;HEIGHT
- dc.b 0,1 ;PENS
- dc.l GADGETDOWN!GADGETUP!VANILLAKEY!RAWKEY!MENUPICK!ACTIVEWINDOW
- NWin1Flags: dc.l ACTIVATE!BACKDROP!BORDERLESS
- dc.l 0,0 ;GADGETS, CHECKMARK
- dc.l QName2 ;TITLE
- SToW1 dc.l 0 ;SCREEN ADDRESS
- dc.l 0 ;BITMAP
- dc.w 640,200,724,283 ;MINIMUM SIZE
- dc.w CUSTOMSCREEN ;TYPE
-
- NewWrongWin1 dc.w 150,40 ;X,Y POS
- dc.w 80 ;WIDTH
- dc.w 25 ;HEIGHT
- dc.b 0,1 ;PENS
- dc.l VANILLAKEY!RAWKEY!INACTIVEWINDOW!CLOSEWINDOW!MOUSEBUTTONS
- dc.l GIMMEZEROZERO!ACTIVATE!WINDOWCLOSE
- dc.l 0,0 ;GADGETS, CHECKMARK
- dc.l 0 ;TITLE
- SToW2 dc.l 0 ;SCREEN ADDRESS
- dc.l 0 ;BITMAP
- dc.w 80,25,80,25 ;MINIMUM SIZE
- dc.w CUSTOMSCREEN ;TYPE
-
- NWrongTL: dc.l WA_InnerWidth,80
- dc.l WA_InnerHeight,12
- dc.l TAG_DONE,0
-
- NewRightWin1 dc.w 150,40 ;X,Y POS
- dc.w 80 ;WIDTH
- dc.w 25 ;HEIGHT
- dc.b 0,1 ;PENS
- dc.l VANILLAKEY!RAWKEY!INACTIVEWINDOW!CLOSEWINDOW!MOUSEBUTTONS
- dc.l GIMMEZEROZERO!ACTIVATE!WINDOWCLOSE
- dc.l 0,0 ;GADGETS, CHECKMARK
- dc.l 0 ;TITLE
- SToW3 dc.l 0 ;SCREEN ADDRESS
- dc.l 0 ;BITMAP
- dc.w 80,25,80,25 ;MINIMUM SIZE
- dc.w CUSTOMSCREEN ;TYPE
-
- NewAnyKeyWin1 dc.w 150,50 ;X,Y POS
- dc.w 130 ;WIDTH
- dc.w 25 ;HEIGHT
- dc.b 0,1 ;PENS
- dc.l VANILLAKEY!RAWKEY!INACTIVEWINDOW!CLOSEWINDOW!MOUSEBUTTONS
- dc.l GIMMEZEROZERO!ACTIVATE!WINDOWCLOSE
- dc.l 0,0 ;GADGETS, CHECKMARK
- dc.l 0 ;TITLE
- SToW4 dc.l 0 ;SCREEN ADDRESS
- dc.l 0 ;BITMAP
- dc.w 130,25,130,25 ;MINIMUM SIZE
- dc.w CUSTOMSCREEN ;TYPE
-
- NAnyKeyTL: dc.l WA_InnerWidth,130
- dc.l WA_InnerHeight,12
- dc.l TAG_DONE,0
-
- AgainWin1 dc.w 150,50 ;X,Y POS
- dc.w 130 ;WIDTH
- dc.w 25 ;HEIGHT
- dc.b 0,1 ;PENS
- dc.l VANILLAKEY!RAWKEY!INACTIVEWINDOW!CLOSEWINDOW!MOUSEBUTTONS
- dc.l GIMMEZEROZERO!ACTIVATE!WINDOWCLOSE
- dc.l 0,0 ;GADGETS, CHECKMARK
- dc.l 0 ;TITLE
- SToW6 dc.l 0 ;SCREEN ADDRESS
- dc.l 0 ;BITMAP
- dc.w 130,25,130,25 ;MINIMUM SIZE
- dc.w CUSTOMSCREEN ;TYPE
-
- NAgainTL: dc.l WA_InnerWidth,130
- dc.l WA_InnerHeight,25
- dc.l TAG_DONE,0
-
- ;Fonts
-
- Topaz dc.l TopazName
- dc.w 8
- dc.b 0
- dc.b 0
- TopazName dc.b "topaz.font",0
- ds.w 0
-
- Screen1Font dc.l Scr1FontName
- dc.w 8
- dc.b 0
- dc.b 0
- Scr1FontName dc.b "pcfont.font",0
- ds.w 0
-
- ;Gadget TagLists
-
- GadTagList: dc.l GT_Underscore,'_'
- dc.l TAG_DONE,0
- AMGadTagList: dc.l GTCY_Labels,AMLabels
- dc.l TAG_DONE,0
-
- AMLabels: dc.l AMLabel1,AMLabel2,AMLabel3,0
- AMLabel1: dc.b "End",0
- AMLabel2: dc.b "Top",0
- AMLabel3: dc.b "Ins",0
- ds.w 0
-
- ;Gadet labels Part I
-
- ;New gadget structures
-
- NGFirstGad: dc.w 13 ;gng_LeftEdge
- dc.w OptionTop3 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l FirstGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 10 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGLastGad: dc.w 63 ;gng_LeftEdge
- dc.w OptionTop3 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l LastGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 15 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGPrevGad: dc.w 13 ;gng_LeftEdge
- dc.w OptionTop3+14 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l PrevGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 20 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGNextGad: dc.w 63 ;gng_LeftEdge
- dc.w OptionTop3+14 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l NextGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 30 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGAddGad: dc.w 124 ;gng_LeftEdge
- dc.w OptionTop3 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l AddGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 40 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGSClearGad: dc.w 174 ;gng_LeftEdge
- dc.w OptionTop3+14 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l EraseGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 44 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGDeleteGad: dc.w 124 ;gng_LeftEdge
- dc.w OptionTop3+14 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l DeleteGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 45 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGUndoGad: dc.w 174 ;gng_LeftEdge
- dc.w OptionTop3 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l UndoGadText2 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 50 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGClearGad: dc.w 235 ;gng_LeftEdge
- dc.w OptionTop3 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l ClearGad1Text1 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 60 ;gng_GadgetID
- dc.l PLACETEXT_IN ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- NGAddMGad: dc.w 235 ;gng_LeftEdge
- dc.w OptionTop3+14 ;gng_TopEdge
- dc.w 50 ;gng_Width
- dc.w 12 ;gng_Height
- dc.l 0 ;AddMGad1Text1 ;gng_GadgetText
- dc.l Topaz ;gng_TextAttr
- dc.w 61 ;gng_GadgetID
- dc.l PLACETEXT_ABOVE ;gng_Flags
- dc.l 0 ;gng_VisualInfo
- dc.l 0 ;gng_UserData
-
- glist: dc.l 0 ;Next Gadget
- dc.w 0 ;"hit-box" left edge
- dc.w 0 ;"hit-box" top edge
- dc.w 0 ;"hit-box" Width
- dc.w 0 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w 0 ;activation
- dc.w 0 ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 0 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
-
- ;Gadget text strings
-
- FirstGadText2: dc.b "_" ;Must be before Text1
- FirstGad1Text1: dc.b "First",0
- LastGadText2: dc.b "Last",0
- PrevGadText2: dc.b "_" ;Must be before Text1
- PrevGad1Text1: dc.b "Prev",0
- NextGadText2: dc.b "_" ;Must be before Text1
- NextGad1Text1: dc.b "Next",0
- AddGadText2: dc.b "_" ;Must be before Text1
- AddGad1Text1: dc.b "Add",0
- DeleteGadText2: dc.b "_" ;Must be before Text1
- DeleteGad1Text1: dc.b "Del",0
- UndoGadText2: dc.b "_" ;Must be before Text1
- UndoGad1Text1: dc.b "Undo",0
- EraseGadText2: dc.b "_" ;Must be before Text1
- EraseGad1Text1: dc.b "Erase",0
- ClearGad1Text1: dc.b "Clear",0
- AddMGad1Text1: dc.b "Add mode:",0
-
- MainMText1: dc.b "1. Start quiz",0
- MainMText2: dc.b "2. Enter name",0
- MainMText3: dc.b "3. Load quiz",0
- MainMText4: dc.b "4. Teacher mode",0
- MainMText5: dc.b "5. Set preferences",0
- MainMText6: dc.b "6. Help",0
- MainMText7: dc.b "7. About Questions",0
- MainMText8: dc.b "8. Quit",0
- ds.w 0
-
- ;Change this into a gadtools 2.0-superlook gadget!
-
- NameGad1: dc.l 0 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w NameTop ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l OneLineBox1 ;gadget rendering
- dc.l OneLineBox1 ;select rendering
- dc.l NameGadTxt1 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l NameGadInfo ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- NameGadInfo: dc.l NameGad1Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w NameLeng-2 ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- NameGadTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,-10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l NameGad1Text ;TEXT
- dc.l 0 ;NEXTTEXT
-
- NameGad1Text: dc.b "Please enter your name:",0
- ds.w 0
-
- DesStrGad1: dc.l DesStrGad2 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w DesTop ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l DesStr1Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- DesStr1Info: dc.l DesStr1Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w DLineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- DesStrGad2: dc.l DesStrGad3 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w DesTop+10 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l DesStr2Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- DesStr2Info: dc.l DesStr2Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w DLineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- DesStrGad3: dc.l QueStrGad1 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w DesTop+20 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l DesStr3Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- DesStr3Info: dc.l DesStr3Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w DLineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- QueStrGad1: dc.l QueStrGad2 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w QueTop ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l QueStr1Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- QueStr1Info: dc.l QueStr1Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- QueStrGad2: dc.l MulStrGad1 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w QueTop+10 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l QueStr2Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- QueStr2Info: dc.l QueStr2Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad1: dc.l MulStrGad2 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr1Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr1Info: dc.l MulStr1Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad2: dc.l MulStrGad3 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+10 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr2Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr2Info: dc.l MulStr2Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad3: dc.l MulStrGad4 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+20 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr3Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr3Info: dc.l MulStr3Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad4: dc.l MulStrGad5 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+30 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr4Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr4Info: dc.l MulStr4Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad5: dc.l MulStrGad6 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+40 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr5Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr5Info: dc.l MulStr5Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad6: dc.l MulStrGad7 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+50 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr6Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr6Info: dc.l MulStr6Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad7: dc.l MulStrGad8 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+60 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr7Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr7Info: dc.l MulStr7Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad8: dc.l MulStrGad9 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+70 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr8Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr8Info: dc.l MulStr8Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MulStrGad9: dc.l 0 ;MulStrGad10 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w MulTop+80 ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l MulStr9Info ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MulStr9Info: dc.l MulStr9Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- dc.w 0 ;Pos in Buffer
- dc.w LineLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- AStrGad1: dc.l 0 ;Next Gadget
- dc.w 1 ;"hit-box" left edge
- dc.w AnsTop ;"hit-box" top edge
- dc.w 638 ;"hit-box" Width
- dc.w 9 ;"hit-box" Height
- dc.w 0 ;flags
- dc.w GADGIMMEDIATE+RELVERIFY ;activation
- dc.w STRGADGET ;gadget type
- dc.l OneLineBox1 ;gadget rendering
- dc.l OneLineBox1 ;select rendering
- dc.l 0 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l Gad2StrInfo ;special info
- dc.w 1 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- Gad2StrInfo: dc.l AStrGad1Buf ;Gadget Buffer
- dc.l GadUnBuf ;Gadget Undo Buffer
- Gad2PosInBuf: dc.w 0 ;Pos in Buffer
- dc.w AnsLeng ;Max. Chars in Buffer
- dc.w 1 ;Buffer Pos. of 1st disp. char
-
- dc.w 0 ;Intuition takes care of these.
- dc.w 0
- dc.w 0
- dc.w 0
- dc.w 0
- dc.l 0
-
- MainMGad1 dc.l MainMGad2 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+15 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt1 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 70 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt1 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad2 dc.l MainMGad3 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+25 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt2 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 71 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt2 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText2 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad3 dc.l MainMGad4 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+35 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt3 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 72 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt3 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText3 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad4 dc.l MainMGad5 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+45 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt4 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 73 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt4 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText4 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad5 dc.l MainMGad6 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+55 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt5 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 74 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt5 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText5 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad6 dc.l MainMGad7 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+65 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt6 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 75 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt6 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText6 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad7 dc.l MainMGad8 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+75 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt7 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 76 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt7 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText7 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MainMGad8 dc.l 0 ;Next Gadget
- dc.w 54 ;"hit-box" left edge
- dc.w MainMTop+85 ;"hit-box" top edge
- dc.w 533 ;"hit-box" Width
- dc.w 10 ;"hit-box" Height
- dc.w GADGHCOMP
- dc.w RELVERIFY ;activation
- dc.w BOOLGADGET ;gadget type
- dc.l 0 ;gadget rendering
- dc.l 0 ;select rendering
- dc.l MMGadTxt8 ;gadget text
- dc.l 0 ;mutual exclude
- dc.l 0 ;special info
- dc.w 77 ;gadget ID (user definable)
- dc.l 0 ;ptr to general purpose user data
-
- MMGadTxt8 dc.b 1,2 ;PENS
- dc.w 0 ;MODE
- dc.w 3,1 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MainMText8 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- ;Menu TagList(s)
-
- MenuTagList: dc.l GTMN_TextAttr,Topaz
- dc.l GTMN_Menu,MNMainMenu1
- dc.l TAG_DONE,0
-
- ;Menu texts
-
- Menu1Name: dc.b "Main",0
- StartMenu1I1Text: dc.b "Start!",0
- StartCommKey: dc.b "G",0
- ENameMenu1I1Text: dc.b "Enter name",0
- ENameCommKey: dc.b "E",0
- LoadMenu1I1Text: dc.b "Load...",0
- LoadCommKey: dc.b "L",0
- LoadQMenu1I1Text: dc.b "Questions format",0
- LoadVMenu1I1Text: dc.b "Visama format",0
- SaveMenu1I1Text: dc.b "Save",0
- SaveCommKey: dc.b "S",0
- SaveQMenu1I1Text: dc.b "Questions format",0
- SaveVMenu1I1Text: dc.b "Visama format",0
- SaveAsMenu1I1Text: dc.b "Save as...",0
- SaveAsCommKey: dc.b "W",0
- HelpMenu1I1Text: dc.b "Help...",0
- HelpCommKey: dc.b "H",0
- AboutMenu1I1Text: dc.b "About...",0
- AboutCommKey: dc.b "?",0
- QuitMenu1I2Text: dc.b "Quit",0
- QuitCommKey: dc.b "Q",0
-
- Menu2Name: dc.b "Edit",0
- AddMenu1I1Text: dc.b "Add",0
- AddCommKey: dc.b "A",0
- CutMenu1I1Text: dc.b "Cut",0
- CutCommKey: dc.b "X",0
- CopyMenu1I1Text: dc.b "Copy",0
- CopyCommKey: dc.b "C",0
- PasteMenu1I1Text: dc.b "Paste",0
- PasteCommKey: dc.b "V",0
- DeleteMenu1I1Text: dc.b "Delete",0
- DeleteCommKey: dc.b "D",0
- UndoMenu1I1Text: dc.b "Undo",0
- UndoCommKey: dc.b "U",0
-
- Menu3Name: dc.b "Edit all",0
- ClearMenu1I1Text: dc.b "Clear",0
- ClearCommKey: dc.b "K",0
- EraseMenu1I1Text: dc.b "Erase",0
- SClearCommKey: dc.b "E",0
-
- Menu4Name: dc.b "Move",0
- FirstMenu1I1Text: dc.b "First",0
- FirstCommKey: dc.b "F",0
- LastMenu1I1Text: dc.b "Last",0
- LastCommKey: dc.b ".",0
- NextMenu1I1Text: dc.b "Next",0
- NextCommKey: dc.b "N",0
- PrevMenu1I1Text: dc.b "Previous",0
- PrevCommKey: dc.b "P",0
-
- Menu5Name: dc.b "Mode",0
- Menu2I1Text: dc.b " "
- StuMenu1Text: dc.b "Student",0
- StudentCommKey: dc.b "1"
- Menu2I2Text: dc.b " "
- TeachMenu1Text: dc.b "Teacher",0
- TeacherCommKey: dc.b "2"
-
- Menu6Name: dc.b "Preferences",0
- PrefsM1Text: dc.b "Set prefs",0
- PrefsCommKey: dc.b "3"
- PrefsM2Text: dc.b "Load prefs",0
- PrefsCommKey2: dc.b "4"
- PrefsM3Text: dc.b "Save prefs",0
- PrefsCommKey3: dc.b "5"
- PrefsM4Text: dc.b "Get defaults",0
- PrefsCommKey4: dc.b "6"
- ds.w 0
-
- ;NewMenus
-
- MNMainMenu1: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu1Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNStartMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l StartMenu1I1Text ;gnm_Label
- dc.l StartCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNEnterNMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l ENameMenu1I1Text ;gnm_Label
- dc.l ENameCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNLoadMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l LoadMenu1I1Text ;gnm_Label
- dc.l 0 ;LoadCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNLoadQMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l LoadQMenu1I1Text ;gnm_Label
- dc.l LoadCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNLoadVMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l LoadVMenu1I1Text ;gnm_Label
- dc.l 0 ;LoadCommKey ;gnm_CommKey
- dc.w 0 ;NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveMenu1I1Text ;gnm_Label
- dc.l 0 ;SaveCommKey ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveQMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveQMenu1I1Text ;gnm_Label
- dc.l SaveCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveVMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveVMenu1I1Text ;gnm_Label
- dc.l 0 ;SaveCommKey ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveAsMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveAsMenu1I1Text ;gnm_Label
- dc.l 0 ;SaveAsCommKey ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveAsQMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveQMenu1I1Text ;gnm_Label
- dc.l SaveAsCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSaveAsVMenu1: dc.b NM_SUB ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l SaveVMenu1I1Text ;gnm_Label
- dc.l 0 ;SaveAsCommKey ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNHelpMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l HelpMenu1I1Text ;gnm_Label
- dc.l HelpCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNAboutMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l AboutMenu1I1Text ;gnm_Label
- dc.l AboutCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSepMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NM_BARLABEL ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNQuitMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l QuitMenu1I2Text ;gnm_Label
- dc.l QuitCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNMenu2: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu2Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w NM_MENUDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNAddMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l AddMenu1I1Text ;gnm_Label
- dc.l AddCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSepMenu2: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NM_BARLABEL ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNCutMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l CutMenu1I1Text ;gnm_Label
- dc.l CutCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNCopyMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l CopyMenu1I1Text ;gnm_Label
- dc.l CopyCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPasteMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PasteMenu1I1Text ;gnm_Label
- dc.l PasteCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSepMenu3: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NM_BARLABEL ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSClearMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l EraseMenu1I1Text ;gnm_Label
- dc.l SClearCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNDeleteMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l DeleteMenu1I1Text ;gnm_Label
- dc.l DeleteCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSepMenu4: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NM_BARLABEL ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNUndoMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l UndoMenu1I1Text ;gnm_Label
- dc.l UndoCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNMenu3: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu3Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w NM_MENUDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNClearMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l ClearMenu1I1Text ;gnm_Label
- dc.l ClearCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNMenu4: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu4Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w NM_MENUDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNFirstMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l FirstMenu1I1Text ;gnm_Label
- dc.l FirstCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNLastMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l LastMenu1I1Text ;gnm_Label
- dc.l LastCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPrevMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PrevMenu1I1Text ;gnm_Label
- dc.l PrevCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNNextMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NextMenu1I1Text ;gnm_Label
- dc.l NextCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNMenu5: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu5Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNStudentMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l StuMenu1Text ;gnm_Label
- dc.l StudentCommKey ;gnm_CommKey
- dc.w CHECKIT+CHECKED ;gnm_Flags
- dc.l ~1 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNTeacherMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l TeachMenu1Text ;gnm_Label
- dc.l TeacherCommKey ;gnm_CommKey
- dc.w CHECKIT ;gnm_Flags
- dc.l ~2 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNMenu6: dc.b NM_TITLE ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l Menu6Name ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPrefsMenu1: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PrefsM1Text ;gnm_Label
- dc.l PrefsCommKey ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPrefsMenu2: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PrefsM2Text ;gnm_Label
- dc.l PrefsCommKey2 ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPrefsMenu3: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PrefsM3Text ;gnm_Label
- dc.l PrefsCommKey3 ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNSepMenu5: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l NM_BARLABEL ;gnm_Label
- dc.l 0 ;gnm_CommKey
- dc.w 0 ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- MNPrefsMenu4: dc.b NM_ITEM ;gnm_Type
- dc.b 0 ;gnm_Pad
- dc.l PrefsM4Text ;gnm_Label
- dc.l PrefsCommKey4 ;gnm_CommKey
- dc.w NM_ITEMDISABLED ;gnm_Flags
- dc.l 0 ;gnm_MutualExclude
- dc.l 0 ;gnm_UserData
-
- dc.w 0 ;ITEM_END?
-
- ;Borders, Images etc...
-
- OneLineBox1 dc.w -1 ;Initial offsets from the origin
- dc.w -2 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 5 ;Line Count (XY)
- dc.l BorderXY1 ;XY's
- dc.l 0 ;Next Border
- BorderXY1 dc.w 0,0
- dc.w 639,0
- dc.w 639,11
- dc.w 0,11
- dc.w 0,0
-
- TwoLineBox1 dc.w 0 ;Initial offsets from the origin
- dc.w -2 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 5 ;Line Count (XY)
- dc.l BorderXY2 ;XY's
- dc.l 0 ;Next Border
- BorderXY2 dc.w 0,0
- dc.w 639,0
- dc.w 639,22
- dc.w 0,22
- dc.w 0,0
-
- ThreeLineBox1 dc.w 0 ;Initial offsets from the origin
- dc.w -2 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 5 ;Line Count (XY)
- dc.l BorderXY2.5 ;XY's
- dc.l 0 ;Next Border
- BorderXY2.5 dc.w 0,0
- dc.w 639,0
- dc.w 639,32
- dc.w 0,32
- dc.w 0,0
-
- NineLineBox1 dc.w 0 ;Initial offsets from the origin
- dc.w -2 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 5 ;Line Count (XY)
- dc.l BorderXY3 ;XY's
- dc.l 0 ;Next Border
- BorderXY3 dc.w 0,0
- dc.w 639,0
- dc.w 639,91
- dc.w 0,91
- dc.w 0,0
-
- MoveBorder1 dc.w 118 ;Initial offsets from the origin
- dc.w 0 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 2 ;Line Count (XY)
- dc.l BorderXY4 ;XY's
- dc.l MoveBorder2 ;Next Border
- BorderXY4 dc.w 0,0
- dc.w 0,27
-
- MoveBorder2 dc.w 229 ;Initial offsets from the origin
- dc.w 0 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 2 ;Line Count (XY)
- dc.l BorderXY4 ;XY's
- dc.l MoveBorder3 ;Next Border
-
- MoveBorder3 dc.w 290 ;Initial offsets from the origin
- dc.w 0 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 2 ;Line Count (XY)
- dc.l BorderXY4 ;XY's
- dc.l 0 ;Next Border
-
- MainMBorder1 dc.w 0 ;Initial offsets from the origin
- dc.w 0 ;LeftEdge and TopEdge
- dc.b 2,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 3 ;Line Count (XY)
- dc.l BorderXY7 ;XY's
- dc.l MainMBorder2 ;Next Border
- BorderXY7 dc.w 0,100
- dc.w 0,0
- dc.w 540,0
-
- MainMBorder2 dc.w 3 ;Initial offsets from the origin
- dc.w 2 ;LeftEdge and TopEdge
- dc.b 2,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 3 ;Line Count (XY)
- dc.l BorderXY8 ;XY's
- dc.l MainMBorder3 ;Next Border
- BorderXY8 dc.w 0,96
- dc.w 0,0
- dc.w 534,0
-
- MainMBorder3 dc.w 0 ;Initial offsets from the origin
- dc.w 0 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 3 ;Line Count (XY)
- dc.l BorderXY9 ;XY's
- dc.l MainMBorder4 ;Next Border
- BorderXY9 dc.w 540,1
- dc.w 540,100
- dc.w 0,100
-
- MainMBorder4 dc.w 3 ;Initial offsets from the origin
- dc.w 2 ;LeftEdge and TopEdge
- dc.b 1,2 ;Pens
- dc.b 1 ;Draw Mode
- dc.b 3 ;Line Count (XY)
- dc.l BorderXY10 ;XY's
- dc.l 0 ;Next Border
- BorderXY10 dc.w 534,1
- dc.w 534,96
- dc.w 0,96
-
- ;Texts, Part II
-
- AboutTxt1: dc.b 3,1 ;PENS
- dc.w 0 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l AboutText1 ;TEXT
- dc.l AboutTxt2 ;NEXTTEXT
-
- AboutTxt2: dc.b 3,2 ;PENS
- dc.w 4 ;MODE
- dc.w 10,20 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l AboutText2 ;TEXT
- dc.l AboutTxt3 ;NEXTTEXT
-
- AboutTxt3: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,30 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l AboutText3 ;TEXT
- dc.l AboutTxt4 ;NEXTTEXT
-
- AboutTxt4: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,50 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l AboutText4 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- DoItTxt1: dc.b 3,1 ;PENS
- dc.w 0 ;MODE
- dc.w 6,3 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l DoItText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- OKTxt: dc.b 3,1 ;PENS
- dc.w 0 ;MODE
- dc.w 6,3 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l OKText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- CancelTxt: dc.b 3,1 ;PENS
- dc.w 0 ;MODE
- dc.w 6,3 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- dc.l CancelText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- WrongTxt1: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l FWrongText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- NoMemTxt1: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l NoMemText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- NoQuesTxt1: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l NoQuesText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- FNSupportTxt1: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l FNSupportText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- FCorruptTxt1: dc.b 3,1 ;PENS
- dc.w 4 ;MODE
- dc.w 10,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l FCorruptText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- DesTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 1,0 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- DesTextAdd: dc.l 0 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- QueTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 1,0 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- QueTextAdd: dc.l 0 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- AnsTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 20,0 ;LEFT+TOPEDGE
- dc.l 0 ;FONT
- AnsTextAdd: dc.l 0 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- WrongTxt2: dc.b 3,2 ;PENS
- dc.w 4 ;MODE
- dc.w 17,2 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l WrongText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- RightTxt1: dc.b 3,2 ;PENS
- dc.w 4 ;MODE
- dc.w 12,2 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l RightText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- AnyKeyTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 12,2 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l AnyKeyText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- AgainTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 12,2 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l AgainText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- Num1Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num1Text1 ;TEXT
- dc.l Num2Txt1 ;NEXTTEXT
-
- Num2Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num2Text1 ;TEXT
- dc.l Num3Txt1 ;NEXTTEXT
-
- Num3Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,20 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num3Text1 ;TEXT
- dc.l Num4Txt1 ;NEXTTEXT
-
- Num4Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,30 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num4Text1 ;TEXT
- dc.l Num5Txt1 ;NEXTTEXT
-
- Num5Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,40 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num5Text1 ;TEXT
- dc.l Num6Txt1 ;NEXTTEXT
-
- Num6Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,50 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num6Text1 ;TEXT
- dc.l Num7Txt1 ;NEXTTEXT
-
- Num7Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,60 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num7Text1 ;TEXT
- dc.l Num8Txt1 ;NEXTTEXT
-
- Num8Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,70 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num8Text1 ;TEXT
- dc.l Num9Txt1 ;NEXTTEXT
-
- Num9Txt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 2,80 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l Num9Text1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MoveTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 83,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MoveText1 ;TEXT
- dc.l OneTxt1 ;NEXTTEXT
-
- OneTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 244,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l OneText1 ;TEXT
- dc.l AllTxt1 ;NEXTTEXT
-
- AllTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 341,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l AllText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- SelectTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l SelectText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- CaseTxt1: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w CheckLeft+4,CheckTop ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l CaseText1 ;TEXT
- dc.l OrderTxt1 ;NEXTTEXT
-
- OrderTxt1: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w CheckLeft+4,CheckTop+10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l OrderText1 ;TEXT
- dc.l PuncTxt1 ;NEXTTEXT
-
- PuncTxt1: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w CheckLeft+4,CheckTop+20 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l PuncText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- MenuMTxt1: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w TypeLeft,TimTop ;LEFT
- dc.l Topaz ;FONT
- dc.l MenuMText1 ;TEXT
- dc.l MenuMTxt2 ;NEXTTEXT
-
- MenuMTxt2: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w TypeLeft,TimTop+10 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l MenuMText2 ;TEXT
- dc.l FillInTxt1 ;NEXTTEXT
-
- FillInTxt1: dc.b 2,0 ;PENS
- dc.w 0 ;MODE
- dc.w TypeLeft,TimTop+20 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l FillInText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- FNameTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l FNameText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- TimerTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l TimerText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- TimerTxt2: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l TimerText2 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- TimeTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l TimeText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- QuestionsTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l QuestionsText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- QuestionTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l QuestionText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- ScoreTxt1: dc.b 1,2 ;PENS
- dc.w 4 ;MODE
- dc.w 0,0 ;LEFT+TOPEDGE
- dc.l Topaz ;FONT
- dc.l ScoreText1 ;TEXT
- dc.l 0 ;NEXTTEXT
-
- CaseText1: dc.b "Case",0
- OrderText1: dc.b "Order",0
- PuncText1: dc.b "Punctuation",0
-
- MenuMText1: dc.b "Menu mode - Only one correct answer",0
- MenuMText2: dc.b "Menu mode - Several correct answers",0
- FillInText1: dc.b "Fill in - Several correct answers",0
-
- FNameText1: dc.b "File name : ",0
-
- QuestionsText1: dc.b "Questions : "
- QuestionsText2: dc.b " 0 of " ;NumQ (DoNumQ)
- QuestionsText3: dc.b " 0",0 ;NumQ
-
- QuestionText1: dc.b "Question : "
- QuestionText2: dc.b " 0",0 ;QueCount
-
- TimerText1: dc.b "Timer : No",0
- TimerText2: dc.b "Timer : Yes",0
- TimeText1: dc.b "Time : "
- TimeText2: dc.b " 0",0
-
- ScoreText1: dc.b "Score : "
- ScoreText2: dc.b " 0",0
- fstrl: dc.b "%5.d",0
-
- NoMemText1: dc.b "Out of memory, can't load!",0
- NoQuesText1: dc.b "There aren't any questions",0
- FWrongText1: dc.b "Not a question-answer file!",0
- FNSupportText1: dc.b "File type not supported!",0
- FCorruptText1: dc.b "File is corrupt!",0
- DoItText1: dc.b "Are you sure?",0
-
- OKText1: dc.b "OK",0
- CancelText1: dc.b "CANCEL!",0
-
- WrongText1: dc.b "Wrong!",0
- RightText1: dc.b "Correct",0
- AnyKeyText1: dc.b "Press any key",0
- AgainText1: dc.b "Try again? (Y/N)",0
- TimeLimitText1: dc.b "Time limit!",0
-
- Num1Text1: dc.b "01",0
- Num2Text1: dc.b "02",0
- Num3Text1: dc.b "03",0
- Num4Text1: dc.b "04",0
- Num5Text1: dc.b "05",0
- Num6Text1: dc.b "06",0
- Num7Text1: dc.b "07",0
- Num8Text1: dc.b "08",0
- Num9Text1: dc.b "09",0
-
- MoveText1: dc.b "Move",0
- OneText1: dc.b "One",0
- AllText1: dc.b "All",0
-
- SelectText1: dc.b "Please select option:",0
-
- AboutText1: dc.b "Questions -The Amiga version-",0
- AboutText2: dc.b " v.0.99i by",0
- AboutText3: dc.b " Tomi Blinnikka",0
- AboutText4: dc.b " (C)opyright 1991",0
-
- dc.b "$VER: Questions 0.99i",0
-
- ds.w 0
-
- ;Gadget buffers
-
- MenuBarName: dc.b "Name: "
- NameGad1Buf: dcb.b NameLeng,0
-
- section Q,BSS
-
- DesStr1Buf: ds.b DLineLeng
- DesStr2Buf: ds.b DLineLeng
- DesStr3Buf: ds.b DLineLeng
- QueStr1Buf: ds.b LineLeng
- QueStr2Buf: ds.b LineLeng
- MulStr1Buf: ds.b LineLeng
- MulStr2Buf: ds.b LineLeng
- MulStr3Buf: ds.b LineLeng
- MulStr4Buf: ds.b LineLeng
- MulStr5Buf: ds.b LineLeng
- MulStr6Buf: ds.b LineLeng
- MulStr7Buf: ds.b LineLeng
- MulStr8Buf: ds.b LineLeng
- MulStr9Buf: ds.b LineLeng
- AStrGad1Buf: ds.b AnsLeng
-
- DesStr1CBuf: ds.b DLineLeng
- DesStr2CBuf: ds.b DLineLeng
- DesStr3CBuf: ds.b DLineLeng
- QueStr1CBuf: ds.b LineLeng
- QueStr2CBuf: ds.b LineLeng
- MulStr1CBuf: ds.b LineLeng
- MulStr2CBuf: ds.b LineLeng
- MulStr3CBuf: ds.b LineLeng
- MulStr4CBuf: ds.b LineLeng
- MulStr5CBuf: ds.b LineLeng
- MulStr6CBuf: ds.b LineLeng
- MulStr7CBuf: ds.b LineLeng
- MulStr8CBuf: ds.b LineLeng
- MulStr9CBuf: ds.b LineLeng
- AStrGad1CBuf: ds.b AnsLeng
-
- GadUnBuf: ds.b QueLeng
-
- SysPrefsBuf: ds.b 120
-
- ;List and node stuff for memory handling
-
- QAList: ds.l 1 ;MLH_HEAD (MinList type)
- ds.l 1 ;mlh_Tail
- ds.l 1 ;mlh_TailPred
-
- Section Q,DATA,CHIP
-
- ds.w 0
-
- ClockPointer1: dc.w $0000,$0000
- dc.w $0400,$07C0,$0000,$07C0,$0100,$0380,$0000,$07E0
- dc.w $07C0,$1FF8,$1FF0,$3FEC,$3FF8,$7FDE,$3FF8,$7FBE
- dc.w $7FFC,$FF7F,$7EFC,$FFFF,$7FFC,$FFFF,$3FF8,$7FFE
- dc.w $3FF8,$7FFE,$1FF0,$3FFC,$07C0,$1FF8,$0000,$07E0
- dc.w $0000,$0000
-
-
- STRUCTURE QA,MLN_SIZE
- APTR QA_Data
- LABEL QA_SIZE
-
- END
-
- ;GADGETDOWN+GADGETUP+
-
- ;turn on menu bar
-
- ; move.l Screen1,a0
- ; move.l #$01,d0
- ; lib Intuition,ShowTitle
-
-
- ;turn off menu bar
-
- ; move.l Screen1,a0
- ; move.l #$00,d0
- ; lib Intuition,ShowTitle
-
- move.l Screen1,a0 ;ERROR STUFF
- lib Intuition,DisplayBeep
-
- move.l #250,d1 ;ERROR STUFF
- lib Dos,Delay
-
-
- MainLoop: ;move.l #$00,d0
- move.l SigBit2,d0
- bset #SIGBREAKB_CTRL_C,d0
- lib Exec,Wait
- btst #SIGBREAKB_CTRL_C,d0 ;Quit from
- bne RemIHand ;CTRL-C
-
- ; Add stuff to be done here!
-
- jmp MainLoop
- DeActStrings: jsr RemStrings
-
- lea.l DesStrGad1,a1
- DeActStrings1: and.w #~SELECTED,gg_Flags(a1)
- move.l (a1),a1
- cmp.l #$00,a1
- bne DeActStrings1
-
- jsr AddStrings
- rts
-