1 SPGCheckRobo(WORD x
, WORD y
);
2 GetBlock(WORD x
, WORD y
);
4 ///////////////////////////////////////////////////////////////
5 // Copy Level to Current Level
6 ///////////////////////////////////////////////////////////////
7 void CopyLevelInfo(void)
11 for(count1
=0;count1
<512;count1
++)
13 cMAP
[count1
]=map
[LEVEL
][count1
];
15 if(map
[LEVEL
][count1
]==4)
22 for(count1
=0;count1
<32;count1
++)
23 cTITLE
[count1
]=title
[LEVEL
][count1
];
26 cBGpaper
=BGpaper
[LEVEL
];
28 cPLAT1ink
=PLAT1ink
[LEVEL
];
29 cPLAT1paper
=PLAT1paper
[LEVEL
];
31 cPLAT2ink
=PLAT2ink
[LEVEL
];
32 cPLAT2paper
=PLAT2paper
[LEVEL
];
34 cWALLink
=WALLink
[LEVEL
];
35 cWALLpaper
=WALLpaper
[LEVEL
];
37 cCRUMBink
=CRUMBink
[LEVEL
];
38 cCRUMBpaper
=CRUMBpaper
[LEVEL
];
40 cKILL1ink
=KILL1ink
[LEVEL
];
41 cKILL1paper
=KILL1paper
[LEVEL
];
43 cKILL2ink
=KILL2ink
[LEVEL
];
44 cKILL2paper
=KILL2paper
[LEVEL
];
46 cCONVink
=CONVink
[LEVEL
];
47 cCONVpaper
=CONVpaper
[LEVEL
];
55 cBORDER
=BORDER
[LEVEL
];
57 cPLAT1gfx
=PLAT1gfx
[LEVEL
];
58 cPLAT2gfx
=PLAT2gfx
[LEVEL
];
59 cWALLgfx
=WALLgfx
[LEVEL
];
60 cCRUMBgfx
=CRUMBgfx
[LEVEL
];
61 cKILL1gfx
=KILL1gfx
[LEVEL
];
62 cKILL2gfx
=KILL2gfx
[LEVEL
];
63 cCONVgfx
=CONVgfx
[LEVEL
];
64 cEXITgfx
=EXITgfx
[LEVEL
];
65 cKEYgfx
=KEYgfx
[LEVEL
];
67 cWILLYx
=WILLYsx
[LEVEL
];
68 cWILLYy
=WILLYsy
[LEVEL
];
69 cWILLYd
=WILLYsd
[LEVEL
];
80 for(count1
=0;count1
<5;count1
++)
82 cKEYx
[count1
]=KEYx
[LEVEL
][count1
];
83 cKEYy
[count1
]=KEYy
[LEVEL
][count1
];
84 cKEYb
[count1
]=(count1
*2);
85 cKEYs
[count1
]=KEYs
[LEVEL
][count1
];
88 for(count1
=0;count1
<2;count1
++)
90 cSWITCHx
[count1
]=SWITCHx
[LEVEL
][count1
];
91 cSWITCHy
[count1
]=SWITCHy
[LEVEL
][count1
];
92 cSWITCHs
[count1
]=SWITCHs
[LEVEL
][count1
];
103 for(count1
=0;count1
<4;count1
++)
105 cHROBOink
[count1
]=HROBOink
[LEVEL
][count1
];
106 cHROBOpaper
[count1
]=HROBOpaper
[LEVEL
][count1
];
107 cHROBOx
[count1
]=HROBOx
[LEVEL
][count1
];
108 cHROBOy
[count1
]=HROBOy
[LEVEL
][count1
];
109 cHROBOmin
[count1
]=HROBOmin
[LEVEL
][count1
];
110 cHROBOmax
[count1
]=HROBOmax
[LEVEL
][count1
];
111 cHROBOd
[count1
]=HROBOd
[LEVEL
][count1
];
112 cHROBOs
[count1
]=HROBOs
[LEVEL
][count1
];
113 cHROBOgfx
[count1
]=HROBOgfx
[LEVEL
][count1
];
114 cHROBOflip
[count1
]=HROBOflip
[LEVEL
][count1
];
115 cHROBOanim
[count1
]=HROBOanim
[LEVEL
][count1
];
116 cHROBOxold
[count1
][0]=65535;
117 cHROBOxold
[count1
][1]=65535;
118 cHROBOyold
[count1
][0]=65535;
119 cHROBOyold
[count1
][1]=65535;
122 for(count1
=0;count1
<4;count1
++)
124 cVROBOink
[count1
]=VROBOink
[LEVEL
][count1
];
125 cVROBOpaper
[count1
]=VROBOpaper
[LEVEL
][count1
];
126 cVROBOx
[count1
]=VROBOx
[LEVEL
][count1
];
127 cVROBOy
[count1
]=VROBOy
[LEVEL
][count1
];
128 cVROBOmin
[count1
]=VROBOmin
[LEVEL
][count1
];
129 cVROBOmax
[count1
]=VROBOmax
[LEVEL
][count1
];
130 cVROBOd
[count1
]=VROBOd
[LEVEL
][count1
];
131 cVROBOs
[count1
]=VROBOs
[LEVEL
][count1
];
132 cVROBOgfx
[count1
]=VROBOgfx
[LEVEL
][count1
];
133 //cVROBOanim[count1]=VROBOanim[LEVEL][count1];
134 cVROBOanim
[count1
]=count1
;
135 cVROBOyold
[count1
][0]=65535;
136 cVROBOyold
[count1
][1]=65535;
137 cVROBOxold
[count1
][0]=65535;
138 cVROBOxold
[count1
][1]=65535;
191 for(count1
=0;count1
<3;count1
++)
193 SKYx
[count1
]=SKYpx
[count1
][SKYp
[count1
]];
194 SKYy
[count1
]=SKYpy
[count1
][SKYp
[count1
]];
197 SKYxold
[count1
][0]=65535;
198 SKYyold
[count1
][0]=65535;
199 SKYxold
[count1
][1]=65535;
200 SKYyold
[count1
][1]=65535;
203 for(count1
=0;count1
<64;count1
++)
205 SPGx
[0][count1
]=65535;
206 SPGy
[0][count1
]=65535;
207 SPGx
[1][count1
]=65535;
208 SPGy
[1][count1
]=65535;
214 for(count1
=0;count1
<768;count1
++)
216 PALfade
[count1
]=PALmain
[count1
];
228 ///////////////////////////////////////////////////////////////
229 // Draw Current Level
230 ///////////////////////////////////////////////////////////////
231 void DrawCurrentLevel(void)
238 for(ypos
=0;ypos
<16;ypos
++)
240 for(xpos
=0;xpos
<32;xpos
++)
242 block
=cMAP
[(ypos
*32)+xpos
];
247 DrawBGBlock(xpos
,ypos
);
250 DrawBlock(xpos
,ypos
,cPLAT1gfx
,cPLAT1ink
);
253 DrawBlock(xpos
,ypos
,cPLAT2gfx
,cPLAT2ink
);
256 DrawBlock(xpos
,ypos
,cWALLgfx
,cWALLink
);
259 DrawBlock(xpos
,ypos
,cCRUMBgfx
,cCRUMBink
);
262 DrawBlock(xpos
,ypos
,cKILL1gfx
,cKILL1ink
);
265 DrawBlock(xpos
,ypos
,cKILL2gfx
,cKILL2ink
);
270 if((LEVEL
==19)||(LEVEL
==39))
280 ///////////////////////////////////////////////////////////////
281 // Draw a BackGround Block
282 ///////////////////////////////////////////////////////////////
283 void DrawBGBlock(int xpos
,int ypos
)
294 PlotPixel(xpos
+x
,ypos
+y
,cBGpaper
);
299 ///////////////////////////////////////////////////////////////
301 ///////////////////////////////////////////////////////////////
302 void DrawBlock(int xpos
,int ypos
,BYTE block
, BYTE ink
)
317 data
=GFXblocks
[block2
];
320 PlotPixel(xpos
+x
,ypos
+y
,cBGpaper
);
322 PlotPixel(xpos
+x
,ypos
+y
,data
+(ink
*16));
329 ///////////////////////////////////////////////////////////////
330 // Draw a Convayor Block
331 ///////////////////////////////////////////////////////////////
332 void DrawConvBlock(int xpos
,int ypos
,BYTE block
,BYTE frame
)
334 int x
,y
,block2
,frame2
;
349 data
=GFXconv
[block2
];
352 PlotPixel(xpos
+x
,ypos
+y
,cBGpaper
);
354 PlotPixel(xpos
+x
,ypos
+y
,data
+(cCONVink
*16));
360 ///////////////////////////////////////////////////////////////
362 ///////////////////////////////////////////////////////////////
371 for(count
=0;count
<cCONVl
;count
++)
373 DrawConvBlock(cCONVx
+(count
*8),cCONVy
,cCONVgfx
,cCONVf
);
391 ///////////////////////////////////////////////////////////////
393 ///////////////////////////////////////////////////////////////
403 block2
=(WORD
)cEXITgfx
;
413 data
=GFXexit
[block2
];
416 PlotPixel(xpos
+x
,ypos
+y
,data
);
430 data
=GFXexit
[block2
];
435 temp
-=bright
[cEXITb
];
443 PlotPixel(xpos
+x
,ypos
+y
,data
);
455 ///////////////////////////////////////////////////////////////
457 ///////////////////////////////////////////////////////////////
458 void DrawKeyBlock(int xpos
,int ypos
,BYTE block
,BYTE shine
)
473 PlotPixel(xpos
+x
,ypos
+y
,cBGpaper
);
485 PlotPixel(xpos
+x
,ypos
+y
,data
);
491 ///////////////////////////////////////////////////////////////
493 ///////////////////////////////////////////////////////////////
504 if((cKEYx
[i
]!=65535)&&(cKEYy
[i
]!=65535))
506 DrawKeyBlock(cKEYx
[i
],cKEYy
[i
],cKEYgfx
,bright2
[cKEYb
[i
]]);
515 if((cKEYx
[i
]!=65535)&&(cKEYy
[i
]!=65535))
517 DrawBGBlock(cKEYx
[i
]/8,cKEYy
[i
]/8);
526 ///////////////////////////////////////////////////////////////
527 // Draw Level Title Plate
528 ///////////////////////////////////////////////////////////////
529 void DrawTPlate(void)
538 PlotPixel(x
,128+y
,GFXtplate
[(y
*256)+x
]);
542 FontPrint2(0,16,cTITLE
);
544 ///////////////////////////////////////////////////////////////
545 // Draw Air Background
546 ///////////////////////////////////////////////////////////////
556 PlotPixel(x
,136+y
,GFXair
[(y
*256)+x
]);
560 FontPrint2(0,17,"AIR");
562 ///////////////////////////////////////////////////////////////
564 ///////////////////////////////////////////////////////////////
586 PlotPixel(x
,138,GFXair
[512+x
]);
587 PlotPixel(x
,139,GFXair
[768+x
]);
588 PlotPixel(x
,140,GFXair
[1024+x
]);
589 PlotPixel(x
,141,GFXair
[1280+x
]);
592 PlotPixel(32,138,122);
593 PlotPixel(32,139,116);
594 PlotPixel(32,140,119);
595 PlotPixel(32,141,123);
597 for(x
=33;x
<(cAIR
-1);x
++)
599 PlotPixel(x
,138,120);
600 PlotPixel(x
,139,114);
601 PlotPixel(x
,140,117);
602 PlotPixel(x
,141,121);
605 PlotPixel(cAIR
-1,138,122);
606 PlotPixel(cAIR
-1,139,116);
607 PlotPixel(cAIR
-1,140,119);
608 PlotPixel(cAIR
-1,141,123);
612 ///////////////////////////////////////////////////////////////
613 // Draw a HORIZONTAL Robot
614 ///////////////////////////////////////////////////////////////
615 void DrawHRobo(WORD xpos
, WORD ypos
, WORD sprite
, BYTE col
)
617 int x
,y
,block2
,frame2
;
627 data
=GFXhrobo
[sprite
];
630 PlotPixel(xpos
+x
,ypos
+y
,data
+(col
*16));
636 ///////////////////////////////////////////////////////////////
637 // Do Horizontal Robots
638 ///////////////////////////////////////////////////////////////
646 if(cHROBOx
[i
]!=65535)
651 cHROBOx
[i
]-=(2>>cHROBOs
[i
]);
653 if(cHROBOx
[i
]<cHROBOmin
[i
])
656 cHROBOx
[i
]+=(2>>cHROBOs
[i
]);
657 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1),cHROBOink
[i
]);
660 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],(cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1))+cHROBOflip
[i
],cHROBOink
[i
]);
664 cHROBOx
[i
]+=(2>>cHROBOs
[i
]);
666 if(cHROBOx
[i
]>(cHROBOmax
[i
]+6))
669 cHROBOx
[i
]-=(2>>cHROBOs
[i
]);
670 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],(cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1))+cHROBOflip
[i
],cHROBOink
[i
]);
673 DrawHRobo((cHROBOx
[i
]&248),cHROBOy
[i
],cHROBOgfx
[i
]+((cHROBOx
[i
]&cHROBOanim
[i
])>>1),cHROBOink
[i
]);
676 cHROBOxold
[i
][old
]=cHROBOx
[i
]&248;
677 cHROBOyold
[i
][old
]=cHROBOy
[i
];
681 ///////////////////////////////////////////////////////////////
682 // Remove Horizontal Robots
683 ///////////////////////////////////////////////////////////////
684 void RemoveHRobo(void)
690 if(cHROBOxold
[i
][old
]!=65535)
696 PlotPixel(cHROBOxold
[i
][old
]+x
,cHROBOyold
[i
][old
]+y
,cBGpaper
);
703 ///////////////////////////////////////////////////////////////
704 // Draw a VERTICAL Robot
705 ///////////////////////////////////////////////////////////////
706 void DrawVRobo(WORD xpos
, WORD ypos
, WORD sprite
, BYTE col
)
708 int x
,y
,block2
,frame2
;
718 data
=GFXvrobo
[sprite
];
721 PlotPixel(xpos
+x
,ypos
+y
,data
+(col
*16));
727 ///////////////////////////////////////////////////////////////
728 // Do Vertical Robots
729 ///////////////////////////////////////////////////////////////
737 if(cVROBOx
[i
]!=65535)
742 cVROBOy
[i
]-=(cVROBOs
[i
]);
744 if((cVROBOy
[i
]<cVROBOmin
[i
])||(cVROBOy
[i
]>256))
747 cVROBOy
[i
]+=(cVROBOs
[i
]);
748 DrawVRobo(cVROBOx
[i
],cVROBOy
[i
],(cVROBOgfx
[i
]+cVROBOanim
[i
]),cVROBOink
[i
]);
751 DrawVRobo(cVROBOx
[i
],cVROBOy
[i
],(cVROBOgfx
[i
]+cVROBOanim
[i
]),cVROBOink
[i
]);
755 cVROBOy
[i
]+=(cVROBOs
[i
]);
757 if(cVROBOy
[i
]>cVROBOmax
[i
])
760 cVROBOy
[i
]-=(cVROBOs
[i
]);
761 DrawVRobo(cVROBOx
[i
],cVROBOy
[i
],(cVROBOgfx
[i
]+cVROBOanim
[i
]),cVROBOink
[i
]);
764 DrawVRobo(cVROBOx
[i
],cVROBOy
[i
],(cVROBOgfx
[i
]+cVROBOanim
[i
]),cVROBOink
[i
]);
769 cVROBOxold
[i
][old
]=cVROBOx
[i
];
770 cVROBOyold
[i
][old
]=cVROBOy
[i
];
774 ///////////////////////////////////////////////////////////////
775 // Remove Vertical Robots
776 ///////////////////////////////////////////////////////////////
777 void RemoveVRobo(void)
783 if(cVROBOxold
[i
][old
]!=65535)
789 PlotPixel(cVROBOxold
[i
][old
]+x
,cVROBOyold
[i
][old
]+y
,cBGpaper
);
795 ///////////////////////////////////////////////////////////////
796 // Draw Final Screen Background
797 ///////////////////////////////////////////////////////////////
807 data
=GFXfinal
[(y
*256)+x
];
810 PlotPixel(x
,y
,cBGpaper
);
817 ///////////////////////////////////////////////////////////////
819 ///////////////////////////////////////////////////////////////
820 void DrawSwitchBlock(int xpos
,int ypos
,BYTE block
)
832 data
=GFXswitch
[block2
];
835 PlotPixel(xpos
+x
,ypos
+y
,cBGpaper
);
838 PlotPixel(xpos
+x
,ypos
+y
,data
+((cPLAT2ink
-1)*16));
844 ///////////////////////////////////////////////////////////////
846 ///////////////////////////////////////////////////////////////
847 void DrawSwitches(void)
854 DrawSwitchBlock(cSWITCHx
[i
],cSWITCHy
[i
],cSWITCHs
[i
]-1);
857 ///////////////////////////////////////////////////////////////
859 ///////////////////////////////////////////////////////////////
860 void DoSpecialRobo(void)
900 ///////////////////////////////////////////////////////////////
902 ///////////////////////////////////////////////////////////////
903 void DrawEugene(WORD xpos
, WORD ypos
, BYTE col
)
915 data
=GFXeugene
[((y
*16)+x
)];
917 data
=GFXeugene
[256+((y
*16)+x
)];
920 PlotPixel(xpos
+x
,ypos
+y
,data
+(col
*16));
925 ///////////////////////////////////////////////////////////////
927 ///////////////////////////////////////////////////////////////
928 void RemoveEugene(void)
932 if(EUGENExold
[old
]!=65535)
938 PlotPixel(EUGENExold
[old
]+x
,EUGENEyold
[old
]+y
,cBGpaper
);
944 ///////////////////////////////////////////////////////////////
946 ///////////////////////////////////////////////////////////////
961 if(EUGENEy
<EUGENEmin
)
965 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
968 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
974 if(EUGENEy
>EUGENEmax
)
978 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
981 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
984 EUGENExold
[old
]=EUGENEx
;
985 EUGENEyold
[old
]=EUGENEy
;
996 if(EUGENEy
>EUGENEmax
)
999 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
1002 DrawEUGENE(EUGENEx
,EUGENEy
,EUGENEc
);
1004 EUGENExold
[old
]=EUGENEx
;
1005 EUGENEyold
[old
]=EUGENEy
;
1009 ///////////////////////////////////////////////////////////////
1011 ///////////////////////////////////////////////////////////////
1019 for(y
=0;y
<HOLEl
;y
++)
1023 PlotPixel(136+x
,HOLEy
+y
,cBGpaper
);
1032 cMAP
[((88/8)*32)+(136/8)]=0;
1033 cMAP
[((96/8)*32)+(136/8)]=0;
1042 PlotPixel(136+x
,88+y
,cBGpaper
);
1051 ///////////////////////////////////////////////////////////////
1052 // Level 7 "Miner Willy meets the Kong Beast"
1053 ///////////////////////////////////////////////////////////////
1054 void DoLevelSeven(void)
1081 ///////////////////////////////////////////////////////////////
1083 ///////////////////////////////////////////////////////////////
1084 void DoKongStood(void)
1086 DrawKong(KONGx
,KONGy
,KONGf
,KONGc
);
1088 KONGxold
[old
]=KONGx
;
1089 KONGyold
[old
]=KONGy
;
1092 ///////////////////////////////////////////////////////////////
1094 ///////////////////////////////////////////////////////////////
1095 void DoKongFall(void)
1102 cMAP
[((16/8)*32)+(120/8)]=0;
1103 cMAP
[((16/8)*32)+(128/8)]=0;
1105 DrawBGBlock(120/8,16/8);
1106 DrawBGBlock(128/8,16/8);
1108 DrawKong(KONGx
,KONGy
,KONGf
,KONGc
);
1109 KONGxold
[old
]=KONGx
;
1110 KONGyold
[old
]=KONGy
;
1116 DrawBGBlock(120/8,16/8);
1117 DrawBGBlock(128/8,16/8);
1119 DrawKong(KONGx
,KONGy
,KONGf
,KONGc
);
1120 KONGxold
[old
]=KONGx
;
1121 KONGyold
[old
]=KONGy
;
1130 MIDASplaySample(wav
,8,255,22050-(KONGy
*((old
+1)*50)),64,MIDAS_PAN_MIDDLE
);
1135 DrawKONG(KONGx
,KONGy
,KONGf
+2,KONGc
);
1140 DrawKONG(KONGx
,KONGy
,KONGf
+2,KONGc
);
1143 KONGxold
[old
]=KONGx
;
1144 KONGyold
[old
]=KONGy
;
1149 ///////////////////////////////////////////////////////////////
1151 ///////////////////////////////////////////////////////////////
1152 void DrawKong(int xpos
,int ypos
,BYTE block
, BYTE ink
)
1164 data
=GFXkong
[block2
];
1167 PlotPixel(xpos
+x
,ypos
+y
,data
+(ink
*16));
1173 ///////////////////////////////////////////////////////////////
1175 ///////////////////////////////////////////////////////////////
1176 void RemoveKong(void)
1180 if(KONGxold
[old
]!=65535)
1186 PlotPixel(KONGxold
[old
]+x
,KONGyold
[old
]+y
,cBGpaper
);
1191 ///////////////////////////////////////////////////////////////
1193 ///////////////////////////////////////////////////////////////
1194 void DrawSky(int xpos
,int ypos
,BYTE block
, BYTE ink
)
1206 data
=GFXsky
[block2
];
1209 PlotPixel(xpos
+x
,ypos
+y
,data
+(ink
*16));
1215 ///////////////////////////////////////////////////////////////
1217 ///////////////////////////////////////////////////////////////
1218 void RemoveSky(void)
1224 if(SKYxold
[i
][old
]!=65535)
1230 PlotPixel(SKYxold
[i
][old
]+x
,SKYyold
[i
][old
]+y
,cBGpaper
);
1236 ///////////////////////////////////////////////////////////////
1237 // Level 13 " Skylab Landing Bay "
1238 ///////////////////////////////////////////////////////////////
1239 void DoLevelThirteen(void)
1250 if(SKYy
[i
]>SKYmax
[i
])
1256 DrawSky(SKYx
[i
],SKYy
[i
],SKYf
[i
],SKYc
[i
]);
1259 DrawSky(SKYx
[i
],SKYy
[i
],SKYf
[i
],SKYc
[i
]);
1269 DrawSky(SKYx
[i
],SKYy
[i
],SKYf
[i
],SKYc
[i
]);
1276 SKYx
[i
]=SKYpx
[i
][SKYp
[i
]];
1277 SKYy
[i
]=SKYpy
[i
][SKYp
[i
]];
1284 SKYxold
[i
][old
]=SKYx
[i
];
1285 SKYyold
[i
][old
]=SKYy
[i
];
1289 ///////////////////////////////////////////////////////////////
1291 ///////////////////////////////////////////////////////////////
1292 void DrawSPGBlock(int x
, int y
)
1304 data
=GetPixel(x
+c2
,y
+c1
);
1313 PlotPixel(x
+c2
,y
+c1
,data
);
1319 ///////////////////////////////////////////////////////////////
1321 ///////////////////////////////////////////////////////////////
1322 void RemoveSPG(void)
1328 if(SPGx
[old
][i
]!=65535)
1329 DrawBGBlock(SPGx
[old
][i
],SPGy
[old
][i
]);
1335 ///////////////////////////////////////////////////////////////
1337 ///////////////////////////////////////////////////////////////
1340 int x
,y
,i
,done
,blockhit
,robohit
;
1359 blockhit
=cMAP
[(y
*32)+x
];
1360 robohit
=SPGCheckRobo(x
,y
);
1362 //------------------------------------------------------------------------------
1364 if( (blockhit
!=0)&&(robohit
!=0) )
1371 //------------------------------------------------------------------------------
1373 if( (blockhit
==0)&&(robohit
!=0) )
1375 if((SPGx
[old
][i
-1]==x
)&&(SPGy
[old
][i
-1]==y
))
1390 //------------------------------------------------------------------------------
1392 if( (blockhit
==0)&&(robohit
==0) )
1399 //------------------------------------------------------------------------------
1401 if( (blockhit
!=0)&&(robohit
==0) )
1403 if((SPGx
[old
][i
-1]==x
)&&(SPGy
[old
][i
-1]==y
))
1413 //------------------------------------------------------------------------------
1420 blockhit
=cMAP
[(y
*32)+x
];
1422 if((y
==15)||(blockhit
!=0))
1432 blockhit
=cMAP
[(y
*32)+x
];
1434 if((x
==0)||(blockhit
!=0))
1466 //------------------------------------------------------------------------------
1475 ///////////////////////////////////////////////////////////////
1476 // Check if hit Robo
1477 ///////////////////////////////////////////////////////////////
1478 int SPGCheckRobo(WORD x
, WORD y
)
1490 if(cHROBOx
[i
]!=65535)
1492 if( ((x
+7)>=cHROBOx
[i
]) && (x
<=(cHROBOx
[i
]+15)) &&
1493 ((y
+7)>=cHROBOy
[i
]) && (y
<=(cHROBOy
[i
]+15)))
1499 if(cVROBOx
[i
]!=65535)
1501 if( ((x
+7)>=cVROBOx
[i
]) && (x
<=(cVROBOx
[i
]+15)) &&
1502 ((y
+7)>=cVROBOy
[i
]) && (y
<=(cVROBOy
[i
]+15)))
1512 ///////////////////////////////////////////////////////////////
1513 // Do the Solar Power Generator
1514 ///////////////////////////////////////////////////////////////
1523 if(SPGx
[old
][i
]!=65535)
1525 DrawSPGBlock(SPGx
[old
][i
],SPGy
[old
][i
]);
1531 ///////////////////////////////////////////////////////////////
1533 ///////////////////////////////////////////////////////////////
1540 if(SPGx
[old
][i
]!=65535)
1544 if(((SPGx
[old
][i
]*8)>=cWILLYx
)&&((SPGy
[old
][i
]*8)>=cWILLYy
))
1546 if( ((SPGx
[old
][i
]*8)<(cWILLYx
+8))&&((SPGy
[old
][i
]*8)<(cWILLYy
+16)) )
1556 if((((SPGx
[old
][i
]*8)+7)>=cWILLYx
)&&((SPGy
[old
][i
]*8)>=cWILLYy
))
1558 if( (((SPGx
[old
][i
]*8)+7)<(cWILLYx
+8))&&((SPGy
[old
][i
]*8)<(cWILLYy
+16)) )
1568 if(((SPGx
[old
][i
]*8)>=cWILLYx
)&&(((SPGy
[old
][i
]*8)+7)>=cWILLYy
))
1570 if( ((SPGx
[old
][i
]*8)<(cWILLYx
+8))&&(((SPGy
[old
][i
]*8)+7)<(cWILLYy
+16)) )
1580 if((((SPGx
[old
][i
]*8)+7)>=cWILLYx
)&&(((SPGy
[old
][i
]*8)+7)>=cWILLYy
))
1582 if( (((SPGx
[old
][i
]*8)+7)<(cWILLYx
+8))&&(((SPGy
[old
][i
]*8)+7)<(cWILLYy
+16)) )
1598 ///////////////////////////////////////////////////////////////
1600 ///////////////////////////////////////////////////////////////
1601 void DrawWilly(int xpos
,int ypos
,BYTE block
)
1613 data
=GFXwilly
[block2
];
1617 if(GetPixel(xpos
+x
,ypos
+y
)==cBGpaper
)
1618 PlotPixel(xpos
+x
,ypos
+y
,data
);
1624 ///////////////////////////////////////////////////////////////
1625 // Get Willy Background
1626 ///////////////////////////////////////////////////////////////
1627 void GetWillyBG(int xpos
, int ypos
)
1636 cWILLYbuff
[old
][(y
*16)+x
]=GetPixel(xpos
+x
,ypos
+y
);
1640 ///////////////////////////////////////////////////////////////
1642 ///////////////////////////////////////////////////////////////
1643 void RemoveWilly(void)
1647 if(cWILLYxold
[old
]!=65535)
1653 PlotPixel(cWILLYxold
[old
]+x
,cWILLYyold
[old
]+y
,cWILLYbuff
[old
][(y
*16)+x
]);
1659 ///////////////////////////////////////////////////////////////
1663 // 0=Walking Left\Right
1671 ///////////////////////////////////////////////////////////////
1674 int input
,block1
,block2
;
1676 input
=GetWillyInput();
1678 //------------------------------------------------------------------------------
1679 if(CheckWillyKillBlock()!=0)
1681 //------------------------------------------------------------------------------
1682 if(WillyCheckRobo()!=0)
1684 //------------------------------------------------------------------------------
1689 //------------------------------------------------------------------------------
1692 //------------------------------------------------------------------------------
1698 if((CheckWillyConv()==1)&&(cCONVd
==0))
1713 if((CheckWillyConv()==1)&&(cCONVd
==1))
1734 if(CheckWillyConv()==1)
1765 if((CheckWillyConv()==1)&&(cCONVd
==0))
1778 if((CheckWillyConv()==1)&&(cCONVd
==0))
1805 if((CheckWillyConv()==1)&&(cCONVd
==1))
1819 if((CheckWillyConv()==1)&&(cCONVd
==1))
1838 if(CheckWillyConv()!=0)
1851 //------------------------------------------------------------------------------
1855 //------------------------------------------------------------------------------
1860 //------------------------------------------------------------------------------
1865 //------------------------------------------------------------------------------
1869 //------------------------------------------------------------------------------
1873 //------------------------------------------------------------------------------
1878 //------------------------------------------------------------------------------
1882 //------------------------------------------------------------------------------
1884 cWILLYxold
[old
]=cWILLYx
&248;
1885 cWILLYyold
[old
]=cWILLYy
;
1889 ///////////////////////////////////////////////////////////////
1891 ///////////////////////////////////////////////////////////////
1892 void DoWillyLeft(void)
1894 int block1
,block2
,block3
;
1904 block1
=GetBlock(cWILLYx
,cWILLYy
);
1905 block2
=GetBlock(cWILLYx
,cWILLYy
+8);
1906 block3
=GetBlock(cWILLYx
,cWILLYy
+12);
1907 if((block1
==3)||(block2
==3)||(block3
==3))
1914 ///////////////////////////////////////////////////////////////
1916 ///////////////////////////////////////////////////////////////
1917 void DoWillyRight(void)
1919 int block1
,block2
,block3
;
1929 block1
=GetBlock(cWILLYx
+8,cWILLYy
);
1930 block2
=GetBlock(cWILLYx
+8,cWILLYy
+8);
1931 block3
=GetBlock(cWILLYx
+8,cWILLYy
+12);
1932 if((block1
==3)||(block2
==3)||(block3
==3))
1938 ///////////////////////////////////////////////////////////////
1940 ///////////////////////////////////////////////////////////////
1941 void DoWillyJump(void)
1947 cWILLYy
-=cWILLYjp
[cWILLYj
];
1949 block1
=GetBlock(cWILLYx
,cWILLYy
);
1950 block2
=GetBlock(cWILLYx
+8,cWILLYy
);
1951 if((block1
==3)||(block2
==3))
1965 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
1966 block2
=GetBlock(cWILLYx
+8,cWILLYy
+16);
1967 if((block1
!=0)||(block2
!=0))
1971 if((block1
==7)||(block2
==7))
1983 cWILLYy
+=cWILLYjp
[cWILLYj
];
1988 cWILLYy
+=cWILLYjp
[cWILLYj
];
1994 cWILLYy
+=cWILLYjp
[cWILLYj
];
2000 cWILLYfall
+=cWILLYjp
[cWILLYj
];
2021 MIDASplaySample(wav
,6,255,16384+(cWILLYjs
*1500),64,MIDAS_PAN_MIDDLE
);
2031 ///////////////////////////////////////////////////////////////
2033 ///////////////////////////////////////////////////////////////
2034 void CheckWillyFall(void)
2038 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
2039 block2
=GetBlock(cWILLYx
+8,cWILLYy
+16);
2040 if((block1
==0)&&(block2
==0))
2047 if((block1
==5)||(block2
==5)||(block1
==6)||(block2
==6))
2053 ///////////////////////////////////////////////////////////////
2055 ///////////////////////////////////////////////////////////////
2056 void DoWillyFall(void)
2065 MIDASplaySample(wav
,6,255,16384-(cWILLYjs
*1000),64,MIDAS_PAN_MIDDLE
);
2067 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
2068 block2
=GetBlock(cWILLYx
+8,cWILLYy
+16);
2069 if((block1
!=0)||(block2
!=0))
2074 if(CheckWillyConv()==1)
2090 ///////////////////////////////////////////////////////////////
2092 ///////////////////////////////////////////////////////////////
2097 GetWillyBG((cWILLYx
&248),cWILLYy
);
2098 DrawWILLY((cWILLYx
&248),cWILLYy
,((cWILLYx
&15)>>1)+8);
2102 GetWillyBG((cWILLYx
&248),cWILLYy
);
2103 DrawWILLY((cWILLYx
&248),cWILLYy
,((cWILLYx
&15)>>1));
2108 ///////////////////////////////////////////////////////////////
2110 ///////////////////////////////////////////////////////////////
2111 int GetWillyInput(void)
2117 if( (KeyTable
[key_q
]==1) ||
2118 (KeyTable
[key_e
]==1) ||
2119 (KeyTable
[key_tee
]==1) ||
2120 (KeyTable
[key_u
]==1) ||
2121 (KeyTable
[key_o
]==1) ||
2122 (KeyTable
[key_n4
]==1) ||
2123 (KeyTable
[key_opensqu
]==1) )
2128 if( (KeyTable
[key_tab
]==1) ||
2129 (KeyTable
[key_w
]==1) ||
2130 (KeyTable
[key_r
]==1) ||
2131 (KeyTable
[key_y
]==1) ||
2132 (KeyTable
[key_i
]==1) ||
2133 (KeyTable
[key_p
]==1) ||
2134 (KeyTable
[key_n6
]==1) ||
2135 (KeyTable
[key_closedsqu
]==1) )
2140 if( (KeyTable
[key_leftshift
]==1) ||
2141 (KeyTable
[key_backslash
]==1) ||
2142 (KeyTable
[key_z
]==1) ||
2143 (KeyTable
[key_x
]==1) ||
2144 (KeyTable
[key_c
]==1) ||
2145 (KeyTable
[key_v
]==1) ||
2146 (KeyTable
[key_b
]==1) ||
2147 (KeyTable
[key_n
]==1) ||
2148 (KeyTable
[key_m
]==1) ||
2149 (KeyTable
[key_n8
]==1) ||
2150 (KeyTable
[key_comma
]==1) ||
2151 (KeyTable
[key_stop
]==1) ||
2152 (KeyTable
[key_fwdslash
]==1) ||
2153 (KeyTable
[key_rightshift
]==1) ||
2154 (KeyTable
[key_space
]==1) )
2160 return(left
|right
|jump
);
2162 ///////////////////////////////////////////////////////////////
2164 ///////////////////////////////////////////////////////////////
2165 int GetBlock(WORD x
, WORD y
)
2169 data
=cMAP
[ (((y
/8)*32)+(x
/8)) ];
2172 ///////////////////////////////////////////////////////////////
2173 // Check Willy Against Kill Blocks
2174 ///////////////////////////////////////////////////////////////
2175 int CheckWillyKillBlock(void)
2184 block1
=GetBlock(cWILLYx
,cWILLYy
);
2185 block2
=GetBlock(cWILLYx
+8,cWILLYy
+8);
2186 block3
=GetBlock(cWILLYx
,cWILLYy
+8);
2187 block4
=GetBlock(cWILLYx
+8,cWILLYy
);
2188 block5
=GetBlock(cWILLYx
,cWILLYy
+14);
2189 block6
=GetBlock(cWILLYx
+8,cWILLYy
+14);
2191 if((block1
==5)||(block2
==5)||
2192 (block3
==5)||(block4
==5)||
2193 (block5
==5)||(block6
==5))
2198 if((block1
==6)||(block2
==6)||
2199 (block3
==6)||(block4
==6)||
2200 (block5
==6)||(block6
==6))
2207 ///////////////////////////////////////////////////////////////
2208 // Check if hit Robo
2209 ///////////////////////////////////////////////////////////////
2210 int WillyCheckRobo(void)
2219 if(cHROBOx
[i
]!=65535)
2221 if(((cWILLYx
+7)>cHROBOx
[i
])&&(cWILLYy
>cHROBOy
[i
]))
2223 if( ((cWILLYx
+7)<(cHROBOx
[i
]+16))&&(cWILLYy
+2<(cHROBOy
[i
]+16)) )
2229 if(((cWILLYx
+8)>cHROBOx
[i
])&&(cWILLYy
>cHROBOy
[i
]))
2231 if( ((cWILLYx
+8)<(cHROBOx
[i
]+16))&&(cWILLYy
<(cHROBOy
[i
]+16)) )
2237 if(((cWILLYx
+7)>cHROBOx
[i
])&&((cWILLYy
+13)>cHROBOy
[i
]))
2239 if( ((cWILLYx
+7)<(cHROBOx
[i
]+16))&&((cWILLYy
+13)<(cHROBOy
[i
]+16)) )
2245 if(((cWILLYx
+8)>cHROBOx
[i
])&&((cWILLYy
+13)>cHROBOy
[i
]))
2247 if( ((cWILLYx
+8)<(cHROBOx
[i
]+16))&&((cWILLYy
+13)<(cHROBOy
[i
]+16)) )
2255 if(cVROBOx
[i
]!=65535)
2257 if(((cWILLYx
+3)>cVROBOx
[i
])&&((cWILLYy
+3)>cVROBOy
[i
]))
2259 if( ((cWILLYx
+3)<(cVROBOx
[i
]+16))&&((cWILLYy
+3)<(cVROBOy
[i
]+16)) )
2265 if(((cWILLYx
+7)>cVROBOx
[i
])&&((cWILLYy
+3)>cVROBOy
[i
]))
2267 if( ((cWILLYx
+7)<(cVROBOx
[i
]+16))&&((cWILLYy
+3)<(cVROBOy
[i
]+16)) )
2273 if(((cWILLYx
+3)>cVROBOx
[i
])&&((cWILLYy
+11)>cVROBOy
[i
]))
2275 if( ((cWILLYx
+3)<(cVROBOx
[i
]+16))&&((cWILLYy
+11)<(cVROBOy
[i
]+16)) )
2281 if(((cWILLYx
+7)>cVROBOx
[i
])&&((cWILLYy
+11)>cVROBOy
[i
]))
2283 if( ((cWILLYx
+7)<(cVROBOx
[i
]+16))&&((cWILLYy
+11)<(cVROBOy
[i
]+16)) )
2292 if((LEVEL
==4)||(LEVEL
==24))
2294 if(((cWILLYx
+7)>EUGENEx
)&&(cWILLYy
>EUGENEy
))
2296 if( ((cWILLYx
+7)<(EUGENEx
+16))&&(cWILLYy
<(EUGENEy
+16)) )
2302 if(((cWILLYx
+8)>EUGENEx
)&&(cWILLYy
>EUGENEy
))
2304 if( ((cWILLYx
+8)<(EUGENEx
+16))&&(cWILLYy
<(EUGENEy
+16)) )
2310 if(((cWILLYx
+7)>EUGENEx
)&&((cWILLYy
+15)>EUGENEy
))
2312 if( ((cWILLYx
+7)<(EUGENEx
+16))&&((cWILLYy
+15)<(EUGENEy
+16)) )
2318 if(((cWILLYx
+8)>EUGENEx
)&&((cWILLYy
+15)>EUGENEy
))
2320 if( ((cWILLYx
+8)<(EUGENEx
+16))&&((cWILLYy
+15)<(EUGENEy
+16)) )
2328 if(((LEVEL
==7)||(LEVEL
==11)||(LEVEL
==27)||(LEVEL
==31))&&(KONGm
!=3))
2330 if(((cWILLYx
+7)>KONGx
)&&(cWILLYy
>KONGy
))
2332 if( ((cWILLYx
+7)<(KONGx
+16))&&(cWILLYy
<(KONGy
+16)) )
2338 if(((cWILLYx
+8)>KONGx
)&&(cWILLYy
>KONGy
))
2340 if( ((cWILLYx
+8)<(KONGx
+16))&&(cWILLYy
<(KONGy
+16)) )
2346 if(((cWILLYx
+7)>KONGx
)&&((cWILLYy
+15)>KONGy
))
2348 if( ((cWILLYx
+7)<(KONGx
+16))&&((cWILLYy
+15)<(KONGy
+16)) )
2354 if(((cWILLYx
+8)>KONGx
)&&((cWILLYy
+15)>KONGy
))
2356 if( ((cWILLYx
+8)<(KONGx
+16))&&((cWILLYy
+15)<(KONGy
+16)) )
2364 if((LEVEL
==13)||(LEVEL
==33))
2369 if(((cWILLYx
+7)>SKYx
[i
])&&(cWILLYy
>SKYy
[i
]))
2371 if( ((cWILLYx
+7)<(SKYx
[i
]+16))&&(cWILLYy
<(SKYy
[i
]+16)) )
2377 if(((cWILLYx
+8)>SKYx
[i
])&&(cWILLYy
>SKYy
[i
]))
2379 if( ((cWILLYx
+8)<(SKYx
[i
]+16))&&(cWILLYy
<(SKYy
[i
]+16)) )
2385 if(((cWILLYx
+7)>SKYx
[i
])&&((cWILLYy
+15)>SKYy
[i
]))
2387 if( ((cWILLYx
+7)<(SKYx
[i
]+16))&&((cWILLYy
+15)<(SKYy
[i
]+16)) )
2393 if(((cWILLYx
+8)>SKYx
[i
])&&((cWILLYy
+15)>SKYy
[i
]))
2395 if( ((cWILLYx
+8)<(SKYx
[i
]+16))&&((cWILLYy
+15)<(SKYy
[i
]+16)) )
2406 ///////////////////////////////////////////////////////////////
2408 ///////////////////////////////////////////////////////////////
2409 void CheckKeys(void)
2419 if((cKEYx
[i
]>=cWILLYx
)&&(cKEYy
[i
]>=cWILLYy
))
2421 if( (cKEYx
[i
]<(cWILLYx
+10))&&(cKEYy
[i
]<(cWILLYy
+18)) )
2429 if(((cKEYx
[i
]+7)>=cWILLYx
)&&(cKEYy
[i
]>=cWILLYy
))
2431 if( ((cKEYx
[i
]+7)<(cWILLYx
+10))&&(cKEYy
[i
]<(cWILLYy
+18)) )
2442 if((cKEYx
[i
]>=cWILLYx
)&&((cKEYy
[i
]+7)>=cWILLYy
))
2444 if( (cKEYx
[i
]<(cWILLYx
+10))&&((cKEYy
[i
]+7)<(cWILLYy
+18)) )
2455 if(((cKEYx
[i
]+7)>=cWILLYx
)&&((cKEYy
[i
]+7)>=cWILLYy
))
2457 if( ((cKEYx
[i
]+7)<(cWILLYx
+10))&&((cKEYy
[i
]+7)<(cWILLYy
+18)) )
2473 MIDASplaySample(pick
,8,300,22050,64,MIDAS_PAN_MIDDLE
);
2476 ///////////////////////////////////////////////////////////////
2478 ///////////////////////////////////////////////////////////////
2479 void CheckSwitches(void)
2487 if((cSWITCHx
[i
]+7>=cWILLYx
)&&(cSWITCHy
[i
]+7>=cWILLYy
)&&
2488 (cSWITCHx
[i
]<cWILLYx
+8)&&(cSWITCHy
[i
]<cWILLYy
+16))
2496 ///////////////////////////////////////////////////////////////
2498 ///////////////////////////////////////////////////////////////
2499 void CheckCrumb(void)
2503 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
2507 cCRUMB
[(((cWILLYy
+16)/8)*32)+(cWILLYx
/8)]&=31;
2508 cCRUMB
[(((cWILLYy
+16)/8)*32)+(cWILLYx
/8)]--;
2509 cCRUMB
[(((cWILLYy
+16)/8)*32)+(cWILLYx
/8)]|=128;
2511 if(cCRUMB
[(((cWILLYy
+16)/8)*32)+(cWILLYx
/8)]==128)
2513 cMAP
[(((cWILLYy
+16)/8)*32)+(cWILLYx
/8)]=0;
2522 block1
=GetBlock(cWILLYx
+8,cWILLYy
+16);
2525 cCRUMB
[(((cWILLYy
+16)/8)*32)+((cWILLYx
+8)/8)]&=31;
2526 cCRUMB
[(((cWILLYy
+16)/8)*32)+((cWILLYx
+8)/8)]--;
2527 cCRUMB
[(((cWILLYy
+16)/8)*32)+((cWILLYx
+8)/8)]|=128;
2529 if(cCRUMB
[(((cWILLYy
+16)/8)*32)+((cWILLYx
+8)/8)]==128)
2531 cMAP
[(((cWILLYy
+16)/8)*32)+((cWILLYx
+8)/8)]=0;
2540 ///////////////////////////////////////////////////////////////
2542 ///////////////////////////////////////////////////////////////
2554 data
=cCRUMB
[(y
*32)+x
];
2556 if(((data
&128)==128)||((data
&64)==64))
2558 for(dy
=0;dy
<(8-(data
&31));dy
++)
2562 PlotPixel((x
*8)+dx
,(y
*8)+dy
,cBGpaper
);
2569 block2
=(WORD
)cCRUMBgfx
;
2573 for(cy
=0;cy
<(data
&31);cy
++)
2577 data2
=GFXblocks
[block2
];
2580 PlotPixel(dx
+cx
,(dy
+doff
)+cy
,cBGpaper
);
2582 PlotPixel(dx
+cx
,(dy
+doff
)+cy
,data2
+(cCRUMBink
*16));
2589 cCRUMB
[(y
*32)+x
]&=31;
2590 cCRUMB
[(y
*32)+x
]|=64;
2596 cCRUMB
[(y
*32)+x
]&=31;
2607 ///////////////////////////////////////////////////////////////
2609 ///////////////////////////////////////////////////////////////
2610 void CheckExit(void)
2616 if(((cWILLYx
+4)>cEXITx
)&&((cWILLYy
+8)>cEXITy
))
2618 if( ((cWILLYx
+4)<(cEXITx
+16))&&((cWILLYy
+8)<(cEXITy
+16)) )
2625 if( ((cWILLYx
+5)>cEXITx
)&&((cWILLYy
+8)>cEXITy
) )
2627 if(((cWILLYx
+5)<(cEXITx
+16))&&((cWILLYy
+8)<(cEXITy
+16)))
2634 if( ((cWILLYx
+4)>cEXITx
)&&((cWILLYy
+9)>cEXITy
) )
2636 if(((cWILLYx
+4)<(cEXITx
+16))&&((cWILLYy
+9)<(cEXITy
+16)))
2642 if(((cWILLYx
+5)>cEXITx
)&&((cWILLYy
+9)>cEXITy
))
2644 if(((cWILLYx
+5)<(cEXITx
+16))&&((cWILLYy
+9)<(cEXITy
+16)))
2652 if(((LEVEL
==19)||(LEVEL
==39))&&(GAMEm
==3))
2666 ///////////////////////////////////////////////////////////////
2668 ///////////////////////////////////////////////////////////////
2669 int CheckWillyConv(void)
2673 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
2674 block2
=GetBlock(cWILLYx
+8,cWILLYy
+16);
2675 if((block1
==7)||(block2
==7))
2683 ///////////////////////////////////////////////////////////////
2685 ///////////////////////////////////////////////////////////////
2686 void DoOnConv(int input
)
2699 ///////////////////////////////////////////////////////////////
2700 // On Convayor going Left
2702 // 0=walking/check input
2706 ///////////////////////////////////////////////////////////////
2707 void DoConvLeft(int input
)
2711 //------------------------------------------------------------------------------
2748 if(CheckWillyConv()==0)
2755 if(CheckWillyConv()==0)
2762 //------------------------------------------------------------------------------
2766 //------------------------------------------------------------------------------
2775 ///////////////////////////////////////////////////////////////
2776 // On Convayor going Right
2778 // 0=walking/check input
2782 ///////////////////////////////////////////////////////////////
2783 void DoConvRight(int input
)
2787 //------------------------------------------------------------------------------
2822 if(CheckWillyConv()==0)
2829 if(CheckWillyConv()==0)
2836 //------------------------------------------------------------------------------
2840 //------------------------------------------------------------------------------
2848 ///////////////////////////////////////////////////////////////
2850 ///////////////////////////////////////////////////////////////
2851 void DoWillyLeftConv(void)
2853 int block1
,block2
,block3
;
2863 block1
=GetBlock(cWILLYx
,cWILLYy
);
2864 block2
=GetBlock(cWILLYx
,cWILLYy
+8);
2865 block3
=GetBlock(cWILLYx
,cWILLYy
+12);
2866 if((block1
==3)||(block2
==3)||(block3
==3))
2872 ///////////////////////////////////////////////////////////////
2874 ///////////////////////////////////////////////////////////////
2875 void DoWillyRightConv(void)
2877 int block1
,block2
,block3
;
2887 block1
=GetBlock(cWILLYx
+8,cWILLYy
);
2888 block2
=GetBlock(cWILLYx
+8,cWILLYy
+8);
2889 block3
=GetBlock(cWILLYx
+8,cWILLYy
+12);
2890 if((block1
==3)||(block2
==3)||(block3
==3))
2896 ///////////////////////////////////////////////////////////////
2898 ///////////////////////////////////////////////////////////////
2899 void DoWillyJumpConv(void)
2905 cWILLYy
-=cWILLYjp
[cWILLYj
];
2907 block1
=GetBlock(cWILLYx
,cWILLYy
);
2908 block2
=GetBlock(cWILLYx
+8,cWILLYy
);
2909 if((block1
==3)||(block2
==3))
2923 block1
=GetBlock(cWILLYx
,cWILLYy
+16);
2924 block2
=GetBlock(cWILLYx
+8,cWILLYy
+16);
2925 if((block1
!=0)||(block2
!=0))
2927 if((block1
==7)||(block2
==7))
2941 cWILLYy
+=cWILLYjp
[cWILLYj
];
2946 cWILLYy
+=cWILLYjp
[cWILLYj
];
2952 cWILLYy
+=cWILLYjp
[cWILLYj
];
2958 cWILLYfall
+=cWILLYjp
[cWILLYj
];
2965 if(CheckWillyConv()==0)
2985 MIDASplaySample(wav
,6,255,16384+(cWILLYjs
*1500),64,MIDAS_PAN_MIDDLE
);
2997 ///////////////////////////////////////////////////////////////
2999 ///////////////////////////////////////////////////////////////
3006 MIDASstopModule(modon
);
3009 MIDASplaySample(die
,7,512,22050,64,MIDAS_PAN_MIDDLE
);