[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/vr/ - Retro Games

Search:


View post   

>> No.2467424 [View]
File: 220 KB, 672x900, KI3qoaS.jpg [View same] [iqdb] [saucenao] [google]
2467424

>>2467401
Had to make several small fixes, but _NOW_ it's pixel picture, and looks great.

Now's probably a good time to explain a bit about my code so others can read what I've posted to git hub.

First, let's start at the atom: the OBJ. See post >>2453935.
As stated, objects are specified to the SNES by supplying the following 32-bit piece of information:

VHPPCCCNNNNNNNNYYYYYYYYXXXXXXXX

OBJs actually have two more bits that specify a ninth X bit and a bit that let's you switch between the two sizes of OBJs that can be selected on a single scanline as set by register $2101 OBJSEL (a pretty obscure detail, in my program I only use 8x8pixel OBJs).

I call a cohesive collection of OBJs a sprite. This is the first abstraction that's not enforced by the hardware, but is a useful construct anyway. In my code I have a routine called Draw_Sprite (My naming from yesteryear sure does suck, but I'm more consistant now, although I haven't standardized my names yet) that you feed a pointer to a sprite, an x and y offset to add to the sprite definition. If you look in vrtan.spr you can see
some sprite definitions. For instance, look at vrtan.body.idle.r.0:

;#Data w vrtan.body.idle.r.0 {
$09
$00 $08 $2026 $00
$08 $08 $2027 $00
$00 $10 $2028 $00
$08 $10 $2029 $00

$00 $00 $2002 $00
$08 $00 $2003 $00
$00 $08 $200A $00
$08 $08 $200B $00
$00 $10 $2012 $00
$08 $10 $2013 $00
}

... continued in next post...

Navigation
View posts[+24][+48][+96]