static inline void RunPreLevelTasks(void) { fc=fc; register GameGlobals *ggg asm("a4") = gg; switch(ggg->current_level) { case 1: ggg->automove = TRUE; ggg->autokeys = TRUE; memset(ggg->HUDlight,0x00,576*sizeof(short)); memset(ggg->HUDdark,0x00,576*sizeof(short)); memset(ggg->HUDmask,0xFF,576*sizeof(short)); ProcessTextScrolling(level1pre); break; case 2: ggg->player.life = 9; ProcessTextScrolling(level2pre); break; case 3: ProcessTextScrolling(level3pre); ggg->levelstyle = level_fadeIntoDistance; break; case 8: ggg->levelstyle = level_killAllEnemiesToExit; break; case 9: ggg->levelstyle = level_killAllEnemiesToExit; break; case 10: ggg->levelstyle = level_findWorkingVehicle; break; case 11: ggg->levelstyle = level_vehicle; ProcessTextScrolling(level11pre); break; case 12: ggg->levelstyle = level_killGuardianToContinue; ProcessTextScrolling(level12pre); break; case 13: ggg->levelstyle = level_killAllEnemiesToExit; break; case 14: ProcessTextScrolling(level14pre); break; case 18: ggg->levelstyle = level_fadeIntoDistance; break; case 20: ggg->player.life = 100; ggg->player.armor = 200; ggg->cur_orientation = ANGLE_SOUTH; ggg->automove = TRUE; ggg->autokeys = TRUE; break; case 21: ResetWeapons(); ggg->player.life = 50; ggg->player.armor = 50; break; case 24: ProcessTextScrolling(level24pre); break; case 25: ProcessTextScrolling(level25pre); ggg->levelstyle = level_killGuardianToContinue; break; case 30: ggg->levelstyle = level_destroyAllMonitors; break; case 31: ggg->levelstyle = level_destroyAllPanels; break; case 35: ggg->levelstyle = level_destroyAllMonitors; break; case 36: ProcessTextScrolling(level36pre); ggg->levelstyle = level_destroyAllGenerators; break; case 37: ggg->levelstyle = level_killAllEnemiesToExit; break; } } static inline void RunPostLevelTasks(void) { fc=fc; register GameGlobals *ggg asm("a4") = gg; switch(ggg->current_level) { case 1: //Ship crashes into the planet { short a,b; for(a=1;a<=7;a++) { ggg->invert = a; for(b=1;b<=a;b++) FAT_Render(fc); for(b=1;b<=a;b++) FAT_Render(fc); } ggg->invert = 10; while(ggg->invert) FAT_Render(fc); BlackGrayScreen2B(ggg->BGlight,ggg->BGdark); dissolveGSFromTo(ggg->BGlight,ggg->BGdark,ggg->plane1,ggg->plane2); unsigned long count = int5_counter; while(int5_counter < count+25) continue; } break; case 19: ProcessTextScrolling(level19post); break; case 20: ProcessTextScrolling(level20post); break; case 25: portalEffects(); break; case 30: handleElevator(); break; case 31: handleElevator(); break; case 32: handleElevator(); break; case 33: handleElevator(); break; case 34: handleElevator(); break; case 35: handleElevator(); break; case 36: handleElevator(); break; case 37: handleElevator(); break; case 38: BlackGrayScreen2B(ggg->BGlight,ggg->BGdark); dissolveGSFromTo(ggg->BGlight,ggg->BGdark,ggg->plane1,ggg->plane2); ProcessTextScrolling(level38post); ProcessTextScrolling(creditscroll); break; } }