Difference between revisions of "Cv4/Sprites"

From Castlevania Speedrunning
Jump to: navigation, search
(Format Example with Skeleton)
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
===Format Example with Skeleton===
 
===Format Example with Skeleton===
  
Skelleton:
+
SkelletonFrmeAnimation:
  
01:b2f1 f48a 058b  
+
  b2f1       f48a 058b  
bbbb cccc
+
      bbbb cccc
+
  bbbb=Frame1  
bbbb=Frame1  
+
  cccc=Frame2
cccc=Frame2
+
 
 +
SkelletonFrameAssembly
  
  Frame                                                  Frame2
 
 
   20af4  04 fd 09 06 28  ed 09 04 28  f8 f9 02 28  f5 e9 00 28  03  f8 09 0c 28 f7  f9 0a 28  f5 e9 08 28
 
   20af4  04 fd 09 06 28  ed 09 04 28  f8 f9 02 28  f5 e9 00 28  03  f8 09 0c 28 f7  f9 0a 28  f5 e9 08 28
 
           ss aa bb cc dd  aa bb cc dd  aa bb cc dd  aa bb cc dd  ss  aa bb cc dd aa  bb cc dd  aa bb cc dd
 
           ss aa bb cc dd  aa bb cc dd  aa bb cc dd  aa bb cc dd  ss  aa bb cc dd aa  bb cc dd  aa bb cc dd
  
ss=Size Number of 2x2 queuers to use. 00 Is not a number and will overload.
+
ss=Size Number of 2x2 queuers to use. 00 Is not a number and will overload. A new ss means a new frame in the example above are two frames shown
  
 
aa=Offset (01 move one pixel right 80 will wrap)
 
aa=Offset (01 move one pixel right 80 will wrap)
 +
 
bb=Offset (01 move one pixel down 80 will wrap)
 
bb=Offset (01 move one pixel down 80 will wrap)
 +
 
cc=Tile Pick Tile Square 2x2 ..
 
cc=Tile Pick Tile Square 2x2 ..
 +
 
dd=Orientation and Palettes
 
dd=Orientation and Palettes
 
 
   First byte:  
+
   dd First byte:  
 
   2=Normal   
 
   2=Normal   
 
   6-7=Mirror  
 
   6-7=Mirror  
Line 32: Line 35:
 
   BadNumbers=0 1 3 4 8 c d  
 
   BadNumbers=0 1 3 4 8 c d  
  
   Second byte
+
   dd Second byte
 
   0=Pal 0
 
   0=Pal 0
 
   2=Pal 1
 
   2=Pal 1
Line 41: Line 44:
 
   c=Pal 6
 
   c=Pal 6
 
   e=Pal 7
 
   e=Pal 7
 
  
 
===Enemys===
 
===Enemys===
Line 89: Line 91:
  
 
==HitBox==
 
==HitBox==
 +
 +
In most cases the hitbox is writen (STA) as the event get loaded. So it is easy to find with a breakpoints.
  
 
RAM
 
RAM

Latest revision as of 20:35, 17 July 2019

Sprite Assembly

The Sprite assembly contain more or less two tables. One that will point to the Frame and one that will draw the Sprite in 2x2 squares. This is the most used format in SC4. The assembly number in the event table is almost the same as the pointer. The routine does increase or decrease it a bit for some reason so they do not perfectly match and are a bit harder to find.

Format Example with Skeleton

SkelletonFrmeAnimation:

 b2f1       f48a 058b 
 	    bbbb cccc	
 bbbb=Frame1 
 cccc=Frame2

SkelletonFrameAssembly

 20af4   04 fd 09 06 28  ed 09 04 28  f8 f9 02 28  f5 e9 00 28  03  f8 09 0c 28 f7  f9 0a 28  f5 e9 08 28
         ss aa bb cc dd  aa bb cc dd  aa bb cc dd  aa bb cc dd  ss  aa bb cc dd aa  bb cc dd  aa bb cc dd

ss=Size Number of 2x2 queuers to use. 00 Is not a number and will overload. A new ss means a new frame in the example above are two frames shown

aa=Offset (01 move one pixel right 80 will wrap)

bb=Offset (01 move one pixel down 80 will wrap)

cc=Tile Pick Tile Square 2x2 ..

dd=Orientation and Palettes

 dd First byte: 
 2=Normal  
 6-7=Mirror 
 A-B=Flip 
 E-F=MirrorFlip  
 BadNumbers=0 1 3 4 8 c d 
 dd Second byte
 0=Pal 0
 2=Pal 1
 4=Pal 2
 6=Pal 3
 8=Pal 4
 a=Pal 5
 c=Pal 6
 e=Pal 7

Enemys

MudMan: 20d89 Assembly

218d2 HitAssembly 218f8 SmallCrumbles

BOSS:

Rowdin 22e6b DownStabJump

22e80 Landing

22e8a Spear

22dc3 Walking

22ea1 HurtFrame1

22eca HurtFrame2



Candle:

a654 d280 d780 Frame 1 and 2


Simons SpriteAssembly

20246 Idle Frame

20256 Frame one Walking

20266 Second Frame Walking


204c6 Idle Frame Stairs Up


HitBox

In most cases the hitbox is writen (STA) as the event get loaded. So it is easy to find with a breakpoints.

RAM Event 40 byte

48-49 HitBox X 4a-4b HitBox Y