0 Members and 1 Guest are viewing this topic.
So I was working on flag implementations (both permanent and temporary) and setting up what is needed to run cutscene scripts.Also, Urist McTesty drank far too many 5 Hour Energy drinks...Geekboy suggested I shared this. It's his fault McTesty achieved Warp 10.
script_start() res show_player_sprite,(iy+baseflags) ld hl,xy(33,3) ld (camera_pos),hl ld a,%00000001 ld (camera_subxy),a res camera_follows_player,(iy+baseflags) ld a,ragnoth_mapid rcall(LoadNewMapInA) push_sstate() ld a,:Maya_intro ld de,Maya_intro rcall(AddSpriteEntry) find_sprite(Maya_intro_NPC) script_delay(30) sp_move_sprite(dsk_up) script_delay(30) sp_move_sprite(dsk_up) script_delay(30) sp_change_facing(sp_down) script_delay(30) sp_change_facing(sp_up) script_delay(30) sp_move_sprite(dsk_up) script_delay(30) sp_move_sprite(dsk_up) script_delay(100) sp_change_facing(sp_down) script_delay(100) sp_change_facing(sp_up) script_delay(125) ld hl,xy(9,6) ld (camera_pos),hl SET_FLAG(RAGNOTH_ON_FIRE) ; Needs to be before map load ld a,ragnoth_mapid rcall(LoadNewMapInA) ld a,:Guard_1_dat ld de,Guard_1_dat rcall(AddSpriteEntry) pop_sstate() script_suspend(86) push_sstate() ld a,:Guard_Fire_1 ld de,Guard_Fire_1 rcall(AddSpriteEntry) pop_sstate() script_suspend(50) push_sstate() ld hl,xy(26,14) ld (camera_pos),hl ld a,%00000010 ld (camera_subxy),a script_delay(1) ld a,:Guard_2_dat ld de,Guard_2_dat rcall(AddSpriteEntry) pop_sstate() script_suspend(86) push_sstate() ld a,:Guard_Fire_2 ld de,Guard_Fire_2 rcall(AddSpriteEntry) pop_sstate() script_suspend(50) ;Pan around village on fire and fixate on shadow lord ld a,17 ;rather long delay for Panning. ld (panvariabledelay),a push_sstate() pan_camera_to_NPC(ShadowLord_NPC) sp_change_facing(sp_down) pop_sstate() script_suspend(50) ld hl,text_hive(h00_shadowlord_1) call dispDialogAuto push_sstate() pan_camera_to_NPC(Guard_That_Runs) pop_sstate() script_suspend(25) ld hl,text_hive(h00_Guard_That_Runs_1) call dispDialogAuto call panbackToplayer RES_FLAG(RAGNOTH_ON_FIRE) ld a,ragnoth_mapid rcall(LoadNewMapInA) set is_cutscene_done,(iy+stateflags) set show_player_sprite,(iy+baseflags) set camera_follows_player,(iy+baseflags) xor a ld (camera_subxy),a SET_FLAG(NEW_GAME_INTRO_FINISHED) ;Quit we are done script_end()
I have been forces by the evil serf lords @Geekboy1011 and @Sorunome to post a replay, so here I am The only thing I really have to say is about that code, I know it's asm code, couse I see it's asm code, yet with all the macros and stuff, it realy does not feal like assembly code it's still great thou, no matter how you make this game, I still will want to play it
;New game cutscene script is here. NEW_GAME_CUTSCENE: script_start() res show_player_sprite,(iy+baseflags) ;Hide player from View ld hl,xy(33,3) ld (camera_pos),hl ld a,%00000001 ld (camera_subxy),a res camera_follows_player,(iy+baseflags) ;Set Camera to Look cenetered on ;Graveyard ld a,ragnoth_mapid rcall(LoadNewMapInA) ;Load Ragnoth push_sstate() ld a,:Maya_intro ld de,Maya_intro rcall(AddSpriteEntry) find_sprite(Maya_intro_NPC) ;Load a Maya Sprite script_delay(30) sp_move_sprite(dsk_up) script_delay(30) sp_move_sprite(dsk_up) ;Move her half way script_delay(30) sp_change_facing(sp_down) ;Make her turn around and "sigh" script_delay(30) sp_change_facing(sp_up) script_delay(30) sp_move_sprite(dsk_up) script_delay(30) sp_move_sprite(dsk_up) ;Have her stand by the grave Stone script_delay(100) sp_change_facing(sp_down) script_delay(100) sp_change_facing(sp_up) script_delay(125) ;Do a jig for cinematics. (Turn around again) ld hl,xy(9,6) ld (camera_pos),hl ;Set Camera to First Guard SET_FLAG(RAGNOTH_ON_FIRE) ;Light Ragnoth on fire. ld a,ragnoth_mapid rcall(LoadNewMapInA) ;Load map on fire. ld a,:Guard_1_dat ld de,Guard_1_dat rcall(AddSpriteEntry) ;Add first guard. pop_sstate() script_suspend(86) ;Delay long enough for Guard Move push_sstate() ld a,:Guard_Fire_1 ld de,Guard_Fire_1 rcall(AddSpriteEntry) ;Have guard light a fire pop_sstate() script_suspend(65) ;Delay for effect. push_sstate() ;Repeat above for second guard. ld hl,xy(26,14) ;Literal copy paste with coordinates ld (camera_pos),hl ;changed. ld a,%00000010 ld (camera_subxy),a script_delay(1) ld a,:Guard_2_dat ld de,Guard_2_dat rcall(AddSpriteEntry) pop_sstate() script_suspend(86) push_sstate() ld a,:Guard_Fire_2 ld de,Guard_Fire_2 rcall(AddSpriteEntry) pop_sstate() script_suspend(65) .asm ld hl,xy(32,7) ld (camera_pos),hl ld a,%00000011 ld (camera_subxy),a script_suspend(50) ;Set Camera shadow Lord and refresh push_sstate() find_sprite(ShadowLord_NPC) sp_change_facing(sp_down) ;Turn to player pop_sstate() script_suspend(50) ld hl,text_hive(h00_shadowlord_1) ;Have him order people call dispDialogAuto push_sstate() pan_camera_to_NPC(Guard_That_Runs) ;Move to guard to Right pop_sstate() script_suspend(25) ld hl,text_hive(h00_Guard_That_Runs_1) call dispDialogAuto push_sstate() pan_camera_to_NPC(ShadowLord_NPC) ;Turn to guard sp_change_facing(sp_left) pop_sstate() script_suspend(5) ld hl,text_hive(h00_shadowlord_2) call dispDialogAuto push_sstate() pan_camera_to_NPC(Guard_That_Runs) pop_sstate() script_suspend(5) ld hl,text_hive(h00_Guard_That_Runs_2) call dispDialogAuto script_suspend(5) push_sstate() find_sprite(Guard_That_Runs) sp_move_sprite(dsk_left) ;change this later to make guard run down sp_change_facing(sp_right) script_delay(20) sp_move_sprite(dsk_left) ;change this later to make guard run down sp_change_facing(sp_right) script_delay(20) sp_change_facing(sp_right) setup_script_loop(6)-: sp_move_sprite(dsk_left) ;change this later to make guard run down script_delay(6) script_djnz({-}) pan_camera_to_NPC(ShadowLord_NPC) script_delay(15) sp_change_facing(sp_down) pop_sstate() script_suspend(30) ld hl,text_hive(h00_shadowlord_3) call dispDialogAuto script_suspend(50) ld hl,text_hive(h00_girl_1) call dispDialogAuto push_sstate() pan_camera_continue(17,14) script_delay(30) ;Pan camera to Maya's Mother pop_sstate() ld a,:Maya_Child ld de,Maya_Child rcall(AddSpriteEntry) script_suspend(96) ;Delay for child maya to move pan_camera_continue(17,15) ;Move so we can see text box ld hl,text_hive(h00_girl_2) call dispDialogAuto push_sstate() find_sprite(mayas_mother_npc) script_delay(30) sp_change_facing(sp_left) script_delay(20) sp_change_facing(sp_down) script_delay(10) sp_change_facing(sp_left) script_delay(25) pop_sstate() ld hl,text_hive(h00_girl_3) call dispDialogAuto call panbackToplayer RES_FLAG(RAGNOTH_ON_FIRE) ld a,ragnoth_mapid rcall(LoadNewMapInA) set is_cutscene_done,(iy+stateflags) set show_player_sprite,(iy+baseflags) set camera_follows_player,(iy+baseflags) xor a ld (camera_subxy),a SET_FLAG(NEW_GAME_INTRO_FINISHED) ;Quit we are done script_end() Guard_1_Move: setup_script_loop(4)-: sp_move_sprite(dsk_left) script_suspend(14) script_djnz({-}) sp_change_facing(sp_up) retMaya_Child_Move:;need to move down 3 tiles setup_script_loop(6)-: sp_move_sprite(dsk_down) script_suspend(14) script_djnz({-}) retMaya_intro: sp_pos(33,4,sp_up,maya_sprbase,Maya_intro_NPC) sp_scr(doNothing,doNothing)Guard_1_dat: sp_pos(10,6,sp_down,guard_sprbase,guard_1) sp_scr(Guard_1_Move,doNothing)Guard_Fire_1: sp_pos(8,5,sp_down,flame_sprbase) sp_scr(FireAnimator,doNothing)guard_2_dat: sp_pos(27,14,sp_up,guard_sprbase,guard_2) sp_scr(Guard_1_Move,doNothing)Guard_Fire_2: sp_pos(25,13,sp_down,flame_sprbase) sp_scr(FireAnimator,doNothing) Maya_Child: sp_pos(17,11,sp_down,mayachild_sprbase,maya_child_NPC) sp_scr(Maya_Child_Move,doNothing)