home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / dev / asm / tbsource / simcc / final / simcheat14.s < prev    next >
Encoding:
Text File  |  1993-12-21  |  19.2 KB  |  966 lines

  1. ***********************************************
  2. *                                             *
  3. *              (C)opyright 1991               *
  4. *                                             *
  5. *             by  Tomi Blinnikka              *
  6. *                                             *
  7. *             SimCity 1.1  Cheat              *
  8. *                                             *
  9. * Version 0.00a - 0.99a  18/4/1991            *
  10. *                                             *
  11. * BUGS: Didn't work through DOS               *
  12. *                                             *
  13. * Version 1.00  19/4/1991                     *
  14. *                                             *
  15. * BUGS: No WB Stuff + some font stuff         *
  16. *                                             *
  17. * Version 1.01  26-27/4/1991                  *
  18. *                                             *
  19. * BUGS: No font stuff + WB Stuff didn't work  *
  20. *       from directories                      *
  21. *                                             *
  22. * Version 1.02  27-29/4/1991                  *
  23. *                                             *
  24. * BUGS: Doesn't work with CShell          *
  25. *                                             *
  26. * Version 1.03  30/4//1991              *
  27. *                                             *
  28. * BUGS: Still little problems with CShell     *
  29. *                                             *
  30. * Version 1.04  1/5//1991              *
  31. *                                             *
  32. * BUGS: Unknown, if any they were caused by   *
  33. *     optimization                  *
  34. *                                             *
  35. ***********************************************
  36.  
  37.     INCLUDE    "JMPLibs.i"
  38.     INCLUDE    "exec/types.i"
  39.     INCLUDE    "libraries/dos.i"
  40.     INCLUDE    "libraries/reqbase.i"
  41.     INCLUDE "workbench/startup.i"
  42.     INCLUDE    "intuition.i"
  43.  
  44.     INCLUDE    "dos.xref"
  45.     INCLUDE    "intuition.xref"
  46.     INCLUDE    "exec.xref"
  47.  
  48.     INCLUDE    "FH1:Language/WF/SimCC/SimCC2.0.i"
  49.  
  50.         section    SimCityCheat,CODE
  51.  
  52. Start:        move.l    a0,SCCAddress        ;Get SimCity filename
  53.         move.l    d0,SCCLength        ;Get length
  54.  
  55.         move.l    #0,a1
  56.         lib    Exec,FindTask
  57.         move.l    d0,SCCTask
  58.         move.l    d0,a4
  59.  
  60.         move.l    pr_CLI(a4),d0
  61.         bne    Start1
  62.         jsr    WBStart
  63.  
  64. Start1:        openlib    Dos,ShutDown
  65.  
  66.         lib    Dos,Output
  67.         move.l    d0,_stdout
  68.  
  69.         move.l    pr_CLI(a4),d0
  70.         beq    WBInput
  71.  
  72. ;CLI Inputs
  73.  
  74.         move.l    SCCAddress(pc),a0
  75.         move.l    SCCLength(pc),d0
  76.         clr.b    -1(a0,d0.l)        ;add null to end of filename
  77.  
  78.         cmp.b    #160,(a0)
  79.         beq    StartMain
  80.         cmp.b    #$0a,(a0)
  81.         beq    StartMain
  82.         cmp.b    #$0d,(a0)
  83.         beq    StartMain
  84.         tst.b    (a0)
  85.         bne    GotFileName
  86.         jmp    StartMain
  87.  
  88. WBStart:    lea.l    pr_MsgPort(a4),a0
  89.         lib    Exec,WaitPort
  90.         lea.l    pr_MsgPort(a4),a0
  91.         flib    Exec,GetMsg
  92.         move.l    d0,WBMsg
  93. WBStart1:    rts
  94.  
  95. ;a0 = SCCAddress
  96.  
  97. GotFileName:    move.w    #1,Mode
  98.         cmp.b    #"?",(a0)
  99.         beq    CommandLineHelp
  100.         lea.l    FRFile(pc),a1
  101.         cmp.b    #'"',(a0)
  102.         beq    Quotes
  103. CopyFName:    move.b    (a0)+,(a1)+
  104.         cmp.b    #'"',(a0)
  105.         beq    Quotes
  106.         cmp.b    #$20,(a0)
  107.         beq    CopyFName1
  108.         cmp.b    #160,(a0)
  109.         beq    CopyFName1
  110.         cmp.b    #$0a,(a0)
  111.         beq    CopyFName1
  112.         cmp.b    #$0d,(a0)
  113.         beq    CopyFName1
  114.         cmp.b    #$00,(a0)
  115.         bne    CopyFName
  116. CopyFName1:    clr.b    (a1)
  117.  
  118. GotFileName1:    lea.l    FRFile(pc),a0
  119.         move.l    a0,d1
  120.         move.l    #MODE_OLDFILE,d2
  121.         lib    Dos,Open
  122.         move.l    d0,SCCFile
  123.         bne    DOSCheat
  124.         jsr    SCCNotOpen
  125.         jmp    ShutDown
  126.  
  127. Quotes:        add.l    #1,a0
  128. Quotes1:    move.b    (a0)+,(a1)+
  129.         cmp.b    #$00,(a0)
  130.         beq    MismatchQuotes
  131.         cmp.b    #160,(a0)
  132.         beq    MismatchQuotes
  133.         cmp.b    #$0a,(a0)
  134.         beq    MismatchQuotes
  135.         cmp.b    #$0d,(a0)
  136.         beq    MismatchQuotes
  137.         cmp.b    #'"',(a0)
  138.         bne    Quotes1
  139. Quotes2:    clr.b    (a1)
  140.         jmp    GotFileName1
  141. MismatchQuotes:    print    <"**Break",13,10,"Mismatched quotes",13,10>
  142.         jmp    ShutDown
  143.  
  144. ;WB Inputs, start with opening NIL:
  145.  
  146. WBInput:    lea.l    NILName(pc),a0
  147.         move.l    a0,d1
  148.         move.l    #MODE_NEWFILE,d2
  149.         lib    Dos,Open
  150.         move.l    d0,NILFile
  151.         beq    ShutDown
  152.         move.l    NILFile(pc),_stdout
  153.     
  154.         move.l    #$00,d1
  155.         flib    Dos,CurrentDir
  156.         move.l    d0,OldLock
  157.         move.l    WBMsg(pc),a2
  158.         move.l    sm_NumArgs(a2),ArgsLeft
  159.         move.l    sm_ArgList(a2),ArgList
  160.  
  161. WBInputIn:    sub.l    #1,ArgsLeft
  162.         add.l    #8,ArgList
  163.         cmp.l    #$00,ArgsLeft
  164.         beq    WBInputOut
  165.  
  166. WBInput1:    move.l    ArgList(pc),a0
  167.         move.l    wa_Name(a0),d1
  168.         move.l    d1,a1
  169.         tst.b    (a1)
  170.         bne    WBInput2
  171. WBInput1.1:    move.l    ArgList(pc),a0
  172.         move.l    wa_Lock(a0),d1
  173.         beq    WBInputIn
  174.         lib    Dos,CurrentDir
  175.         move.l    #$00,FRDir
  176.         jmp    WBInputIn
  177.  
  178. WBInput2:    move.l    d1,a0
  179.         lea.l    FRFile(pc),a1
  180. WBInput2.1:    move.b    (a0)+,(a1)+
  181.         cmp.b    #$00,(a0)
  182.         bne    WBInput2.1
  183.         clr.b    (a1)
  184.         jmp    WBInput1.1
  185.  
  186. WBInputOut:    move.l    FRDir(pc),a0
  187.         lea.l    FRPathName(pc),a1
  188.         cmp.b    #$00,(a0)
  189.         beq    WBInputOut1.1
  190. WBInputOut1:    move.b    (a0)+,(a1)+
  191.         cmp.b    #$00,(a0)
  192.         bne    WBInputOut1
  193. WBInputOut1.1:    lea.l    FRFile(pc),a0
  194. WBInputOut2:    move.b    (a0)+,(a1)+
  195.         cmp.b    #$00,(a0)
  196.         bne    WBInputOut2
  197.         clr.b    (a1)
  198.  
  199. StartMain:    move.w    #0,Mode
  200.         moveq.l    #2,d0
  201.         openlib    Req,NoReq
  202.         openlib    Intuition,NoInt
  203.         openlib    Gfx,NoGfx
  204.  
  205. ;test for 2.0
  206.  
  207.         move.l    _IntuitionBase(pc),a6
  208.         move.w    $14(a6),d0
  209.         cmp.w    #36,d0
  210.         bcs    StartWin1
  211.  
  212. ;under 2.0
  213.         move.l    #$00,a0
  214.         flib    Intuition,LockPubScreen
  215.         move.l    d0,PubScreen
  216.         beq    NoPub
  217.  
  218. ;Get DragBar size
  219.  
  220.         move.w    #40,Win1YSize
  221.         move.l    d0,a0
  222.         move.b    $1e(a0),d0
  223.         move.w    #$00,Win1ZoomY
  224.         move.b    d0,Win1ZoomY+1
  225.         add.b    d0,Gad1YPos+1
  226.  
  227. ;use new OpenWindow (OpenWindowTagList)
  228.  
  229.         lea.l    NewWindow1(pc),a0
  230.         lea.l    Win1TagList(pc),a1
  231.         flib    Intuition,OpenWindowTagList
  232.         move.l    d0,Window1
  233.         beq    NoWin1
  234.         move.l    #$00,a0
  235.         move.l    PubScreen(pc),a1
  236.         flib    Intuition,UnlockPubScreen
  237.         move.l    #$00,PubScreen
  238.         jmp    AddMenu1
  239.  
  240. ;under 1.3
  241.  
  242. StartWin1:    add.w    #10,Gad1YPos
  243.         lea.l    NewWindow1(pc),a0
  244.         lib    Intuition,OpenWindow
  245.         move.l    d0,Window1
  246.         beq    NoWin1
  247.  
  248. ;Add Menus to Window1
  249.  
  250. AddMenu1:    move.l    Window1(pc),a0
  251.         lea.l    Menu1(pc),a1
  252.         flib    Intuition,SetMenuStrip
  253.  
  254. ;Add gadget
  255.  
  256.         lea.l    AmountGad1(pc),a1
  257.         move.l    Window1(pc),a0
  258.         move.l    #$00,d0
  259.         flib    Intuition,AddGadget
  260.  
  261. ;Refresh gad list
  262.  
  263.         lea.l    AmountGad1(pc),a0
  264.         move.l    Window1(pc),a1
  265.         move.l    #$00,a2
  266.         flib    Intuition,RefreshGadgets
  267.  
  268. ;Activate string gad
  269.  
  270.         lea.l    AmountGad1(pc),a0
  271.         move.l    Window1(pc),a1
  272.         move.l    #$00,a2
  273.         flib    Intuition,ActivateGadget
  274.  
  275. Window1IDCMP:    move.l    Window1(pc),a0
  276.         jsr    CheckIDCMP
  277.         cmp.l    #CLOSEWINDOW,d2
  278.         beq    ShutDown
  279.         cmp.l    #VANILLAKEY,d2
  280.         beq    VanillaKeys
  281.         cmp.l    #RAWKEY,d2
  282.         beq    RawKeys
  283.         cmp.l    #MENUPICK,d2
  284.         beq    Win1Menus
  285.         cmp.l    #MOUSEBUTTONS,d2
  286.         beq    ActivateGad1
  287.         jmp    Window1IDCMP
  288.  
  289. VanillaKeys:    cmp.w    #$1b,d3
  290.         beq    ShutDown
  291.         jmp    Window1IDCMP
  292. RawKeys:    cmp.w    #$5f,d3
  293.         beq    Help
  294.         jmp    Window1IDCMP
  295.  
  296. ActivateGad1:    cmp.l    #IECODE_LBUTTON,d3
  297.         bne    ActivateGadOut
  298.         lea.l    AmountGad1(pc),a0
  299.         move.l    Window1(pc),a1
  300.         move.l    #$00,a2
  301.         lib    Intuition,ActivateGadget
  302. ActivateGadOut:    jmp    Window1IDCMP
  303.  
  304. Win1Menus:    jsr    MenuNull
  305.         cmp.l    #$00,d5
  306.         beq    GetN
  307.         cmp.l    #$01,d5
  308.         beq    Help
  309.         cmp.l    #$02,d5
  310.         beq    About
  311.         cmp.l    #$03,d5
  312.         beq    ShutDown
  313.         jmp    Window1IDCMP
  314.  
  315. GetN:
  316.         cmp.l    #16777216,AmountInt
  317.         bcs    GetN0.1
  318.         move.l    Window1(pc),a0
  319.         move.l    $2e(a0),a0
  320.         lib    Intuition,DisplayBeep
  321.         move.l    Window1(pc),a0
  322.         lea.l    AmountGad1(pc),a1
  323.         flib    Intuition,RemoveGadget
  324.         move.l    #$31363737,AmountBuf
  325.         move.l    #$37323135,AmountBuf+4
  326.         move.l    #16777215,AmountInt
  327.         move.l    Window1(pc),a0
  328.         lea.l    AmountGad1(pc),a1
  329.         move.l    #$00,d0
  330.         flib    Intuition,AddGadget
  331.         lea.l    AmountGad1(pc),a0
  332.         move.l    Window1(pc),a1
  333.         move.l    #$00,a2
  334.         flib    Intuition,RefreshGadgets
  335. CheckAmountOut:    jmp    Window1IDCMP
  336.  
  337. GetN0.1:    jsr    MenusOff
  338.         lea.l    GetNName(pc),a5
  339.         move.l    #FRQABSOLUTEXYM+FRQLOADINGM,d5
  340.         jsr    FileRequester
  341.         tst.l    d0
  342.         beq    GetNOut
  343.  
  344.         lea.l    FRPathName(pc),a1
  345.         move.l    a1,d1
  346.         cmp.b    #$00,(a1)
  347.         beq    GetNOut
  348.         move.l    #MODE_OLDFILE,d2
  349.         lib    Dos,Open
  350.         move.l    d0,SCCFile
  351.         bne    GetN1
  352.         jsr    FileError
  353.         jmp    GetNOut
  354.  
  355. GetN1:        jsr    MenusOff
  356.         move.l    Window1(pc),a0
  357.         lea.l    Cheat?Txt(pc),a1
  358.         lea.l    OKTxt(pc),a2
  359.         lea.l    CancelTxt(pc),a3
  360.         move.l    #$00,d0
  361.         move.l    #$00,d1
  362.         move.l    #$100,d2
  363.         move.l    #$40,d3
  364.         lib    Intuition,AutoRequest
  365.         cmp.l    #00,d0
  366.         beq    GetN1.1
  367.         jsr    TestForCity
  368. GetN1.1:    jsr    MenusOn
  369.     
  370. GetN2:        move.l    SCCFile(pc),d1
  371.         lib    Dos,Close
  372.         move.l    #$00,SCCFile
  373.  
  374. GetNOut:    jsr    MenusOn
  375.         jmp    Window1IDCMP
  376.  
  377. FileRequester:    move.l    a5,FRTitle
  378.         move.l    d5,FRFlags
  379.         lea.l    FileRequest1(pc),a0
  380.         lib    Req,FileRequester
  381. FROut:        rts
  382.  
  383. About:        jsr    MenusOff
  384.         move.l    Window1(pc),a0
  385.         lea.l    AboutTxt1(pc),a1
  386.         move.l    #$00,a2        ;positive text
  387.         lea.l    OKTxt(pc),a3    ;a bit the wrong way around but...
  388.         move.l    #$00,d0
  389.         move.l    #$00,d1
  390.         move.l    #$134,d2
  391.         move.l    #$50,d3
  392.         lib    Intuition,AutoRequest
  393.         jsr    MenusOn
  394.         jmp    Window1IDCMP
  395.  
  396. Help:        jsr    MenusOff
  397.         move.l    Window1(pc),a0
  398.         lea.l    HelpTxt1(pc),a1
  399.         move.l    #$00,a2        ;positive text
  400.         lea.l    OKTxt(pc),a3    ;a bit the wrong way around but...
  401.         move.l    #$00,d0
  402.         move.l    #$00,d1
  403.         move.l    #$190,d2
  404.         move.l    #$40,d3
  405.         lib    Intuition,AutoRequest
  406.         jsr    MenusOn
  407.         jmp    Window1IDCMP
  408.  
  409. Finished:    move.l    Window1(pc),a0
  410.         lea.l    FinitoTxt1(pc),a1
  411.         move.l    #$00,a2        ;positive text
  412.         lea.l    OKTxt(pc),a3    ;a bit the wrong way around but...
  413.         move.l    #$00,d0
  414.         move.l    #$00,d1
  415.         move.l    #$190,d2
  416.         move.l    #$40,d3
  417.         lib    Intuition,AutoRequest
  418.         rts
  419.  
  420. TestForCity:    move.l    SCCFile(pc),d1
  421.         move.l    #65,d2
  422.         move.l    #-1,d3
  423.         lib    Dos,Seek
  424.         move.l    SCCFile(pc),d1
  425.         lea.l    FileBuf(pc),a0
  426.         move.l    a0,d2
  427.         move.l    #$04,d3
  428.         flib    Dos,Read
  429.         tst.l    d0
  430.         bne    TestForCity1    
  431.         jsr    FileError
  432.         jmp    Seek_Out
  433. TestForCity1:    move.l    FileBuf(pc),d0
  434.         cmp.l    #$43495459,d0
  435.         bne    TestForCity2
  436.         jsr    CheatCity
  437.         jmp    Seek_Out
  438. TestForCity2:    cmp.w    #1,Mode
  439.         beq    TestForCity3
  440.         move.l    Window1(pc),a0
  441.         lea.l    WrongTxt1(pc),a1
  442.         lea.l    OKTxt(pc),a2
  443.         lea.l    CancelTxt(pc),a3
  444.         move.l    #$00,d0
  445.         move.l    #$00,d1
  446.         move.l    #$100,d2
  447.         move.l    #$40,d3
  448.         lib    Intuition,AutoRequest
  449.         cmp.l    #00,d0
  450.         beq    Seek_Out
  451.         jsr    CheatCity
  452.         jmp    Seek_Out
  453. TestForCity3:    print    <"***Break",13,10,"This is not a SimCity city-file, exiting!",13,10>,_stdout
  454. Seek_Out:    rts    
  455.  
  456. CheatCity:    move.l    SCCFile(pc),d1
  457.         move.l    #3108,d2
  458.         move.l    #-1,d3
  459.         lib    Dos,Seek
  460.         move.l    SCCFile(pc),d1
  461.         lea.l    AmountInt(pc),a0
  462.         move.l    a0,d2
  463.         move.l    #$04,d3
  464.         flib    Dos,Write
  465.         cmp.w    #1,Mode
  466.         bne    CheatCity1
  467.         print    <"Your city now has $16, 777 215.",13,10>,_stdout
  468.         rts
  469. CheatCity1:    jsr    Finished
  470.         rts
  471.  
  472. DOSCheat:    jsr    TestForCity
  473.         jmp    ShutDown
  474.  
  475. NoReq:        print    <"You need req.library ver.2.5 or higher!",13,10>,_stdout
  476.         jmp    ShutDown
  477. NoInt:        print    <"Can't open intuition.library!",13,10>,_stdout
  478.         jmp    ShutDown
  479. NoGfx:        print    <"Can't open graphics.library!",13,10>,_stdout
  480.         jmp    ShutDown
  481. NoWin1:        print    <"Can't open Window!",13,10>,_stdout
  482.         jmp    ShutDown
  483. NoPub:        print    <"Can't lock PubScreen!",13,10>,_stdout
  484.         jmp    ShutDown
  485.  
  486. ShutDown:    tst.l    PubScreen
  487.         beq    ShutDown9000
  488.         move.l    #$00,a0
  489.         move.l    PubScreen(pc),a1
  490.         lib    Intuition,UnlockPubScreen
  491.         move.l    #$00,PubScreen
  492.  
  493. ShutDown9000:    tst.l    SCCFile
  494.         beq    ShutDown8000
  495.         move.l    SCCFile(pc),d1
  496.         lib    Dos,Close
  497.         move.l    #$00,SCCFile
  498. ShutDown8000:    tst.l    NILFile
  499.         beq    ShutDown5000
  500.         move.l    NILFile(pc),d1
  501.         lib    Dos,Close
  502.         move.l    #$00,NILFile
  503.  
  504. ShutDown5000:    tst.l    Window1
  505.         beq    ShutDown4000
  506.         move.l    Window1(pc),a0
  507.         lib    Intuition,ClearMenuStrip
  508.         move.l    Window1(pc),a0
  509.         jsr    ClearMSGs
  510.         move.l    #$00,Window1
  511.         
  512. ShutDown4000:
  513. ShutDown3000:    tst.l    _ReqBase
  514.         beq    ShutDown2000
  515.         lea.l    FileRequest1(pc),a0
  516.         lib    Req,PurgeFiles
  517.  
  518. ;Check if launched from WB
  519.  
  520. ShutDown1999:    move.l    SCCTask,a4
  521.         move.l    pr_CLI(a4),d0
  522.         beq    ShutDownWB
  523.  
  524. ShutDown2000:    closlib    Dos
  525.         closlib    Req
  526.         closlib    Intuition
  527.         closlib    Gfx
  528.  
  529. ShutDownOut:    move.l    #RETURN_OK,d0
  530.         rts
  531.  
  532. ShutDownWB:    move.l    SCCTask(pc),a4
  533.         lib    Exec,Forbid
  534.         move.l    WBMsg(pc),a1
  535.         flib    Exec,ReplyMsg
  536.         move.l    OldLock(pc),d1
  537.         lib    Dos,CurrentDir
  538.         jmp    ShutDown2000
  539.  
  540.         INCLUDE    "FH1:Language/WF/SimCC/DosError.i"
  541.         INCLUDE    "FH1:Language/WF/SimCC/SCCCommandLineHelp.i"
  542.     
  543. MenusOn:    lea.l    Menu1(pc),a1
  544.         move.l    Window1(pc),a0
  545.         lib    Intuition,SetMenuStrip
  546.         rts
  547.  
  548. MenusOff:    move.l    Window1(pc),a0
  549.         lib    Intuition,ClearMenuStrip
  550.         rts
  551.  
  552. MenuNull:    move.l    d3,d6    
  553.                 
  554.         ror.l    #5,d6    
  555.         lsr.l    #8,d6    
  556.         lsr.l    #8,d6
  557.         lsr.l    #8,d6
  558.         lsr.l    #3,d6
  559.  
  560.         move.l    d3,d5
  561.  
  562.         ror.l    #5,d5    
  563.         ror.l    #6,d5    
  564.         lsr.l    #8,d5
  565.         lsr.l    #8,d5
  566.         lsr.l    #8,d5
  567.         lsr.l    #2,d5
  568.                 
  569.         move.l    #$00,d4
  570.         move.w    d3,d4
  571.         lsr.l    #5,d4
  572.         lsr.l    #6,d4
  573.         rts
  574.  
  575. CheckIDCMP:    move.l    $4,a6            ;made this a SubRoutine...
  576.         move.l    $56(a0),a2        ;Give it the window structure in a0
  577.         move.l    #0,d1
  578.         move.b    $0f(a2),d1
  579.         move.l    #0,d0
  580.         bset.l    d1,d0
  581.         jsr    _LVOWait(a6)    
  582.     
  583. GetMsg1:    move.l    a2,a0    
  584.         jsr    _LVOGetMsg(a6)
  585.         tst.l    d0
  586.         beq    GetMsg2
  587.     
  588.         move.l    d0,a1 
  589.         move.l    $14(a1),d2        ;answers with Class in d2,
  590.         move.w    $18(a1),d3        ;Code in d3 and
  591.         move.w    $1a(a1),a4        ;Qualifier in a4
  592.         move.l    $1c(a1),a5        ;IAddress in a5
  593.         jsr    _LVOReplyMsg(a6)
  594.         jmp    GetMsg1
  595. GetMsg2:    move.l    #-1,d0
  596.         rts
  597.  
  598. ClearMSGs:    move.l    a0,d0
  599.         tst.l    d0
  600.         beq    ClearMsg3
  601.         move.l    a0,a3
  602.         lib    Exec,Forbid
  603.         move.l    $56(a3),a2        ;Give it the window structure in a0
  604. ClearMsg1:    move.l    a2,a0    
  605.         lib    Exec,GetMsg
  606.         tst.l    d0
  607.         beq    ClearMsg2
  608.         move.l    d0,a1 
  609.         flib    Exec,ReplyMsg
  610.         jmp    ClearMsg1
  611. ClearMsg2:    move.l    a3,a0
  612.         lib    Intuition,CloseWindow
  613.         lib    Exec,Permit
  614. ClearMsg3:    rts
  615.  
  616.         ds.l    0
  617.  
  618. ;--------------------Structures------------------
  619.  
  620. ;Display stuff
  621.  
  622. Window1        dc.l    0
  623. PubScreen    dc.l    0
  624.  
  625. ;Library stuff (well what's needed anymore)
  626.  
  627.         libnames
  628.  
  629. ;Task stuff
  630.  
  631. SCCTask        dc.l    0
  632.  
  633. ;WB Stuff
  634.  
  635. WBMsg        dc.l    0
  636. ArgList        dc.l    0
  637. ArgsLeft    dc.l    0
  638. OldLock        dc.l    0
  639.  
  640. ;File stuff
  641.  
  642. _stdout        dc.l    0
  643. SCCAddress    dc.l    0
  644. SCCLength    dc.l    0
  645. SCCFile        dc.l    0
  646. FileBuf        dc.l    $ffffffff
  647. NILName:    dc.b    "NIL:",0
  648.         ds.l    0
  649. NILFile:    dc.l    0
  650.  
  651. ;req.lib stuff/requester stuff
  652.  
  653.         INCLUDE    "FH1:Language/WF/SimCC/SCCFileRequester.i"
  654.  
  655. ;Other stuff XIV
  656.  
  657. Mode        dc.w    0        ;0=Intuition, 1=dos
  658.  
  659. ;Texts, Part I
  660.  
  661. SCCName        dc.b    "SimCity 1.1 cheat by Tomi Blinnikka",0
  662.         ds.l    0
  663. GetNName    dc.b    "Get city file name...",0
  664.         ds.l    0
  665. PositiveText1    dc.b    "Yes",0
  666.         ds.l    0
  667. NegativeText1    dc.b    "No",0
  668.         ds.l    0
  669.  
  670. ;Font thing
  671.  
  672. Topaz        dc.l    FontName
  673.         dc.w    8
  674.         dc.b    0
  675.         dc.b    0
  676. FontName    dc.b    "topaz.font",0
  677.         ds.l    0
  678.  
  679. ;New screen & new window structures
  680.  
  681. NewWindow1
  682.         dc.w    200,31            ;X,Y POS
  683.         dc.w    300            ;WIDTH
  684. Win1YSize    dc.w    43            ;HEIGHT
  685.         dc.b    0,1            ;PENS
  686.         dc.l    MOUSEBUTTONS+CLOSEWINDOW+VANILLAKEY+RAWKEY+MENUPICK    ;IDCMP FLAGS
  687.         dc.l    WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE    ;FLAGS
  688.         dc.l    0,0            ;GADGETS, CHECKMARK
  689.         dc.l    WindowTitle1        ;TITLE
  690.         dc.l    0            ;SCREEN ADDRESS
  691.         dc.l    0            ;BITMAP            
  692. Win1MinX    dc.w    192
  693. Win1MinY    dc.w    11,300,43        ;MINIMUM SIZE
  694.         dc.w    WBENCHSCREEN        ;TYPE
  695.         dc.l    Win1TagList
  696.  
  697. Win1TagList    dc.l    WA_AutoAdjust,0
  698.         dc.l    WA_InnerWidth,300
  699.         dc.l    WA_InnerHeight,30
  700.         dc.l    WA_Zoom,Win1ZoomXY
  701.         dc.l    TAG_DONE,0
  702.  
  703. Win1ZoomXY    dc.w    0,20,192
  704. Win1ZoomY    dc.w    11
  705.  
  706. WindowTitle1    dc.b    "SimCity cheat program",0
  707.         ds.l    0
  708.  
  709. ;Gadget structures
  710.  
  711.         INCLUDE "FH1:Language/WF/SimCC/SCCGads.i"
  712.         
  713. ;Now for all the imagery and borders etc.
  714.  
  715. GadgetBorder1    dc.w    -1        ;Initial offsets from the origin
  716.         dc.w    -2        ;LeftEdge and TopEdge
  717.         dc.b    1,2        ;Pens
  718.         dc.b    1        ;Draw Mode
  719.         dc.b    5        ;Line Count (XY)
  720.         dc.l    BorderXY1    ;XY's
  721.         dc.l    0        ;Next Border
  722.         dc.b    0
  723.         ds.l    0
  724. BorderXY1    dc.w    0,0
  725.         dc.w    90,0        
  726.         dc.w    90,11
  727.         dc.w    0,11
  728.         dc.w    0,0
  729.         dc.b    0
  730.         ds.l    0
  731.  
  732. ;Menus
  733.  
  734. Menu1:        dc.l    0            ;NEXT MENU
  735.         dc.w    0,1            ;LEFT+TOP EDGE
  736.         dc.w    110,8            ;WIDTH+HEIGHT
  737.         dc.w    $0001            ;FLAGS
  738.         dc.l    Menu1Name        ;NAME
  739.         dc.l    Menu1Item2        ;ITEMS
  740.         dc.w    0,0            ;Some Jazz-music here...        
  741.         dc.w    0,0,0            ;(with a good beat)
  742.  
  743. Menu1Name:    dc.b    "Project",0
  744.         ds.l    0
  745.  
  746. Menu1Item2:    dc.l    Menu1Item3        ;NEXT ITEM
  747.         dc.w    1,0            ;LEFT+TOP EDGE
  748.         dc.w    110,9            ;WIDTH+HEIGHT
  749.         dc.w    $0056            ;FLAGS
  750.         dc.l    0            ;MUTUAL EXCLUDE
  751.         dc.l    Menu1I2            ;ITEMFILL (IMAGE,ITEXT,GFX)
  752.         dc.l    0            ;SELECTFILL
  753.         dc.b    "C",0            ;COMMAND
  754.         dc.l    0            ;SubItem
  755.         dc.w    $ffff            ;NextSelect
  756.         
  757. Menu1I2:    dc.b    0,1            ;PENS
  758.         dc.w    0            ;MODE
  759.         dc.w    1,1            ;LEFT+TOPEDGE
  760.         dc.l    Topaz            ;FONT
  761.         dc.l    Menu1I2Text        ;TEXT
  762.         dc.l    0            ;NEXTTEXT
  763.  
  764. Menu1I2Text:    dc.b    "CHEAT!...",0
  765.         ds.l    0
  766.  
  767. Menu1Item3:    dc.l    Menu1Item4        ;NEXT ITEM
  768.         dc.w    1,11            ;LEFT+TOP EDGE
  769.         dc.w    110,8            ;WIDTH+HEIGHT
  770.         dc.w    $0056            ;FLAGS
  771.         dc.l    0            ;MUTUAL EXCLUDE
  772.         dc.l    Menu1I3            ;ITEMFILL (IMAGE,ITEXT,GFX)
  773.         dc.l    0            ;SELECTFILL
  774.         dc.b    "H",0            ;COMMAND
  775.         dc.l    0            ;SubItem
  776.         dc.w    $ffff            ;NextSelect
  777.         
  778. Menu1I3:    dc.b    0,1            ;PENS
  779.         dc.w    0            ;MODE
  780.         dc.w    1,0            ;LEFT+TOPEDGE
  781.         dc.l    Topaz            ;FONT
  782.         dc.l    Menu1I3Text        ;TEXT
  783.         dc.l    0            ;NEXTTEXT
  784.  
  785. Menu1I3Text:    dc.b    "Help...",0
  786.         ds.l    0
  787.  
  788. Menu1Item4:    dc.l    Menu1Item5        ;NEXT ITEM
  789.         dc.w    1,21            ;LEFT+TOP EDGE
  790.         dc.w    110,8            ;WIDTH+HEIGHT
  791.         dc.w    $0056            ;FLAGS
  792.         dc.l    0            ;MUTUAL EXCLUDE
  793.         dc.l    Menu1I4            ;ITEMFILL (IMAGE,ITEXT,GFX)
  794.         dc.l    0            ;SELECTFILL
  795.         dc.b    "A",0            ;COMMAND
  796.         dc.l    0            ;SubItem
  797.         dc.w    $ffff            ;NextSelect
  798.         
  799. Menu1I4:    dc.b    0,1            ;PENS
  800.         dc.w    0            ;MODE
  801.         dc.w    1,0            ;LEFT+TOPEDGE
  802.         dc.l    Topaz            ;FONT
  803.         dc.l    Menu1I4Text        ;TEXT
  804.         dc.l    0            ;NEXTTEXT
  805.  
  806. Menu1I4Text:    dc.b    "About...",0
  807.         ds.l    0
  808.  
  809. Menu1Item5:    dc.l    0            ;NEXT ITEM
  810.         dc.w    1,31            ;LEFT+TOP EDGE
  811.         dc.w    110,9            ;WIDTH+HEIGHT
  812.         dc.w    $0056            ;FLAGS
  813.         dc.l    0            ;MUTUAL EXCLUDE
  814.         dc.l    Menu1I5            ;ITEMFILL (IMAGE, ITEXT,GFX)
  815.         dc.l    0            ;SELECTFILL
  816.         dc.b     "Q",0            ;COMMAND
  817.         dc.l    0            ;IF<>0SubItem Shows ->
  818.         dc.w    $ffff            ;NextSelect
  819.  
  820. Menu1I5:    dc.b    0,1            ;PENS
  821.         dc.w    0            ;MODE
  822.         dc.w    1,0            ;LEFT+TOPEDGE
  823.         dc.l    Topaz            ;FONT
  824.         dc.l    Menu1I5Text        ;TEXT
  825.         dc.l    0            ;NEXTTEXT
  826.     
  827. Menu1I5Text:    dc.b    "Quit",0
  828.         ds.l    0
  829.  
  830. ;Texts, Part II
  831.  
  832. AboutTxt1:    dc.b    3,1            ;PENS
  833.         dc.w    0            ;MODE
  834.         dc.w    10,10            ;LEFT+TOPEDGE
  835.         dc.l    Topaz            ;FONT
  836.         dc.l    AboutText1        ;TEXT
  837.         dc.l    AboutTxt2        ;NEXTTEXT
  838.         ds.l    0
  839.         
  840. AboutTxt2:    dc.b    3,1            ;PENS
  841.         dc.w    4            ;MODE
  842.         dc.w    10,20            ;LEFT+TOPEDGE
  843.         dc.l    Topaz            ;FONT
  844.         dc.l    AboutText2        ;TEXT
  845.         dc.l    AboutTxt3        ;NEXTTEXT
  846.         ds.l    0
  847.  
  848. AboutTxt3:    dc.b    3,1            ;PENS
  849.         dc.w    4            ;MODE
  850.         dc.w    10,30            ;LEFT+TOPEDGE
  851.         dc.l    Topaz            ;FONT
  852.         dc.l    AboutText3        ;TEXT
  853.         dc.l    AboutTxt4        ;NEXTTEXT
  854.         ds.l    0
  855.  
  856. AboutTxt4:    dc.b    3,1            ;PENS
  857.         dc.w    4            ;MODE
  858.         dc.w    10,50            ;LEFT+TOPEDGE
  859.         dc.l    Topaz            ;FONT
  860.         dc.l    AboutText4        ;TEXT
  861.         dc.l    0            ;NEXTTEXT
  862.         ds.l    0
  863.  
  864. AboutText1:    dc.b    "SimCity 1.1 cheat program v.1.04",0
  865.         ds.l    0                          
  866. AboutText2:    dc.b    "               by",0
  867.         ds.l    0
  868. AboutText3:    dc.b    "         Tomi Blinnikka",0
  869.         ds.l    0
  870. AboutText4:    dc.b    "        (C)opyright 1991",0
  871.         ds.l    0
  872.  
  873. HelpTxt1:    dc.b    3,1            ;PENS
  874.         dc.w    4            ;MODE
  875.         dc.w    10,10            ;LEFT+TOPEDGE
  876.         dc.l    Topaz            ;FONT
  877.         dc.l    HelpText1        ;TEXT
  878.         dc.l    HelpTxt2        ;NEXTTEXT
  879.         ds.l    0
  880.  
  881. HelpTxt2:    dc.b    3,1            ;PENS
  882.         dc.w    4            ;MODE
  883.         dc.w    10,19            ;LEFT+TOPEDGE
  884.         dc.l    Topaz            ;FONT
  885.         dc.l    HelpText2        ;TEXT
  886.         dc.l    HelpTxt3        ;NEXTTEXT
  887.         ds.l    0
  888.  
  889. HelpTxt3:    dc.b    3,1            ;PENS
  890.         dc.w    4            ;MODE
  891.         dc.w    10,28            ;LEFT+TOPEDGE
  892.         dc.l    Topaz            ;FONT
  893.         dc.l    HelpText3        ;TEXT
  894.         dc.l    0            ;NEXTTEXT
  895.         ds.l    0
  896.  
  897. HelpText1:    dc.b    "1. Select amount of money ($0 - $16,777 215).",0
  898.         ds.l    0
  899. HelpText2:    dc.b    "2. Choose CHEAT!.",0
  900.         ds.l    0
  901. HelpText3:    dc.b    "3. Give SimCity CITY-file's filename.",0
  902.         ds.l    0
  903.  
  904. FinitoTxt1:    dc.b    3,1            ;PENS
  905.         dc.w    4            ;MODE
  906.         dc.w    10,20            ;LEFT+TOPEDGE
  907.         dc.l    Topaz            ;FONT
  908.         dc.l    FinitoText1        ;TEXT
  909.         dc.l    0            ;NEXTTEXT
  910.         ds.l    0
  911. FinitoText1:    dc.b    "Wow! I just donated your city a lot of money!",0
  912.         ds.l    0
  913.  
  914. OKTxt:        dc.b    3,1            ;PENS
  915.         dc.w    0            ;MODE
  916.         dc.w    6,3            ;LEFT+TOPEDGE
  917.         dc.l    Topaz            ;FONT
  918.         dc.l    OKText1            ;TEXT
  919.         dc.l    0            ;NEXTTEXT
  920.         ds.l    0
  921. OKText1:    dc.b    "OK",0
  922.         ds.l    0
  923. CancelTxt:    dc.b    3,1            ;PENS
  924.         dc.w    0            ;MODE
  925.         dc.w    6,3            ;LEFT+TOPEDGE
  926.         dc.l    Topaz            ;FONT
  927.         dc.l    CancelText1        ;TEXT
  928.         dc.l    0            ;NEXTTEXT
  929.         ds.l    0
  930. CancelText1:    dc.b    "CANCEL!",0
  931.         ds.l    0
  932.  
  933. Cheat?Txt:    dc.b    3,1            ;PENS
  934.         dc.w    4            ;MODE
  935.         dc.w    10,10            ;LEFT+TOPEDGE
  936.         dc.l    Topaz            ;FONT
  937.         dc.l    CheatText1        ;TEXT
  938.         dc.l    0            ;NEXTTEXT
  939.         ds.l    0
  940.  
  941. CheatText1:    dc.b    "Cheat on this city?",0
  942.         ds.l    0                          
  943.  
  944. WrongTxt1:    dc.b    3,1            ;PENS
  945.         dc.w    4            ;MODE
  946.         dc.w    10,10            ;LEFT+TOPEDGE
  947.         dc.l    Topaz            ;FONT
  948.         dc.l    FWrongText1        ;TEXT
  949.         dc.l    0            ;NEXTTEXT
  950.         ds.l    0
  951.  
  952. FWrongText1:    dc.b    "Incorrect file! Try anyway?",0
  953.         ds.l    0
  954.  
  955. Win1Txt1:    dc.b    1,2            ;PENS
  956.         dc.w    0            ;MODE
  957.         dc.w    -103,-18        ;LEFT+TOPEDGE
  958.         dc.l    Topaz            ;FONT
  959.         dc.l    Win1Text1        ;TEXT
  960.         dc.l    0            ;NEXTTEXT
  961.         ds.l    0
  962. Win1Text1:    dc.b    "Amount of money? ($0 - $16, 777 215)",0
  963.         ds.l    0
  964.  
  965.         END
  966.