Hi guys,
Still working on my incremental clicker game for the genny. Unfortunately i am having problems getting a single sprite to show even when using BigEvilCorporations framework. There doesn't seem to be any errors so my guess it's an addressing error of some sort. I double checked my code for typos and there doesn't seem to be any as far as i can tell. According to a thread i started the problem is:
The problem is everything seems to be correct:
First part is correct, the last part isn't
That can't be right, I don't even think there's even enough space for that many tiles anyways:
Um shouldn't it be palette 0 color 0, and no it's not supposed to be a brown squire it's supposed to be a cursor?
I am linking to the source code as reference in hopes one of you can figure it out, cause right now i'm stumped and very discouraged though it isn't gonna stop me. Any assistance in this matter would be greatly appreciated.
Sincerely,
SegaDev
Still working on my incremental clicker game for the genny. Unfortunately i am having problems getting a single sprite to show even when using BigEvilCorporations framework. There doesn't seem to be any errors so my guess it's an addressing error of some sort. I double checked my code for typos and there doesn't seem to be any as far as i can tell. According to a thread i started the problem is:
Code:
globals.asm ; center screen position centerscreen_position_x: equ 0x00F0 centerscreen_position_y: equ 0x00F0 memorymap.asm ; ************************************ ; Game globals ; ************************************ cursor_position_x equ (audio_clock+SizeWord) cursor_position_y equ (cursor_position_x+SizeWord) source.asm ; ************************************ ; set the cursor position to the center of the screen ; ************************************ move.w #centerscreen_position_x, (cursor_position_x) ; Set cursor's x position move.w #centerscreen_position_y, (cursor_position_y) ; Set cursor's y position ; ****************************************************************** ; Main game loop ; ****************************************************************** GameLoop: jsr WaitVBlankStart ; Wait for start of vblank ; Set cursor's position move.w #cursor_id, d0 ; cursor sprite id move.w (cursor_position_x), d1 ; cursor's x position jsr SetSpritePosX ; Set cursor's x position move.w (cursor_position_y), d1 ; cursor's y position jsr SetSpritePosY ; Set cursor's y position jsr WaitVBlankEnd ; Wait for end of vblank jmp GameLoop
Code:
spritedescriptiors.asm ; Sprite IDs cursor_id equ 0x0 number_of_sprites equ 0x1 ; Sprite descriptor structs sprite_descriptor_table: cursor_sprite: dc.w offscreen_position_y ; Y coord (+ 128) dc.b CursorDimensions ; Width (bits 0-1) and height (bits 2-3) in tiles dc.b 0x00 ; Index of next sprite (linked list) dc.b 0x00 ; H/V flipping (bits 3/4), palette index (bits 5-6), priority (bit 7) dc.b CursorTileID ; Index of first tile dc.w offscreen_position_x ; X coord (+ 128)
Code:
assets/sprites/cursor.asm Cursor: dc.l 0x00055000 ; XX dc.l 0x00500500 ; X X dc.l 0x05000050 ; X X dc.l 0x50000005 ; X X dc.l 0x50000005 ; X X dc.l 0x55500555 ; XXX XXX dc.l 0x00500500 ; X X dc.l 0x00555500 ; XXXX assets/palette/palettes.asm Palette: dc.w 0x0000 ; Colour 0 - Transparent dc.w 0x000E ; Colour 1 - Red dc.w 0x00E0 ; Colour 2 - Green dc.w 0x0E00 ; Colour 3 - Blue dc.w 0x0000 ; Colour 4 - Black dc.w 0x0EEE ; Colour 5 - White dc.w 0x00EE ; Colour 6 - Yellow dc.w 0x008E ; Colour 7 - Orange dc.w 0x0E0E ; Colour 8 - Pink dc.w 0x0808 ; Colour 9 - Purple dc.w 0x0444 ; Colour A - Dark grey dc.w 0x0888 ; Colour B - Light grey dc.w 0x0EE0 ; Colour C - Turquoise dc.w 0x000A ; Colour D - Maroon dc.w 0x0600 ; Colour E - Navy blue dc.w 0x0060 ; Colour F - Dark green
Sincerely,
SegaDev