Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIZ1_ScreenInit:
- ; resetear posición acá
- ; inicial: $0060 0060
- ; final: $0040 0110
- move.w #$0060,d0 ; initial cam's xpos
- move.w d0,CamXFG.w
- move.w d0,BoundLeft.w
- move.w d0,BoundRight.w
- move.w #$0060,d1 ; initial cam's ypos
- move.w d1,CamYFG.w
- move.w d1,BoundTop.w
- move.w d1,BoundBot.w
- move.b #120,ScreenEvent_Flag.w
- st.b Ctrl_1_locked.w
- move.b #-1,v_player+object_control.w
- moveq #0,d0
- lea Normal_palette_line_1.w,a1
- moveq #bytesToLcnt($20/4),d1
- - rept 4
- move.l d0,(a1)+
- endm
- dbf d1,-
- moveq #palid_Sonic,d0
- jsr PalLoad1
- move.l #+,LB_Draw.w
- move.w #$8004,vdp_control_port.l ; disable h-int
- + moveq #palid_UIZ1Water2,d0
- jsr LoadPalette3_Immediate.l
- jsr LoadLevelLoadBlock2.l
- jmp FGInit_Generic(pc)
- ; ---------------------------------------------------------------------------
- UIZ1_ScreenEvent:
- move.w #$8014,vdp_control_port.l ; enable h-int
- move.l #+,LB_Draw+8.w
- + pea Reset_TileOffsetPositionActual(pc)
- move.w #$0060,d1 ; initial cam's ypos
- move.w d1,CamYFG.w
- ; move.w d1,BoundTop.w
- move.w d1,BoundBot.w
- clr.w CamYdiff.w
- subq.b #1,ScreenEvent_Flag.w
- bne.w UIZ1_ScreenEvent_PMain
- move.l #+,LB_Draw+8.w
- move.b #173,ScreenEvent_Flag.w
- move.w #$0110,TargetBoundBot.w
- move.w #$0040,TargetBoundLeft.w
- + subq.b #1,ScreenEvent_Flag.w
- bne.w UIZ1_ScreenEvent_PMain
- move.l #+,LB_Draw+8.w
- move.b #100,ScreenEvent_Flag.w
- jsr SingleObjLoad.l
- bne.s +
- move.l #Obj_EscapingFlickies,(a1)
- + subq.b #1,ScreenEvent_Flag.w
- bne.w UIZ1_ScreenEvent_PMain
- move.l #+,LB_Draw+8.w
- move.b #30,ScreenEvent_Flag.w
- + subq.b #1,ScreenEvent_Flag.w
- bne.w UIZ1_ScreenEvent_PMain
- move.l #+,LB_Draw+8.w
- move.b #50,ScreenEvent_Flag.w
- move.w #$13,Screen_Shaking_Flag.w
- move.b #sfx_Destruct,d0
- jsr PlaySound_Special.l
- + subq.b #1,SCreenEvent_Flag.w
- bne.w UIZ1_ScreenEvent_PMain
- move.l #+,LB_Draw+8.w
- move.b #60,ScreenEvent_Flag.w
- clr.b v_player+object_control.w
- bclr #Status_Facing,v_player+obRender.w
- bclr #Status_Facing,v_player+obStatus.w
- moveq #0,d1
- move.w CamXFG.w,d0
- move.b v_player+x_radius.w,d1
- add.w d1,d0
- move.w d0,v_player+obX.w
- + move.w #$800,d0
- move.w d0,v_player+obInertia.w
- move.w d0,v_player+obVelX.w
- move.w CamXFG.w,d0
- add.w #320/2,d0
- cmp.w v_player+obX.w,d0
- bcc.s UIZ1_ScreenEvent_PMain
- move.l #++,LB_Draw+8.w
- clr.b ScreenEvent_Flag.w
- clr.w BoundTop.w
- clr.w BoundLeft.w
- clr.w TargetBoundLeft.w
- move.w #$7FFF,d0
- move.w d0,BoundRight.w
- move.w d0,TargetBoundRight.w
- clr.b Ctrl_1_locked.w
- pea +(pc)
- bra.s UIZ1_ScreenEvent_PMain
- + move.b #1,Last_star_post_hit.w
- jsr Save_Level_Data.l
- move.w v_player+obY.w,d0
- subi.w #$0060,d0
- move.w d0,(Saved_camera_Y_pos).w
- move.w d0,(Saved_camera_max_Y_pos).w
- move.w v_player+obX.w,(Saved_X_pos).w
- move.w v_player+obY.w,(Saved_Y_pos).w
- rts
- + move.w #$800,d0
- move.w d0,v_player+obInertia.w
- move.w d0,v_player+obVelX.w
- move.b #id_walk,v_player+obAnim.w
- lea UIZ1_ScreenEvent_Main.l,a0
- move.l a0,LB_Draw+8.w
- jmp (a0)
- UIZ1_ScreenEvent_PMain:
- move.w #$3F,(Palette_fade_info).w ; hack to fade pal line 1
- clr.l v_time.w ; clear timer (all frames)
- UIZ1_ScreenEvent_Main:
- move.w (Screen_Shaking_Flag+2).w,d0
- add.w d0,(Camera_Y_pos_copy).w
- jsr FGScroll_Generic(pc) ; update FG maps (generic)
- jmp (Do_ResizeEvents).l
- align $30 ; ass macro assembler patch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement