BOOL IsMsiOSSupported(DWORD dwMSIVersion) { // OSVERSIONINFO sInfoOS = {0}; // sInfoOS.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); // GetVersionEx(&sInfoOS); // We do no support any platform prior to Windows 2000 // if (5 > sInfoOS.dwMajorVersion) // return FALSE; if (300 >= dwMSIVersion) { // We support: if (MinimumWindowsPlatform(5, 2, 0) || // Windows 2003 and above MinimumWindowsPlatform(5, 1, 0) || // Windows XP and above MinimumWindowsPlatform(5, 0, 3)) // Windows 2000 SP3 and above { return TRUE; } } else if (200 >= dwMSIVersion) { // Windows 95, 98, NT4 SP6, 2000, Me if (MinimumWindowsPlatform(5, 0, 0) || // Windows 2000 and above MinimumWindowsPlatform(4, 0, 6) || // Windows NT 4.0 SP6 and above IsPlatform(VER_PLATFORM_WIN32_WINDOWS)) // Windows 95, 98, Me { return TRUE; } } else if (120 >= dwMSIVersion || 110 >= dwMSIVersion || 100 >= dwMSIVersion) { if (MinimumWindowsPlatform(4, 0, 3) || IsPlatform(VER_PLATFORM_WIN32_WINDOWS)) { return TRUE; } } return FALSE; }
void SpawnStatic (int tilex, int tiley, int mtype, int zoffset) {statobj_t * temp; boolean onetimer; #if (SHAREWARE == 1) switch(mtype) { case stat_rlight: case stat_glight: case stat_ylight: case stat_chandelier: mtype = stat_blight; break; case stat_garb1: case stat_garb2: case stat_garb3: case stat_shit: mtype = stat_metalshards; break; case stat_lamp: mtype = stat_altbrazier2; break; } #endif if ( BATTLEMODE ) { if ( !gamestate.BattleOptions.SpawnWeapons ) { if ( stats[ mtype ].flags & FL_WEAPON ) { return; } } if (mtype == stat_pit) return; // Change lifeitems and extra lives to health switch( mtype ) { case stat_lifeitem1 : case stat_lifeitem2 : mtype = stat_monkcrystal1; break; case stat_lifeitem3 : case stat_lifeitem4 : case stat_oneup : case stat_threeup : mtype = stat_monkcrystal2; break; } switch( mtype ) { case stat_monkmeal : case stat_priestporridge : case stat_monkcrystal1 : case stat_monkcrystal2 : case stat_healingbasin : if ( ( gamestate.Product != ROTT_SHAREWARE ) && ( gamestate.BattleOptions.SpawnMines ) && ( !IsPlatform( tilex, tiley ) && ( ( zoffset & 0xff00 ) != 0xb000 ) ) && ( zoffset == -1 ) ) { mtype = stat_mine; } else if ( !gamestate.BattleOptions.SpawnHealth ) { return; } break; } } if (!firstemptystat) {temp = (statobj_t*)Z_LevelMalloc(sizeof(statobj_t),PU_LEVELSTRUCT,NULL); //SoftError("\nMalloc-ing actor"); //if (insetupgame) // SoftError("in setup"); } else {temp = lastemptystat; //SoftError("\nfree actor available"); RemoveFromFreeStaticList(lastemptystat); } // Standard pole hack if ((zoffset>=14) && (zoffset<=17)) zoffset=-1; if (temp) { memset(temp,0,sizeof(*temp)); temp->shapenum = stats[mtype].picnum; temp->whichstat = statcount ++; temp->tilex = tilex; temp->tiley = tiley; temp->x = ((long)tilex << TILESHIFT) + 0x8000; temp->y = ((long)tiley << TILESHIFT) + 0x8000; temp->areanumber = MAPSPOT(tilex,tiley,0)-AREATILE; temp->linked_to = -1; if ((temp->areanumber<=0) || (temp->areanumber>NUMAREAS)) Error ("Sprite at x=%d y=%d type=%d has an illegal areanumber\n",tilex,tiley,mtype); if ( mtype == stat_mine ) { temp->z = nominalheight; } else if (zoffset!=-1) { if ((zoffset&0xff00)==0xb000) Set_NewZ_to_MapValue(&(temp->z),zoffset,"static",tilex,tiley); else if (IsPlatform(tilex,tiley)) temp->z = PlatformHeight(tilex,tiley); else if (zoffset==11) temp->z=-65; else if (zoffset==12) temp->z=-66; else temp->z = nominalheight; // Error ("You didn't specify a valid height over the sprite at tilex=%ld tiley=%ld\n",tilex,tiley); } else if (mtype>stat_chandelier) temp->z = nominalheight; temp->visspot = &spotvis[tilex][tiley]; temp->which = SPRITE; temp->ticcount = stats[mtype].tictime; temp->hitpoints = stats[mtype].hitpoints; temp->itemnumber = stats[mtype].type; temp->flags = stats[mtype].flags; temp->ammo = stats[mtype].ammo; temp->numanims = stats[mtype].numanims; if (temp->flags & FL_BONUS) switch (stats[mtype].type) {case stat_lifeitem1: case stat_lifeitem2: case stat_lifeitem3: case stat_lifeitem4: gamestate.treasuretotal++; break; default: ; } AddStatic(temp); onetimer = ((mtype == stat_rubble) || (mtype == stat_woodfrag) || (mtype == stat_metalfrag) || (mtype == stat_missmoke) ); if (DoPanicMapping()) { if (temp->numanims && (!onetimer)) { temp->flags &= ~FL_ACTIVE; temp->numanims = 0; GameRandomNumber("SpawnStatic",mtype); } } else { if (temp->numanims) { if (!onetimer) temp->count = (int)(((int)GameRandomNumber("SpawnStatic",mtype) % stats[mtype].numanims) + 1); else temp->count = 0; } else if (temp->itemnumber == stat_standardpole) { if (MAPSPOT(temp->tilex,temp->tiley,2)) temp->count = 2*(MAPSPOT(temp->tilex,temp->tiley,2)-14); else temp->count = 0; } if ((temp->itemnumber == stat_knifestatue) || (temp->itemnumber == stat_emptystatue) || (temp->itemnumber == stat_standardpole)) temp->flags|=FL_ROTATING; } if (mtype != stat_missmoke) sprites[tilex][tiley] = temp; else temp->flags |= FL_NONMARK; //================ check special junk ==================================// if (temp->itemnumber == stat_dariantouch) {_2Dpoint *tdptr; tdptr = &(MISCVARS->ETOUCH[MISCVARS->nexttouch]); tdptr->x = tilex; tdptr->y = tiley; sprites[tilex][tiley]->linked_to = MISCVARS->nexttouch; MISCVARS->nexttouch ++; } else if ((temp->itemnumber >= stat_touch1) && (temp->itemnumber <= stat_touch4)) {touchindices[tilex][tiley] = lasttouch + 1; SD_PreCacheSoundGroup(SD_TOUCHPLATESND,SD_BADTOUCHSND); lasttouch ++; } //=====================================================================// //bna added // BaseMarkerZ used to adjust height in s_basemarker1 // in SpawnNewObj(i,j,&s_basemarker1,inertobj); BaseMarkerZ=temp->z;//bna++ BaseMarkerZ = spawnz; PreCacheStaticFrames(temp); PreCacheStaticSounds(temp->itemnumber); if (temp->flags & FL_WEAPON) MISCVARS->NUMWEAPONS ++; } else Error("Z_LevelMalloc failed in SpawnStatic!"); }