Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

#1 2020-05-22 17:24:07

95girl
Member
Registered: 2012-03-25
Post 88/89

pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

I try to modify titlescreen.asm to have an horizontal scrolling logo, but when I do, other things scroll instead!

I changed hscY to hscX in the file, even the "db" numbers, won't do.

What else am I supposed to change?

Even seeing how another hack is done, and redoing it, won't help: same effect

Last edited by 95girl (2020-05-22 17:24:36)

Offline

#2 2020-05-22 18:59:33

VL2M
Member
Registered: 2020-05-11
Post 5/22

Re: pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

if you want more help,i think it's better to post the chunk of code that is supposed to do the action


Pandas sure don't like vegans...

Offline

#3 2020-05-22 19:05:45

95girl
Member
Registered: 2012-03-25
Post 89/89

Re: pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

"; make pokemon logo bounce up and down
ld bc, hSCY ; background scroll Y
ld hl, .TitleScreenPokemonLogoYScrolls"

I edit the hSCY to hSCX

and then I edit this

".TitleScreenPokemonLogoYScrolls:
; Controls the bouncing effect of the Pokemon logo on the title screen
db -4,16  ; y scroll amount, number of times to scroll
db 3,4
db -3,4
db 2,2
db -2,2
db 1,2
db -1,2
db 0      ; terminate list with 0"

even without editing those db numbers, it still glitches. It sends the trainer sprites up and the logo down

Offline

#4 2020-05-24 20:29:20

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,183/1,193

Re: pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

I think the only issue that would make this difficult is that the initial values of 'hSCX' and 'hSCY' need to be flipped (hSCX should be set to $40 and hSCY should be set to 0):

diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
index 03a5832d..cde66156 100755
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -27,9 +27,9 @@ DisplayTitleScreen:
     ld [H_AUTOBGTRANSFERENABLED], a
     xor a
     ld [hTilesetType], a
-    ld [hSCX], a
-    ld a, $40
     ld [hSCY], a
+    ld a, $40
+    ld [hSCX], a
     ld a, $90
     ld [hWY], a
     call ClearScreen
@@ -141,7 +141,7 @@ ENDC
     ld [rOBP0], a
 
 ; make pokemon logo bounce up and down
-    ld bc, hSCY ; background scroll Y
+    ld bc, hSCX ; background scroll X
     ld hl, .TitleScreenPokemonLogoYScrolls
 .bouncePokemonLogoLoop
     ld a, [hli]

This might result in it scrolling in the opposite direction from what you had in mind. So to get it to scroll in the opposite direction, just flip all the signs:

diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
index 03a5832d..40ea1d83 100755
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -27,9 +27,9 @@ DisplayTitleScreen:
     ld [H_AUTOBGTRANSFERENABLED], a
     xor a
     ld [hTilesetType], a
-    ld [hSCX], a
-    ld a, $40
     ld [hSCY], a
+    ld a, -$40
+    ld [hSCX], a
     ld a, $90
     ld [hWY], a
     call ClearScreen
@@ -141,14 +141,14 @@ ENDC
     ld [rOBP0], a
 
 ; make pokemon logo bounce up and down
-    ld bc, hSCY ; background scroll Y
+    ld bc, hSCX ; background scroll X
     ld hl, .TitleScreenPokemonLogoYScrolls
 .bouncePokemonLogoLoop
     ld a, [hli]
     and a
     jr z, .finishedBouncingPokemonLogo
     ld d, a
-    cp -3
+    cp 3
     jr nz, .skipPlayingSound
     ld a, SFX_INTRO_CRASH
     call PlaySound
@@ -160,13 +160,13 @@ ENDC
 
 .TitleScreenPokemonLogoYScrolls:
 ; Controls the bouncing effect of the Pokemon logo on the title screen
-    db -4,16  ; y scroll amount, number of times to scroll
-    db 3,4
+    db 4,16  ; x scroll amount, number of times to scroll
     db -3,4
-    db 2,2
+    db 3,4
     db -2,2
-    db 1,2
+    db 2,2
     db -1,2
+    db 1,2
     db 0      ; terminate list with 0
 
 .ScrollTitleScreenPokemonLogo:

Also, please wrap your code snippets in bb code blocks. Like:
[code]snippet[/code]

Offline

  • Index
  • → Help/Question
  • → pokered's titlescreen.asm problem: logo doesn't scroll, other thing do

Board footer

Powered by FluxBB