PUBLIC void INTRO_DoIntro(void) { LLK_LastScan = 0; LLS_Init(LLSM_DIRECT, LLSVM_MODE13); VGA_ZeroPalette(); Intro1("wwsplash", 320, 200); if (Wait(200)) goto bye; FadeOut(0, 0, 0, 6); VGA_ZeroPalette(); Intro1("friend", 320, 200); if (Wait(200)) goto bye; FadeOut(0, 0, 0, 6); VGA_ZeroPalette(); /* LLS_Init(LLSM_DIRECT, LLSVM_MODEZ); VGA_ZeroPalette(); Intro1("ivtl360", 224, 414); if (Wait(200)) goto bye; FadeOut(0, 0, 0, 6); VGA_ZeroPalette(); LLS_Init(LLSM_DIRECT, LLSVM_MODE13); VGA_ZeroPalette(); */ Intro1("noria", 320, 200); if (Wait(200)) goto bye; FadeOut(0, 0, 0, 6); if (DoFire()) goto bye; FadeOut(0, 0, 0, 6); bye: LLS_Init(LLSM_DIRECT, LLSVM_MODE13); VGA_ZeroPalette(); }
void AWeaponBase::StartFire(){ if(CurrentAmmo > 0){ //UE_LOG(LogTemp, Warning, TEXT("StartedFire!")); bIsFiring = true; DoFire(); float TimerDelay = FireRate > 0 ? 1/(FireRate*0.01667) : FApp::GetDeltaTime(); if(!FireRateHandle.IsValid()) GetWorld()->GetTimerManager().SetTimer(FireRateHandle, this, &AWeaponBase::StartFire, TimerDelay, true); } else { StopFire(); } }
int main (int argc, char *argv[]) { void *mod_data; FILE *mod_fd; size_t mod_size; mod_fd = fopen("GLOS-pope.xm","r"); fseek(mod_fd, 0, SEEK_END); mod_size = ftell(mod_fd); fseek(mod_fd, 0, SEEK_SET); mod_data = malloc(mod_size); fread(mod_data, 1, mod_size, mod_fd); fclose(mod_fd); ModPlug_Settings cfg; ModPlug_GetSettings(&cfg); cfg.mChannels = 2; cfg.mBits = 16; cfg.mFrequency = 48000; cfg.mResamplingMode = MODPLUG_RESAMPLE_SPLINE; cfg.mFlags = MODPLUG_ENABLE_OVERSAMPLING; ModPlug_SetSettings(&cfg); module = ModPlug_Load(mod_data, mod_size); srandom(0); memset(¶ms, 0, sizeof params); params.rate = 48000; params.on_speed = 2.0/100.0; params.off_speed = 2.0/30.0; params.start_wait = 8; params.start_dwell = 2; params.curve_dwell = 0; params.corner_dwell = 2; params.curve_angle = cosf(30.0*(M_PI/180.0)); // 30 deg params.end_dwell = 2; params.end_wait = 1; params.snap = 1/100000.0; params.flatness = 0.000005; params.max_framelen = params.rate / 24; params.render_flags = RENDER_GRAYSCALE; if(olInit(10, 30000) < 0) return 1; olSetRenderParams(¶ms); olSetAudioCallback(gen_audio); float time = 0; float ftime; int i,j; int frames = 0; memset(mbuf, 0, sizeof mbuf); font = olGetDefaultFont(); float xpos = 1.0; DoStars(96); DoTitle(111); DoMetaballs(143); DoFire(174); DoTunnel(175+32); DoCubes(175+32+64); DoEuskal(); #if 0 while(1) { int obj; float w; points_left = cur_draw; olPushColor(); //olMultColor(C_GREY((int)(255.0f * cur_draw / count))); olSetVertexShader(cutoff); olDrawIlda(ild); olSetVertexShader(NULL); olPopColor(); /* olSetVertexShader(sinescroller); w = olDrawString(font, xpos, 0.35, 0.4, C_WHITE, "Hello, World! This is a test message displayed using the OpenLase text functions. Sine scrollers FTW!"); if (xpos < (-w-1.5)) xpos = 1.0; olSetVertexShader(NULL);*/ /* olDrawString(font, -1, 0.35, 0.4, C_WHITE, "Hello, World!"); olDrawString(font, -1, -0, 0.4, C_WHITE, "How are you?"); olDrawString(font, -1, -0.35, 0.4, C_WHITE, " (-; :-)");*/ //render_cubes(time); //render_metaballs(time); //ender_fire(); /* olBegin(OL_BEZIERSTRIP); olVertex(0,1,C_WHITE); olVertex(1,1,C_WHITE); olVertex(1,1,C_WHITE); olVertex(1,0,C_WHITE); olVertex(1,-1,C_WHITE); olVertex(1,-1,C_WHITE); olVertex(0,-1,C_WHITE); olEnd();*/ ftime = olRenderFrame(150); frames++; gbl_time += ftime; xpos -= ftime; cur_draw += ftime * count / 5.0; if (cur_draw > count) cur_draw = count; printf("Frame time: %f, FPS:%f\n", ftime, frames/time); } #endif olShutdown(); exit (0); }