Advertisement
Guest User

Untitled

a guest
Jun 1st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UIZ1_ScreenInit:
  2.     ; resetear posición acá
  3.     ; inicial:  $0060 0060
  4.     ; final:    $0040 0110
  5.         move.w  #$0060,d0               ; initial cam's xpos
  6.         move.w  d0,CamXFG.w
  7.         move.w  d0,BoundLeft.w
  8.         move.w  d0,BoundRight.w
  9.         move.w  #$0060,d1               ; initial cam's ypos
  10.         move.w  d1,CamYFG.w
  11.         move.w  d1,BoundTop.w
  12.         move.w  d1,BoundBot.w
  13.         move.b  #120,ScreenEvent_Flag.w
  14.         st.b    Ctrl_1_locked.w
  15.         move.b  #-1,v_player+object_control.w
  16.  
  17.         moveq   #0,d0
  18.         lea Normal_palette_line_1.w,a1
  19.         moveq   #bytesToLcnt($20/4),d1
  20. -       rept    4
  21.         move.l  d0,(a1)+
  22.         endm
  23.         dbf d1,-
  24.         moveq   #palid_Sonic,d0
  25.         jsr PalLoad1
  26.  
  27.         move.l  #+,LB_Draw.w
  28.         move.w  #$8004,vdp_control_port.l       ; disable h-int
  29.  
  30. +       moveq   #palid_UIZ1Water2,d0
  31.         jsr LoadPalette3_Immediate.l
  32.         jsr LoadLevelLoadBlock2.l
  33.         jmp FGInit_Generic(pc)
  34. ; ---------------------------------------------------------------------------
  35.  
  36. UIZ1_ScreenEvent:
  37.         move.w  #$8014,vdp_control_port.l       ; enable h-int
  38.         move.l  #+,LB_Draw+8.w
  39.  
  40. +       pea Reset_TileOffsetPositionActual(pc)
  41.         move.w  #$0060,d1               ; initial cam's ypos
  42.         move.w  d1,CamYFG.w
  43. ;       move.w  d1,BoundTop.w
  44.         move.w  d1,BoundBot.w
  45.         clr.w   CamYdiff.w
  46.         subq.b  #1,ScreenEvent_Flag.w
  47.         bne.w   UIZ1_ScreenEvent_PMain
  48.         move.l  #+,LB_Draw+8.w
  49.         move.b  #173,ScreenEvent_Flag.w
  50.         move.w  #$0110,TargetBoundBot.w
  51.         move.w  #$0040,TargetBoundLeft.w
  52.  
  53. +       subq.b  #1,ScreenEvent_Flag.w
  54.         bne.w   UIZ1_ScreenEvent_PMain
  55.         move.l  #+,LB_Draw+8.w
  56.         move.b  #100,ScreenEvent_Flag.w
  57.         jsr SingleObjLoad.l
  58.         bne.s   +
  59.         move.l  #Obj_EscapingFlickies,(a1)
  60.  
  61. +       subq.b  #1,ScreenEvent_Flag.w
  62.         bne.w   UIZ1_ScreenEvent_PMain
  63.         move.l  #+,LB_Draw+8.w
  64.         move.b  #30,ScreenEvent_Flag.w
  65.  
  66. +       subq.b  #1,ScreenEvent_Flag.w
  67.         bne.w   UIZ1_ScreenEvent_PMain
  68.         move.l  #+,LB_Draw+8.w
  69.         move.b  #50,ScreenEvent_Flag.w
  70.         move.w  #$13,Screen_Shaking_Flag.w
  71.         move.b  #sfx_Destruct,d0
  72.         jsr PlaySound_Special.l
  73.  
  74. +       subq.b  #1,SCreenEvent_Flag.w
  75.         bne.w   UIZ1_ScreenEvent_PMain
  76.         move.l  #+,LB_Draw+8.w
  77.         move.b  #60,ScreenEvent_Flag.w
  78.         clr.b   v_player+object_control.w
  79.         bclr    #Status_Facing,v_player+obRender.w
  80.         bclr    #Status_Facing,v_player+obStatus.w
  81.         moveq   #0,d1
  82.         move.w  CamXFG.w,d0
  83.         move.b  v_player+x_radius.w,d1
  84.         add.w   d1,d0
  85.         move.w  d0,v_player+obX.w
  86.  
  87. +       move.w  #$800,d0
  88.         move.w  d0,v_player+obInertia.w
  89.         move.w  d0,v_player+obVelX.w
  90.         move.w  CamXFG.w,d0
  91.         add.w   #320/2,d0
  92.         cmp.w   v_player+obX.w,d0
  93.         bcc.s   UIZ1_ScreenEvent_PMain
  94.         move.l  #++,LB_Draw+8.w
  95.         clr.b   ScreenEvent_Flag.w
  96.         clr.w   BoundTop.w
  97.         clr.w   BoundLeft.w
  98.         clr.w   TargetBoundLeft.w
  99.         move.w  #$7FFF,d0
  100.         move.w  d0,BoundRight.w
  101.         move.w  d0,TargetBoundRight.w
  102.         clr.b   Ctrl_1_locked.w
  103.         pea +(pc)
  104.         bra.s   UIZ1_ScreenEvent_PMain
  105.  
  106. +       move.b  #1,Last_star_post_hit.w
  107.         jsr Save_Level_Data.l
  108.         move.w  v_player+obY.w,d0
  109.         subi.w  #$0060,d0
  110.         move.w  d0,(Saved_camera_Y_pos).w
  111.         move.w  d0,(Saved_camera_max_Y_pos).w
  112.         move.w  v_player+obX.w,(Saved_X_pos).w
  113.         move.w  v_player+obY.w,(Saved_Y_pos).w
  114.         rts
  115.  
  116. +       move.w  #$800,d0
  117.         move.w  d0,v_player+obInertia.w
  118.         move.w  d0,v_player+obVelX.w
  119.         move.b  #id_walk,v_player+obAnim.w
  120.         lea UIZ1_ScreenEvent_Main.l,a0
  121.         move.l  a0,LB_Draw+8.w
  122.         jmp (a0)
  123.  
  124. UIZ1_ScreenEvent_PMain:
  125.         move.w  #$3F,(Palette_fade_info).w      ; hack to fade pal line 1
  126.         clr.l   v_time.w                ; clear timer (all frames)
  127.  
  128. UIZ1_ScreenEvent_Main:
  129.         move.w  (Screen_Shaking_Flag+2).w,d0
  130.         add.w   d0,(Camera_Y_pos_copy).w
  131.         jsr FGScroll_Generic(pc)            ; update FG maps (generic)
  132.         jmp (Do_ResizeEvents).l
  133.         align   $30                 ; ass macro assembler patch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement