0 Members and 5 Guests are viewing this topic.
In other news, Frey continues kicking unprecedented levels of ass.
p_GetSprite: .db __GetSpriteEnd-1-$ ;Gets sprite at (c,l) into 8 bytes at IX ld de,plotSScreen pop af pop bc pop ix push af ld a,l add a,a add a,l ld l,a add hl,hl add hl,hl add hl,de ld a,c sra c sra c sra c add hl,bc and %00000111 ld b,8 jr nz,___GetSpriteUnaligned ld de,12___GetSpriteAlignedLoop: ld a,(hl) ld (ix),a add hl,de inc ix djnz ___GetSpriteAlignedLoop ret___GetSpriteUnaligned: ld d,(hl) inc hl ld e,(hl) ex de,hl ld c,a___GetSpriteUnalignedLoop: add hl,hl dec c jr nz,___GetSpriteUnalignedLoop ld (ix),h ld hl,11 add hl,de inc ix djnz ___GetSpriteUnaligned ret__GetSpriteEnd:
Frankly, I've found a get-sprite routine wanting multiple times. I'd vote for removing rotCC() if you really think the number of commands should be minimized.
How about, when the compiler hits an error, it displays the name of the source program the error is in? It's really fun when there's like 10 source programs/libraries and they're all archived
Alright, everybody knows about the getPixel routine. But you know what would be cool? A getSprite routine, of course! I modified the getPixel routine so it grabs an 8x8 sprite from the buffer (and it's optimized for aligned reads!)
What would GetSprite return?Also, what's getPixel again?