}
}
+void
+modexPalUpdate3(byte *p)
+{
+ int i;
+ modexWaitBorder();
+ outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */
+ for(i=0; i<PAL_SIZE/2; i++)
+ {
+ outp(PAL_DATA_REG, rand());
+ }
+ modexWaitBorder(); /* waits one retrace -- less flicker */
+ for(; i<PAL_SIZE; i++)
+ {
+ outp(PAL_DATA_REG, rand());
+ }
+}
+
//color checker~
//i want to make another vesion that checks the palette when the palette is being appened~
void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z)
/* utility functions */
void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqpp);
void modexPalUpdate2(byte *p);
+void modexPalUpdate3(byte *p);
void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z);
void modexWaitBorder();
if(player.q == (TILEWH/SPEED)+1 && player.d > 0 && (player.triggerx == 5 && player.triggery == 5)){ player.hp--; }\r
//if(keyp(0x0E)) while(1){ if(xmsmalloc(24)) break; }
if(keyp(25)){ pdump(bg); pdump(spri); }
+ if(keyp(24)){ modexPalUpdate3(gpal); pdump(bg); pdump(spri); modexPalSave(gpal); modexSavePalFile("data/g.pal", gpal); }
if(keyp(87))
{