void LoadAddonImages (void) { PrintLog ("Loading extra images\n"); PrintLog (" Loading corona image\n"); LoadCorona (); PrintLog (" Loading glare image\n"); LoadGlare (); PrintLog (" Loading halo image\n"); LoadHalo (); PrintLog (" Loading thruster image\n"); LoadThruster (1); LoadThruster (2); PrintLog (" Loading shield image\n"); LoadShield (); PrintLog (" Loading explosion blast image\n"); LoadExplBlast (); PrintLog (" Loading spark image\n"); LoadSparks (); PrintLog (" Loading deadzone image\n"); LoadDeadzone (); PrintLog (" Loading zoom image\n"); LoadScope (); PrintLog (" Loading damage icons\n"); LoadDamageIcons (); PrintLog (" Loading joystick emulator image\n"); LoadJoyMouse (); }
void RenderObjectHalo (CFixVector *vPos, fix xSize, float red, float green, float blue, float alpha, int bCorona) { if ((gameOpts->render.coronas.bShots && (bCorona ? LoadCorona () : LoadHalo ()))) { tRgbaColorf c = {red, green, blue, alpha}; ogl.SetDepthWrite (false); CBitmap* bmP = bCorona ? bmpCorona : bmpHalo; bmP->SetColor (&c); ogl.RenderSprite (bmP, *vPos, xSize, xSize, alpha * 4.0f / 3.0f, LIGHTTRAIL_BLENDMODE, 1); ogl.SetDepthWrite (true); } }
int RenderWeaponCorona (CObject *objP, tRgbaColorf *colorP, float alpha, fix xOffset, float fScale, int bSimple, int bViewerOffset, int bDepthSort) { if (!SHOW_OBJ_FX) return 0; if (SHOW_SHADOWS && (gameStates.render.nShadowPass != 1)) return 0; if ((objP->info.nType == OBJ_WEAPON) && (objP->info.renderType == RT_POLYOBJ)) RenderLaserCorona (objP, colorP, alpha, fScale); else if (gameOpts->render.coronas.bShots && LoadCorona ()) { fix xSize; tRgbaColorf color; static tTexCoord2f tcCorona [4] = {{{0,0}},{{1,0}},{{1,1}},{{0,1}}}; CFixVector vPos = objP->info.position.vPos; xSize = (fix) (WeaponBlobSize (objP->info.nId) * F2X (fScale)); if (xOffset) { if (bViewerOffset) { CFixVector o = gameData.render.mine.viewerEye - vPos; CFixVector::Normalize (o); vPos += o * xOffset; } else vPos += objP->info.position.mOrient.FVec () * xOffset; } if (xSize < I2X (1)) xSize = I2X (1); color.alpha = alpha; alpha = coronaIntensities [gameOpts->render.coronas.nObjIntensity] / 2; color.red = colorP->red * alpha; color.green = colorP->green * alpha; color.blue = colorP->blue * alpha; return transparencyRenderer.AddSprite (bmpCorona, vPos, &color, FixMulDiv (xSize, bmpCorona->Width (), bmpCorona->Height ()), xSize, 0, LIGHTTRAIL_BLENDMODE, 3); } return 0; }