Author: Fabian Greffrath Description: Use PgUp and PgDown to toggle through the color palette and use a secret key to toggle "psychedelic mode". ;) --- invaders-1.0.0.orig/game.c +++ invaders-1.0.0/game.c @@ -10,6 +10,8 @@ struct shot_t { #define NUMSHOTS 5 static struct shot_t shots[NUMSHOTS]; static int8 ship,shipmove; +static int8 shotcolor=4,shipcolor=5,aliencolor=3; +static bool psychedelic=false; struct alien_t { int8 x,y; // x==-1 -> dead alien @@ -27,6 +29,19 @@ inline void reboot() outb(0xfe,0x64); }; +void changecolors(int c) +{ + shotcolor+=c; + if (shotcolor>15) shotcolor=1; + else if (shotcolor<1) shotcolor=15; + shipcolor+=c; + if (shipcolor>15) shipcolor=1; + else if (shipcolor<1) shipcolor=15; + aliencolor+=c; + if (aliencolor>15) aliencolor=1; + else if (aliencolor<1) aliencolor=15; +} + void resetgame() { gameover=false; @@ -59,7 +74,7 @@ void display() // display shots { uint8 i; - video_usecolor(4,0); + video_usecolor(shotcolor,0); for (i=0;i