Advertiser Content

Development Animating the FireRed titlescreen. Page 3

Started by Darthatron March 20th, 2011 5:39 PM
  • 25743 views
  • 63 replies

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen January 9th, 2019
Posted March 4th, 2018
859 posts
13.7 Years
So if I insert picture one at 0x800000 und picture two at 0x800020
The Table has to look like 00 00 80 08 (first image) 0 (the pause leng) 20 00 80 08 (second image) and repeat this? Or is this wrong?
I hope that these are just really bad example offsets, because there's no way your pictures are only 20 bytes long. You should search for freespace, insert your first picture, and then search for freespace again, insert the second image, etc.

Word [Pointer to Image]; Byte [Pause Length]; Byte [Next Frame]
This is the format the table should be in. I haven't done this myself, but I would assume that the third on is the pointer to the next image in the sequence. Other than your example offsets, it seems like everything should be working. Are all of your images using the same .RAW? Are you (not) compressing the images when you should(n't) be? You're being so vague that no one can really help you.

EDIT: Wait, after rereading the format (had a bit of a reading comprehension fail) the third field is a byte and not a word. In this case, I think your table would be 00 00 80 08 (first image) 00 (the pause length) 01 (the next frame), 20 00 80 08 (second image) 00 (pause length) 02 (the next frame), etc. It seems you can populate the table and skip frames if you want, which is a weird way to structure it, imo. Why not just chop off the third field and have the table in order?

FBI

Free supporter

Male
Unknown Island
Seen 27 Minutes Ago
Posted 6 Days Ago
1,906 posts
6.8 Years
I hope that these are just really bad example offsets, because there's no way your pictures are only 20 bytes long. You should search for freespace, insert your first picture, and then search for freespace again, insert the second image, etc.



This is the format the table should be in. I haven't done this myself, but I would assume that the third on is the pointer to the next image in the sequence. Other than your example offsets, it seems like everything should be working. Are all of your images using the same .RAW? Are you (not) compressing the images when you should(n't) be? You're being so vague that no one can really help you.

EDIT: Wait, after rereading the format (had a bit of a reading comprehension fail) the third field is a byte and not a word. In this case, I think your table would be 00 00 80 08 (first image) 00 (the pause length) 01 (the next frame), 20 00 80 08 (second image) 00 (pause length) 02 (the next frame), etc. It seems you can populate the table and skip frames if you want, which is a weird way to structure it, imo. Why not just chop off the third field and have the table in order?
Well, to clarify, this is animating an OAM, so there is no .raw file. As for the merit for the third field, it is so the last field (or other fields) can jump to a frame which isn't in the original frames for the first iteration, later moving on the the original frames. While you can make a linear table, you'd make it much larger than it has to be by not having the third field.
...
Seen January 7th, 2017
Posted August 6th, 2016
58 posts
4.1 Years
Well, to clarify, this is animating an OAM, so there is no .raw file. As for the merit for the third field, it is so the last field (or other fields) can jump to a frame which isn't in the original frames for the first iteration, later moving on the the original frames. While you can make a linear table, you'd make it much larger than it has to be by not having the third field.
No, he uses BG to do the animation:)

FBI

Free supporter

Male
Unknown Island
Seen 27 Minutes Ago
Posted 6 Days Ago
1,906 posts
6.8 Years
No, he uses BG to do the animation:)
Ah OK. It looked like the Zapdos Sprite from the game, so I drew conclusions without actually looking at the code. I apologize for the confusion!
...
Male
Seen January 16th, 2017
Posted February 28th, 2016
94 posts
6.3 Years
Follow my post and you will find that it requires a table, which is partially composed of image pointers. (You can follow Karatekid552's reply to get the accurate structure of the table)
I tried to compile the routine, but the compiler says :
animation.asm:23 : Error: Bad expression
animation.asm:23 : Error: Garbage following instruction

and no output file is created!
Male
Seen January 16th, 2017
Posted February 28th, 2016
94 posts
6.3 Years
idk what you meant. Could you post the routine you tried to compile?
.thumb
Start:
push {r0-r3}
ldr r3, .RAM_Address
ldr r1, .Ani_Table
ldrb r2, [r3, #0x1]
lsl r2, #0x3
add r1, r2
ldrb r0, [r1, #0x4]
ldrb r2, [r3]
cmp r2, r0
bge LoadFrame
add r2, #0x1
strb r2, [r3]
b Finish
LoadFrame:
mov r2, #0x0
strb r2, [r3]
ldrb r2, [r1, #0x5]
strb r2, [r3, #0x1]
ldr r0, [r1]
ldr r1, .VRAM_Animated_Image
swi #0x12

Finish:
pop {r0-r3}
ExitRightNow:
ldr r1, [r0]
ldr r0, .Frame_Count
push {r3}
ldr r3, .Old_Routine
bx r3

.align 2
.Ani_Table:
.word 0x08YYYYYY @animation table offset
.RAM_Address:
.word 0x020370c0
.VRAM_Animated_Image:
.word 0x06004000
.Frame_Count:
.word 0x0000FFFF
.Old_Routine:
.word 0x08078C01
Seen January 7th, 2017
Posted August 6th, 2016
58 posts
4.1 Years
.thumb
Start:
push {r0-r3}
ldr r3, .RAM_Address
ldr r1, .Ani_Table
ldrb r2, [r3, #0x1]
lsl r2, #0x3
add r1, r2
ldrb r0, [r1, #0x4]
ldrb r2, [r3]
cmp r2, r0
bge LoadFrame
add r2, #0x1
strb r2, [r3]
b Finish
LoadFrame:
mov r2, #0x0
strb r2, [r3]
ldrb r2, [r1, #0x5]
strb r2, [r3, #0x1]
ldr r0, [r1]
ldr r1, .VRAM_Animated_Image
swi #0x12

Finish:
pop {r0-r3}
ExitRightNow:
ldr r1, [r0]
ldr r0, .Frame_Count
push {r3}
ldr r3, .Old_Routine
bx r3

.align 2
.Ani_Table:
.word 0x08YYYYYY @animation table offset
.RAM_Address:
.word 0x020370c0
.VRAM_Animated_Image:
.word 0x06004000
.Frame_Count:
.word 0x0000FFFF
.Old_Routine:
.word 0x08078C01
Have you changed YYYYYY to your table location?
Advertiser Content