From 452aa1a81bc743605070b672b3cc85ac687ab784 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Fri, 21 Jun 2019 13:56:41 +0000 Subject: [PATCH] Cutscene work --- cutscene/helper.asm | 9 +++++++++ main.o | Bin 11059 -> 11058 bytes test.gb | Bin 32768 -> 32768 bytes test.map | 30 +++++++++++++++--------------- test.sym | 22 +++++++++++----------- worlds/intro.asm | 8 +++++++- 6 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 cutscene/helper.asm diff --git a/cutscene/helper.asm b/cutscene/helper.asm new file mode 100644 index 0000000..4b03429 --- /dev/null +++ b/cutscene/helper.asm @@ -0,0 +1,9 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Helper file for writing cutscene scripts ; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +SECTION "non_existing", ROMX +db 01 ; Fade out +db 02 ; Fade in +db 10, $4AAA; Load screen at position $4AAA +db 20 ; Start text diff --git a/main.o b/main.o index 3288ae0efb14a55bcd3bc259224a3ca62d0c3c88..b0d222be8bb5e9b5ff29b87bb1d648a13a0b149e 100644 GIT binary patch delta 18 acmdlSwkd4GeF;YY$qytVH(N>m6a)ZKS_l0A delta 18 acmdlKwmEFWeF?^Z$qytVH(N;l5(EHITnGIC diff --git a/test.gb b/test.gb index 15e5156f1b7a60881691052055c42686c616b367..62ddc7a9cbcd2c1e1ce25beb86c1e39c90d83456 100644 GIT binary patch delta 133 zcmV;00DAv`fC7Mk0+4hzTme4hJ{#aiui!%9L*OPp2jELSkl;$qPXWyU0L_3BAppQW z00yAVWdY5A|32a1K+SIf!+epdpAi8w005PSpmG5rfd2ss0L@&JTLCZuZb6FyhXWs{Z?NeN{EAwir563u0^=n@!h=s`0L delta 133 zcmV;00DAv`fC7Mk0+4hzT>(DiJ{#aiui!%9L*OPp2jELSkl;$qPyx*V0L_3BAppQW z00yAVW&zEB|32a1K+SLg!+nvepArB8GXRx_y%BQ(A%On@3INSrlUe~V0dSLx0d%qg nh!75D0nOJEAz_>b6FyhXW|Ni@NeN~FAwir563u3_=n@!h$Tu=Z diff --git a/test.map b/test.map index ca16c68..8a89bdb 100644 --- a/test.map +++ b/test.map @@ -21,33 +21,33 @@ ROM Bank #0 (HOME): $0029 = UpdateController.onenibble $0009 = UpdateController $0000 = InitController - SECTION: $017D-$0194 ($0018 bytes) ["Game Loop"] - $0183 = GameLoop.mainloop - $017D = GameLoop + SECTION: $017C-$0193 ($0018 bytes) ["Game Loop"] + $0182 = GameLoop.mainloop + $017C = GameLoop SECTION: $00AB-$00EC ($0042 bytes) ["Hello wrold string"] $00AB = FirstCutScene - SECTION: $0150-$017C ($002D bytes) ["Tools"] - $0166 = Memfill - $0170 = WaitVBlank - $0173 = dma_routine_start - $017D = dma_routine_end - $015D = Memcpy - $0166 = Memfill.repeatFill - $016B = Memfill16.repeatFill - $0179 = dma_routine_start.loop - $0150 = InitTools + SECTION: $014F-$017B ($002D bytes) ["Tools"] + $0165 = Memfill + $016F = WaitVBlank + $0172 = dma_routine_start + $017C = dma_routine_end + $015C = Memcpy + $0165 = Memfill.repeatFill + $016A = Memfill16.repeatFill + $0178 = dma_routine_start.loop + $014F = InitTools SECTION: $0040-$0040 ($0001 bytes) ["InterruptVblank"] SECTION: $0048-$0048 ($0001 bytes) ["InterruptLCDC"] SECTION: $0050-$0050 ($0001 bytes) ["InterruptTimer_Overflow"] SECTION: $0058-$0058 ($0001 bytes) ["InterruptSerial"] SECTION: $0060-$0060 ($0001 bytes) ["Interruptp1thru4"] - SECTION: $0100-$014F ($0050 bytes) ["Header"] + SECTION: $0100-$014E ($004F bytes) ["Header"] SECTION: $0061-$00AA ($004A bytes) ["Intro code"] $0061 = Start SECTION: $0280-$127F ($1000 bytes) ["Font"] $0280 = Page1 $1280 = Page1End - SLACK: $2CB5 bytes + SLACK: $2CB6 bytes ROM Bank #1: SECTION: $4000 ($0 bytes) ["rom1_intro"] diff --git a/test.sym b/test.sym index 5111e97..090e6e1 100644 --- a/test.sym +++ b/test.sym @@ -19,18 +19,18 @@ 00:0029 UpdateController.onenibble 00:0009 UpdateController 00:0000 InitController -00:0183 GameLoop.mainloop -00:017D GameLoop +00:0182 GameLoop.mainloop +00:017C GameLoop 00:00AB FirstCutScene -00:0166 Memfill -00:0170 WaitVBlank -00:0173 dma_routine_start -00:017D dma_routine_end -00:015D Memcpy -00:0166 Memfill.repeatFill -00:016B Memfill16.repeatFill -00:0179 dma_routine_start.loop -00:0150 InitTools +00:0165 Memfill +00:016F WaitVBlank +00:0172 dma_routine_start +00:017C dma_routine_end +00:015C Memcpy +00:0165 Memfill.repeatFill +00:016A Memfill16.repeatFill +00:0178 dma_routine_start.loop +00:014F InitTools 00:0061 Start 00:0280 Page1 00:1280 Page1End diff --git a/worlds/intro.asm b/worlds/intro.asm index 394cb31..b5af6fa 100644 --- a/worlds/intro.asm +++ b/worlds/intro.asm @@ -1,3 +1,9 @@ SECTION "rom1_intro", ROMX[$4000],BANK[1] ; Intro cutscene -db "" +db 01 ; Fade out +db 20 ; Start text +; [ ] <-- screen limit +db "...wake up...\n" +db "please wake up...#", +db "...we don't have\n" +db "time, wake up...", 0