#3468 - Saj - Tue Feb 25, 2003 4:27 pm
Here is the code;
(I'm using goldroad 1.7 to compile it)
(gifs2sprites to convert it.)
(CtoASM to convert it.)
(VBA(win) to test it)
:-
It just displays 4 vertical lines (grey and blue) instead of a 16 color,32x32 picture of a head. What gives?!
and here is the sprite (manhead.h) :-
(I'm using goldroad 1.7 to compile it)
(gifs2sprites to convert it.)
(CtoASM to convert it.)
(VBA(win) to test it)
:-
It just displays 4 vertical lines (grey and blue) instead of a 16 color,32x32 picture of a head. What gives?!
Code: |
@include screen.h @include sprites.h b start @include manhead.h start: Init_Sprites ldr r1,=REG_DISPCNT ldr r2,=(MODE_0|BG2_ENABLE|OBJ_ENABLE|OBJ_MAP_1D) str r2,[r1] ldr r0,=OAM ldr r1,=(SQUARE|COLOR_16|10)|((SIZE_32|10)<<16) str r1,[r0]+4! ldr r1,=0 str r1,[r0] ldr r1,=(SQUARE|COLOR_16|10)|((SIZE_32|10)<<16) ldr r1,=OBJPAL ldr r2,=128 ldr r3,=pallete palloop: ldr r7,[r3]+4! str r7,[r1]+4! subs r2,r2,1 bne palloop ldr r1,=CHARMEM ldr r2,=128 ldr r3,=obj0 sprloop: ldr r7,[r3]+4! str r7,[r1]+4! subs r2,r2,1 bne sprloop infiniteloop b infiniteloop |
and here is the sprite (manhead.h) :-
Code: |
pallete: @DCW (( 0)+( 0<<5)+( 0<<10)) @DCW (( 0)+( 0<<5)+( 0<<10)) @DCW (( 8)+( 5<<5)+( 0<<10)) @DCW ((30)+(17<<5)+(12<<10)) @DCW ((30)+(30<<5)+( 0<<10)) @DCW (( 0)+(17<<5)+(26<<10)) @DCW ((28)+(17<<5)+( 5<<10)) @DCW ((30)+( 0<<5)+( 3<<10)) @DCW ((30)+(30<<5)+(30<<10)) obj: @DCW 0x4211, 0x6442 @DCW 0x2421, 0x4644 @DCW 0x6211, 0x6464 @DCW 0x2111, 0x6446 @DCW 0x1111, 0x2322 @DCW 0x1111, 0x8332 @DCW 0x2111, 0x3333 @DCW 0x1111, 0x3332 @DCW 0x2244, 0x1111 @DCW 0x6464, 0x1112 @DCW 0x4644, 0x1126 @DCW 0x6446, 0x1124 @DCW 0x3468, 0x1124 @DCW 0x3438, 0x1123 @DCW 0x3333, 0x1112 @DCW 0x2333, 0x1111 @DCW 0x1111, 0x7721 @DCW 0x1111, 0x3321 @DCW 0x1111, 0x2211 @DCW 0x1111, 0x8211 @DCW 0x1111, 0x7821 @DCW 0x1111, 0x5521 @DCW 0x1111, 0x5582 @DCW 0x2211, 0x2221 @DCW 0x1233, 0x1111 @DCW 0x2533, 0x1111 @DCW 0x5553, 0x1112 @DCW 0x5555, 0x1125 @DCW 0x7555, 0x1127 @DCW 0x5777, 0x1125 @DCW 0x5333, 0x1125 @DCW 0x1111, 0x1111 |