?login_element?

Subversion Repositories NedoOS

Rev

Rev 1113 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.         module MAIN_MENU
  2. init:
  3.        if EGA
  4.         call set6912
  5.        endif
  6.  
  7.         ld hl,#FFFF
  8.         ld (setFF2),hl
  9.         ld a,l
  10.         ld (setFF1),a
  11.  
  12.         call fadeOutFull
  13.         call clearScreen
  14.         call clearAttributesBlack
  15.         ld hl,0
  16.         call csBlink
  17.         ld hl,#4347
  18.         ld (textColor),hl
  19.         ld hl,title
  20.         ld de,#4007
  21.         call printText2x1
  22.  
  23.         ld hl,#0446
  24.         ld (textColor),hl
  25.         ld hl,startGameText
  26.         ld de,#480a
  27.         call printText2x1
  28.         ld hl,continueText
  29.         ld de,#484a
  30.         call printText2x1
  31. ;       ld hl,#0202
  32. ;       call showJoy
  33.         ld hl,#4203
  34.         ld (textColor),hl
  35.         ld hl,info
  36.         ld de,#50c6
  37.         call printText2x1
  38.         ld a,SYSTEM.MAIN_MENU_UPDATE
  39.         ret
  40. ;------------------------------------------------
  41. update:
  42.         call SOUND_PLAYER.play
  43.         ld hl,0
  44.         ld a,(delta)
  45.         inc a
  46.         ld (delta),a
  47.         and #3F
  48.         cp #20
  49.         jr c,.noBlink
  50.         ld hl,#0101
  51. .noBlink:
  52.         call csBlink
  53.         call CONTROL.digListener
  54.         ld hl,lastKeyPresed
  55.         ld a,(de)
  56.         cp (hl)
  57.         jr z,.endUpd
  58.         ld (hl),a
  59.         or a
  60.         jr z,.endUpd
  61.         cp '1'
  62.         jr nz,.continue
  63.         call SOUND_PLAYER.SET_SOUND.key
  64.         ld hl,1
  65.        ;inc hl
  66.         ld (lives),hl
  67.         dec l
  68.         ld (coins),hl
  69.         ; start level number
  70.         xor a
  71.         ;ld a,6;ld a,29
  72.         ld (currentLevel),a
  73.         ld a,SYSTEM.GAME_INIT
  74.         ret
  75. .continue:
  76.         cp '2'
  77.         jr nz,.kempston
  78.         call SOUND_PLAYER.SET_SOUND.key
  79.         ld a,SYSTEM.PASS_INIT
  80.         ret
  81. .kempston:
  82. ;       cp '3'
  83. ;       jr nz,.endUpd
  84. ;       ld hl,#4404
  85. ;       ld a,(kempstonState)
  86. ;       xor 1
  87. ;       ld (kempstonState),a
  88. ;       jr nz,.joyEnable
  89. ;       ld hl,#0202
  90. ; .joyEnable:
  91. ;       call showJoy
  92. ;       call SOUND_PLAYER.SET_SOUND.key
  93. .endUpd:
  94.         ld a,SYSTEM.MAIN_MENU_UPDATE
  95.         ret
  96. ;------------------------------------------------
  97. csBlink:
  98.         ld (textColor),hl
  99.         ld hl,capsSpace
  100.         ld de,#5045
  101.         jp printText2x1
  102. ; showJoy:
  103. ;       ld (textColor),hl
  104. ;       ld hl,joystick
  105. ;       ld de,#488a
  106. ;       jp printText2x1
  107. title:
  108.         db "A World of One-Way",TEXT_END
  109. startGameText:
  110.         db "1 - Start",TEXT_END
  111. continueText:
  112.         db "2 - Continue",TEXT_END
  113. info:
  114.         db "Serdjuk for ASM-2021",TEXT_END
  115. ; joystick:
  116. ;       db "3 - KEMPSTON",TEXT_END
  117. capsSpace:
  118. ;       db "CapsEnter to main menu",TEXT_END
  119.         db "CapsEnter restart/menu",TEXT_END
  120.         endmodule