1
0
mirror of https://github.com/weiju/amiga-stuff synced 2025-12-08 14:58:33 +00:00

added movement to sprites

also, waitmouse is now C function instead of inline assembly
This commit is contained in:
Wei-ju Wu
2016-09-26 16:25:39 -07:00
parent cb9243504c
commit 9c216ac95e
3 changed files with 43 additions and 4 deletions

View File

@ -1,3 +1,4 @@
/* C version of How To Code 7 http://aminet.net/package/docs/misc/howtocode7 */
#include <clib/graphics_protos.h>
#include <clib/intuition_protos.h>
#include <exec/execbase.h>
@ -82,3 +83,11 @@ void reset_display(void)
custom.cop1lc = (ULONG) ((struct GfxBase *) GfxBase)->copinit;
RethinkDisplay();
}
#define PRA_FIR0_BIT (1 << 6)
void waitmouse(void)
{
volatile UBYTE *ciaa_pra = (volatile UBYTE *) 0xbfe001;
while ((*ciaa_pra & PRA_FIR0_BIT) != 0) ;
}