1 ///////////////////////////////////////////////////////////////
3 ///////////////////////////////////////////////////////////////
29 // if( KeyTable[key_f12]==1 )
41 ///////////////////////////////////////////////////////////////
43 ///////////////////////////////////////////////////////////////
48 for(count
=0;count
<768;count
++)
52 PALfade
[count
]=PALmain
[count
];
53 PALover
[count
]=PALmain
[count
];
90 if((LEVEL
==19)||(LEVEL
==39))
91 modon
=MIDASplayModuleSection(mod
,0x16,0x1f,0x16,TRUE
);
93 modon
=MIDASplayModuleSection(mod
,0x00,0x08,0x00,TRUE
);
97 modon
=MIDASplayModuleSection(mod
,0x09,0x0c,0x00,TRUE
);
99 MIDASsetMusicVolume(modon
,VOL
);
101 ///////////////////////////////////////////////////////////////
103 ///////////////////////////////////////////////////////////////
133 ///////////////////////////////////////////////////////////////
135 ///////////////////////////////////////////////////////////////
143 MIDASsetMusicVolume(modon
,VOL
);
187 if(KeyTable
[key_esc
]==1)
192 MIDASstopModule(modon
);
206 ///////////////////////////////////////////////////////////////
208 ///////////////////////////////////////////////////////////////
231 PaletteFade(PALblack
,PALfade
);
249 if((LEVEL
==19)||(LEVEL
==39))
250 modon
=MIDASplayModuleSection(mod
,0x16,0x1f,0x16,TRUE
);
252 modon
=MIDASplayModuleSection(mod
,0x00,0x08,0x00,TRUE
);
256 modon
=MIDASplayModuleSection(mod
,0x09,0x0c,0x00,TRUE
);
258 MIDASsetMusicVolume(modon
,VOL
);
262 ///////////////////////////////////////////////////////////////
264 ///////////////////////////////////////////////////////////////
269 MIDASstopModule(modon
);
280 PaletteSet(PALwhite
);
289 MIDASplaySample(wav
,6,255,6000+(cAIR
*((old
+1)*100)),64,MIDAS_PAN_MIDDLE
);
290 MIDASplaySample(wav
,7,255,4000+(cAIR
*((old
+1)*100)),64,MIDAS_PAN_MIDDLE
);
319 if((LEVEL
==19)||(LEVEL
==39))
320 modon
=MIDASplayModuleSection(mod
,0x16,0x1f,0x16,TRUE
);
322 modon
=MIDASplayModuleSection(mod
,0x00,0x08,0x00,TRUE
);
326 modon
=MIDASplayModuleSection(mod
,0x09,0x0c,0x00,TRUE
);
328 MIDASsetMusicVolume(modon
,VOL
);
331 ///////////////////////////////////////////////////////////////
332 // Redraw Stuff for Double Buffer
333 ///////////////////////////////////////////////////////////////
334 void LevelDoneExtra(void)
351 for(count
=0;count
<cCONVl
;count
++)
353 DrawConvBlock(cCONVx
+(count
*8),cCONVy
,cCONVgfx
,cCONVf
);
359 if(cHROBOx
[i
]!=65535)
363 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],(cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1))+cHROBOflip
[i
],cHROBOink
[i
]);
367 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1),cHROBOink
[i
]);
375 if(cVROBOx
[i
]!=65535)
377 DrawVROBO((cVROBOx
[i
]&248),cVROBOy
[i
],cVROBOgfx
[i
]+((cVROBOx
[i
]&cVROBOanim
[i
])>>1),cVROBOink
[i
]);
384 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
387 if((LEVEL
==7)||(LEVEL
==11))
389 DrawKong(KONGx
,KONGy
,KONGf
,KONGc
);
396 DrawSky(SKYx
[i
],SKYy
[i
],SKYf
[i
],SKYc
[i
]);
404 if(SPGx
[old
][i
]!=65535)
406 DrawSPGBlock(SPGx
[old
][i
],SPGy
[old
][i
]);
415 if((cKEYx
[i
]!=65535)&&(cKEYy
[i
]!=65535))
417 DrawKeyBlock(cKEYx
[i
],cKEYy
[i
],cKEYgfx
,bright2
[cKEYb
[i
]]);
432 ///////////////////////////////////////////////////////////////
434 ///////////////////////////////////////////////////////////////
451 ///////////////////////////////////////////////////////////////
452 // Draw Game Over Screen
453 ///////////////////////////////////////////////////////////////
469 DrawOver(120,BOOTy
,1);
488 DrawOver(120,BOOTy
,1);
501 ///////////////////////////////////////////////////////////////
502 // Draw GAME OVER Gfx
503 ///////////////////////////////////////////////////////////////
504 void DrawOver(int xpos
,int ypos
,BYTE block
)
516 data
=GFXover
[block2
];
520 PlotPixel(xpos
+x
,ypos
+y
,data
);
524 PlotPixel(xpos
+x
,ypos
+y
,254);
530 ///////////////////////////////////////////////////////////////
532 ///////////////////////////////////////////////////////////////
537 DrawOver(120,BOOTy
,1);
539 MIDASplaySample(wav
,6,255,4000+((BOOTy
*BOOTy
)*(old
+1)),64,MIDAS_PAN_MIDDLE
);
563 ///////////////////////////////////////////////////////////////
564 // Rotate end of palette
565 ///////////////////////////////////////////////////////////////
568 BYTE temp1
,temp2
,temp3
;
577 PALover
[720+i
]=PALover
[723+i
];
584 ///////////////////////////////////////////////////////////////
586 ///////////////////////////////////////////////////////////////
587 void DrawWilly2(void)
599 data
=GFXwilly
[block2
];
603 PlotPixel(120+x
,96+y
,data
);
607 PlotPixel(120+x
,96+y
,254);
614 ///////////////////////////////////////////////////////////////
616 ///////////////////////////////////////////////////////////////
617 void DoOverText(void)
639 ///////////////////////////////////////////////////////////////
641 ///////////////////////////////////////////////////////////////
678 ///////////////////////////////////////////////////////////////
680 ///////////////////////////////////////////////////////////////
692 DrawWilly3(i
*16,168,LIVESf
);
712 ///////////////////////////////////////////////////////////////
714 ///////////////////////////////////////////////////////////////
715 void DrawWilly3(int xpos
,int ypos
,BYTE block
)
727 data
=GFXwilly
[block2
];
731 PlotPixel(xpos
+x
,ypos
+y
,data
);
735 PlotPixel(xpos
+x
,ypos
+y
,0);
741 ///////////////////////////////////////////////////////////////
742 // Draw GAME OVER Gfx
743 ///////////////////////////////////////////////////////////////
744 void DrawBoot(int xpos
,int ypos
)
756 data
=GFXover
[block2
];
760 PlotPixel(xpos
+x
,ypos
+y
,data
);
767 ///////////////////////////////////////////////////////////////
769 ///////////////////////////////////////////////////////////////
770 void PrintScore(void)
774 FontPrint(20,19,"Score");
775 ShowSix(26,19,SCORE
);
789 ///////////////////////////////////////////////////////////////
791 ///////////////////////////////////////////////////////////////
792 void PrintHighScore(void)
796 FontPrint(0,19,"High Score");
797 ShowSix(11,19,HISCORE
);
800 ///////////////////////////////////////////////////////////////
801 // Do Extra Life Gained
802 ///////////////////////////////////////////////////////////////
815 ///////////////////////////////////////////////////////////////
817 ///////////////////////////////////////////////////////////////
830 ///////////////////////////////////////////////////////////////
832 ///////////////////////////////////////////////////////////////
837 for(count
=0;count
<768;count
++)
839 PALfade
[count
]=PALmain
[count
];
846 ///////////////////////////////////////////////////////////////
847 // Rotate end of palette
848 ///////////////////////////////////////////////////////////////
854 for(i
=0;i
<(16*3);i
++)
856 temp
[i
]=PALfade
[(16*3)+i
];
861 PALfade
[(16*3)+i
]=PALfade
[(32*3)+i
];
864 for(i
=0;i
<(16*3);i
++)
866 PALfade
[672+i
]=temp
[i
];
870 ///////////////////////////////////////////////////////////////
872 ///////////////////////////////////////////////////////////////
878 ///////////////////////////////////////////////////////////////
880 ///////////////////////////////////////////////////////////////
892 SUNbuff
[old
][(y
*24)+x
]=GetPixel(60+x
,SUNy
+y
);
894 data
=GFXsun
[(y
*24)+x
];
896 PlotPixel(60+x
,SUNy
+y
,data
);
904 ///////////////////////////////////////////////////////////////
906 ///////////////////////////////////////////////////////////////
913 if(SUNyold
[old
]!=65535)
915 for(y
=0;y
<SUNhold
[old
];y
++)
919 data
=SUNbuff
[old
][(y
*24)+x
];
920 PlotPixel(60+x
,SUNyold
[old
]+y
,data
);
926 ///////////////////////////////////////////////////////////////
928 ///////////////////////////////////////////////////////////////
935 if( KeyTable
[key_1
]==1 )
938 if( KeyTable
[key_2
]==1 )
941 if( KeyTable
[key_3
]==1 )
944 if( KeyTable
[key_4
]==1 )
947 if( KeyTable
[key_5
]==1 )
956 if( KeyTable
[key_6
]==1 )
958 MIDASstopModule(modon
);
968 ///////////////////////////////////////////////////////////////
969 // Change Level for Cheat
970 ///////////////////////////////////////////////////////////////
971 void ChangeLevelCheat(void)
981 if((LEVEL
==19)||(LEVEL
==39))
982 modon
=MIDASplayModuleSection(mod
,0x16,0x1f,0x16,TRUE
);
984 modon
=MIDASplayModuleSection(mod
,0x00,0x08,0x00,TRUE
);
988 modon
=MIDASplayModuleSection(mod
,0x09,0x0c,0x00,TRUE
);
990 MIDASsetMusicVolume(modon
,VOL
);
993 ///////////////////////////////////////////////////////////////
995 ///////////////////////////////////////////////////////////////
996 void CheckCheat(void)
1000 if(KeyTable
[CHEATkey
[CHEATp
]]!=1)
1009 if(KeyTable
[CHEATkey
[CHEATp
]]==1)
1020 ///////////////////////////////////////////////////////////////
1022 ///////////////////////////////////////////////////////////////
1023 void CheckMusic(void)
1025 if( (KeyTable
[key_h
]==1)||
1026 (KeyTable
[key_j
]==1)||
1027 (KeyTable
[key_k
]==1)||
1028 (KeyTable
[key_l
]==1))
1041 ///////////////////////////////////////////////////////////////
1043 ///////////////////////////////////////////////////////////////
1044 void CheckPause(void)
1048 if( (KeyTable
[key_a
]==1)||
1049 (KeyTable
[key_s
]==1)||
1050 (KeyTable
[key_d
]==1)||
1051 (KeyTable
[key_f
]==1)||
1052 (KeyTable
[key_g
]==1))
1059 if( ((KeyTable
[key_a
]==0)&&
1060 (KeyTable
[key_s
]==0)&&
1061 (KeyTable
[key_d
]==0)&&
1062 (KeyTable
[key_f
]==0)&&
1063 (KeyTable
[key_g
]==0))&&(AnyKeyx()==1))
1070 ///////////////////////////////////////////////////////////////
1072 ///////////////////////////////////////////////////////////////
1091 ///////////////////////////////////////////////////////////////
1093 ///////////////////////////////////////////////////////////////
1094 void LastFirst(void)
1098 MIDASstopModule(modon
);
1108 PaletteSet(PALwhite
);
1110 PaletteSet(PALmain
);
1117 MIDASplaySample(wav
,6,255,6000+(cAIR
*((old
+1)*100)),64,MIDAS_PAN_MIDDLE
);
1118 MIDASplaySample(wav
,7,255,4000+(cAIR
*((old
+1)*100)),64,MIDAS_PAN_MIDDLE
);
1132 modon
=MIDASplayModuleSection(mod
,0x20,0x3b,0x20,TRUE
);
1136 ///////////////////////////////////////////////////////////////
1138 ///////////////////////////////////////////////////////////////
1147 PaletteFade(PALblack
,PALfade
);
1160 PaletteSet(PALfade
);
1173 ///////////////////////////////////////////////////////////////
1174 // Clear Last Screen
1175 ///////////////////////////////////////////////////////////////
1176 void LastClear(void)
1184 PaletteSet(PALmain
);
1196 ///////////////////////////////////////////////////////////////
1198 ///////////////////////////////////////////////////////////////
1199 void DrawHouse(void)
1208 PlotPixel(176+x
,y
,GFXhouse
[c
]);
1214 ///////////////////////////////////////////////////////////////
1216 ///////////////////////////////////////////////////////////////
1217 void DrawWindow(WORD block
)
1227 PlotPixel(184+x
,8+y
,GFXwin
[block
]);
1232 ///////////////////////////////////////////////////////////////
1234 ///////////////////////////////////////////////////////////////
1237 // MIDASplayStatus stat;
1238 // MIDASgetPlayStatus(modon,&stat);
1240 /* if(stat.pattern==14)
1245 MIDASstopModule(modon);
1254 MIDASstopModule(modon
);
1269 DrawWindow(WINDOW
[LASTc
]);
1274 ///////////////////////////////////////////////////////////////
1276 ///////////////////////////////////////////////////////////////
1293 ///////////////////////////////////////////////////////////////
1295 ///////////////////////////////////////////////////////////////
1296 void FadeUpText(void)
1307 INK
=(127-(TEXTink
>>2));
1309 FontPrint(0,11,EndText
[TEXTpoint
]);
1310 FontPrint(0,12,EndText
[TEXTpoint
+1]);
1311 FontPrint(0,13,EndText
[TEXTpoint
+2]);
1314 ///////////////////////////////////////////////////////////////
1316 ///////////////////////////////////////////////////////////////
1317 void FadeDownText(void)
1326 INK
=(127-(TEXTink
>>2));
1328 FontPrint(0,11,EndText
[TEXTpoint
]);
1329 FontPrint(0,12,EndText
[TEXTpoint
+1]);
1330 FontPrint(0,13,EndText
[TEXTpoint
+2]);
1332 ///////////////////////////////////////////////////////////////
1334 ///////////////////////////////////////////////////////////////
1335 void PauseText(void)
1337 FontPrint(0,11,EndText
[TEXTpoint
]);
1338 FontPrint(0,12,EndText
[TEXTpoint
+1]);
1339 FontPrint(0,13,EndText
[TEXTpoint
+2]);
1342 if(TEXTpause
==EndPause
[TEXTpoint
])