public void Render() { (DrawManager.Instance()).AddTextureToListP1P2P3P4P5(myAtlasBillboard, ghostScreenPos, scale, 0.0f, 0.0f, alpha, frameData[ghostCurrentFrame - 1].rotation + 63); #if TEST_SHORTS #endif #if TEST_SHORTS #endif }
public void RenderTarget(int i) { CGPoint pos = Utilities.CGPointMake(point[i].x, point[i].y); CGPoint screenPosition = (Globals.g_world.game).GetScreenPosition(pos); if ((Globals.g_world.game).IsOnScreen(screenPosition)) { (DrawManager.Instance()).AddTextureToListP1(screenPosition, 1); } }
public void Render() { Globals.Assert(myAtlas != null); this.UpdateWordRotation(); this.UpdateWordPosition(); if (true) { ////glEnableClientState (GL_COLOR_ARRAY); } (DrawManager.Instance()).Begin(myAtlas); bool displayedFirstDigit = false; for (int i = 0; i < numDigits; i++) { if (dontDisplayLeadingZeros) { if (!displayedFirstDigit) { if (((zobject[i]).subTextureId == 0) && (i != (numDigits - 1))) { continue; } else { displayedFirstDigit = true; } } } if (Utilities.IsOnScreenP1((zobject[i]).screenPosition, 50.0f)) { (zobject[i]).RenderToDrawArrays(); } else { (zobject[i]).StopRender(); } } (DrawManager.Instance()).Flush(); if (true) { ////glDisableClientState (GL_COLOR_ARRAY); } if (rotationWholeWord != 0.0f) { //glPopMatrix(); //Globals.g_main.SetGLMatrixMode(GL_MODELVIEW); //glLoadIdentity(); //glScalef(Constants.kScaleForShorts, Constants.kScaleForShorts, 0.0f); } }
public void RenderForUIAlert() { (DrawManager.Instance()).Begin(atlas); if (!noDimZob) { dimZob.Render();//ToDrawArrays(); } (DrawManager.Instance()).Flush(); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //glColor4f(myColour.cRed, myColour.cGreen, myColour.cBlue, 1.0f); text.RenderSimple(); //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //glColor4f(1.0f, 1.0f, 1.0f, 1.0f); for (int i = 0; i < numButtons; i++) { (button[i]).Render(); } backdrop.RenderToDrawArrays(); if (unityText != null) { if (useNSString) { unityText.RenderNew(); } else { // unityText.Render(); } } for (int i = 0; i < numButtons; i++) { if (buttonText[i] != null) { buttonText[i].Render(); } } if (!useNSString) { for (int i = 0; i < (int)Enum.kMaxFunnyWordsInQuery; i++) { if (funnyWord[i] != null) { (funnyWord[i]).Render(); } } } }
public void RenderSceneDownLow() { (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(mainAtlas)); ////glEnableClientState (GL_COLOR_ARRAY); int i = usedListHead[(int)ParticleList.t_DownInRiver]; while (i != -1) { (particle[i]).RenderToDrawArrays(); i = (particle[i]).next; } (DrawManager.Instance()).Flush(); }
public void RenderToDrawArrays() { if ((Globals.g_world.game).IsOnScreenP1P2(screenPosition, 20.0f, Globals.g_world.mapObjectAppearDistance)) { // switch (type) { // case ParticleType.kParticle_WaterSparkle : // (DrawManager.Instance()).AddTextureToListP1P2P3P4P5(screenPosition, scale, rotation, rotationScale, alpha, subTextureId); // break; // case ParticleType.kParticle_WaterLine : // (DrawManager.Instance()).AddTextureToListP1P2P3P4P5(screenPosition, scale, rotation, rotationScale, alpha, subTextureId); // break; // default : (DrawManager.Instance()).AddTextureToListP1P2P3P4P5(myAtlasBillboard, screenPosition, scale, rotation, rotationScale, alpha, subTextureId); // break; //} } }
public void RenderOtherBank() { return; CGPoint mapPos = Utilities.CGPointMake(xFlowerPosition, yCliffStart + (6 * 64)); CGPoint screenPosition = Utilities.GetScreenPositionP1(mapPos, (Globals.g_world.GetGame()).GetScrollPosition()); int xPlayerTile = ((Globals.g_world.game).player).xCurrentTile; screenPosition.x = -32 + (((float)(xPlayerTile)) * 64.0f); screenPosition.y -= 40.0f; for (int i = 0; i < 5; i++) { if (((i + 1) >= xPlayerTile) && ((i - 1) <= xPlayerTile)) { (DrawManager.Instance()).AddTextureToListP1(screenPosition, 6); screenPosition.x += 64; } } }
public void RenderNewStyle() { (DrawManager.Instance()).Begin(atlas); if (!noDimZob) { dimZob.Render();//ToDrawArrays(); } (DrawManager.Instance()).Flush(); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //glColor4f(myColour.cRed, myColour.cGreen, myColour.cBlue, 1.0f); text.RenderSimple(); //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //glColor4f(1.0f, 1.0f, 1.0f, 1.0f); for (int i = 0; i < numButtons; i++) { (button[i]).Render(); } backdrop.RenderToDrawArrays(); if (unityText != null) { if (Globals.g_world.DoesCurrentLanguageUseNSString()) { unityText.RenderNew(); } else { unityText.Render(); } } for (int i = 0; i < numButtons; i++) { if (buttonText[i] != null) { buttonText[i].Render(); } } }
public void RenderSceneBeforePlayer() { (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(mainAtlas)); int i = usedListHead[(int)ParticleList.t_BeforePlayer]; while (i != -1) { (particle[i]).RenderToDrawArrays(); i = (particle[i]).next; } (DrawManager.Instance()).Flush(); //glBlendFunc(GL_ONE, GL_ONE); i = usedListHead[(int)ParticleList.t_WhiteStars]; while (i != -1) { (particle[i]).RenderToDrawArrays(); i = (particle[i]).next; } (DrawManager.Instance()).Flush(); }
public void RenderP1(CGPoint inPos, float inScale) { if (popped) { if (xPosition > 0.1f) { const float kPoppedScalePlus = 0.06f; const float kPoppedAlphaDrop = 0.1f; xScale += kPoppedScalePlus; yScale += kPoppedScalePlus; xPosition -= kPoppedAlphaDrop; (DrawManager.Instance()).AddTextureToListXYScaleAlphaP1P2P3P4(inPos, (0.9f + xScale) * inScale, (0.9f + yScale) * inScale, xPosition, 2); } return; } xPosition += xSpeed; yPosition += ySpeed; xScale = 1.0f + ((1.0f + ((float)Math.Cos(xPosition)) / 2.0f) * maxScale); yScale = 1.0f + ((1.0f + ((float)Math.Cos(yPosition)) / 2.0f) * maxScale); (DrawManager.Instance()).AddTextureToListXYScaleP1P2P3(inPos, xScale * inScale, yScale * inScale, 0); }
public void Render() { (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(AtlasType.kAtlas_Debug)); racingLine.Render(); racingLine.RenderTarget(targetPoint); CGPoint screenPosition = (Globals.g_world.game).GetScreenPosition(showTargetPos); (DrawManager.Instance()).AddTextureToListXYScaleP1P2P3(screenPosition, 2.3f, 2.3f, 1); if (dodgingTractor != -1) { CGPoint screenPosition2 = (Globals.g_world.game).GetScreenPosition(inFlockTargetPos); if ((Globals.g_world.game).IsOnScreen(screenPosition2)) { (DrawManager.Instance()).AddTextureToListXYScaleP1P2P3(screenPosition2, 4.0f, 4.0f, 1); } } if (inFlock) { CGPoint screenPosition3 = (Globals.g_world.game).GetScreenPosition(inFlockTargetPos); if ((Globals.g_world.game).IsOnScreen(screenPosition3)) { (DrawManager.Instance()).AddTextureToListXYScaleP1P2P3(screenPosition3, 4.0f, 4.0f, 1); } } if (skidding) { CGPoint screenPosition4 = (Globals.g_world.game).GetScreenPosition(skidTarget); if ((Globals.g_world.game).IsOnScreen(screenPosition4)) { (DrawManager.Instance()).AddTextureToListXYScaleP1P2P3(screenPosition4, 4.0f, 4.0f, 0); } } (DrawManager.Instance()).Flush(); }
public void RenderScene() { (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(AtlasType.kAtlas_RainbowParticles)); int i = usedListHead[(int)ParticleList.t_AfterEverything]; while (i != -1) { (particle[i]).RenderToDrawArrays(); i = (particle[i]).next; } (DrawManager.Instance()).Flush(); (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(AtlasType.kAtlas_RainbowParticles)); //glBlendFunc(GL_ONE, GL_ONE); i = usedListHead[(int)ParticleList.t_AdditiveInFrontOfPlayer]; while (i != -1) { (particle[i]).RenderToDrawArrays(); i = (particle[i]).next; } (DrawManager.Instance()).Flush(); //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); }
public void Render() { if (zobject.atlas == null) { if (!this.IsOnScreen()) { this.StopRender(); } else { zobject.Render(); if (zobjectLabel != null) { CGPoint labePos = Utilities.CGPointMake(zobject.displayPosition.x + labelOffset.x, zobject.displayPosition.y + labelOffset.y); zobjectLabel.SetScreenPosition(labePos); zobjectLabel.Render(); } } } else { if (this.IsOnScreen()) { ////glEnableClientState (GL_COLOR_ARRAY); (DrawManager.Instance()).Begin(zobject.atlas); if (hangingButton != null) { zobject.SetRotation(hangingButton.UpdateRotation()); if (hangingButton != null) { hangingButton.Render(this, zobject.atlas); } if (hangingButton.hangingButtonScale != 1.0f) { zobject.SetShowScale(hangingButton.hangingButtonScale); } zobject.RenderToDrawArrays_Rotatable(); } else { zobject.RenderToDrawArrays(); } (DrawManager.Instance()).Flush(); if (zobjectLabel != null) { CGPoint labePos = Utilities.CGPointMake(zobject.displayPosition.x + labelOffset.x, zobject.displayPosition.y + labelOffset.y); zobjectLabel.SetScreenPosition(labePos); zobjectLabel.RenderFromAtlas(); } ////glDisableClientState (GL_COLOR_ARRAY); } else { this.StopRender(); } } }
public void Render(FrontEndButton inButton, ZAtlas inAtlas) { if ((myButton.zobject).state == ZobjectState.kZobjectWaitingToShow) { return; } CGPoint renderPosition = (inButton.zobject).screenPosition; renderPosition.x += currentOffset.x; renderPosition.y += currentOffset.y; renderPosition.y += yOffset; renderPosition.y -= 35.0f; if (Globals.deviceIPad) { renderPosition.x += 32.0f; } if (myBillboard[0] == null) { myBillboard[0] = new Billboard("hangingButton1"); myBillboard[0].SetAtlas(inAtlas); myBillboard[0].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[0].myObject.layer = LayerMask.NameToLayer("guistuff"); } (DrawManager.Instance()).AddTextureToListP1(myBillboard[0], renderPosition, subTextureId, 1.0f); if (longerRope > 0.0f) { if (myBillboard[1] == null) { myBillboard[1] = new Billboard("hangingButton2"); myBillboard[1].SetAtlas(inAtlas); myBillboard[1].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[1].myObject.layer = LayerMask.NameToLayer("guistuff"); } renderPosition.y -= 65.0f; (DrawManager.Instance()).AddTextureToListP1(myBillboard[1], renderPosition, subTextureId, 1.0f); if (longerRope > 2.0f) { if (myBillboard[2] == null) { myBillboard[2] = new Billboard("hangingButton3"); myBillboard[2].SetAtlas(inAtlas); myBillboard[2].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[2].myObject.layer = LayerMask.NameToLayer("guistuff"); } renderPosition.y -= 65.0f; (DrawManager.Instance()).AddTextureToListP1(myBillboard[2], renderPosition, subTextureId, 1.0f); renderPosition.y += 65.0f; } renderPosition.y += 65.0f; } renderPosition = (inButton.zobject).screenPosition; renderPosition.x += currentOffset2.x; renderPosition.y += currentOffset2.y; renderPosition.y += yOffset; renderPosition.y -= 35.0f; if (Globals.deviceIPad) { renderPosition.x += 32.0f; } if (myBillboard[4] == null) { myBillboard[4] = new Billboard("hangingButton4"); myBillboard[4].SetAtlas(inAtlas); myBillboard[4].SetDetailsFromAtlas(inAtlas, subTextureId); myBillboard[4].myObject.layer = LayerMask.NameToLayer("guistuff"); } (DrawManager.Instance()).AddTextureToListP1(myBillboard[4], renderPosition, subTextureId, hangingButtonScale); if (longerRope > 0.0f) { renderPosition.y -= 65.0f; // (DrawManager.Instance()).AddTextureToListP1(myBillboard[1],renderPosition, subTextureId); if (longerRope > 2.0f) { renderPosition.y -= 65.0f; // (DrawManager.Instance()).AddTextureToListP1(myBillboard[2],renderPosition, subTextureId); renderPosition.y += 65.0f; } renderPosition.y += 65.0f; } }
public void RenderBridgeAsSprite() { // if (yCliffStart < 1000.0f) // { // int ross = 0; // } // Debug.Log("ycliff " + yCliffStart.ToString()); float scrollY = (Globals.g_world.GetGame()).GetScrollPosition().y; if ((yCliffStart + 500.0f) < scrollY) { if (isBeingDrawn) { for (int i = 0; i < 12; i++) { if (myAtlasBillboard[i] != null) { myAtlasBillboard[i].StopRender(); } } isBeingDrawn = false; } return; } (DrawManager.Instance()).Begin(Globals.g_world.GetAtlas(AtlasType.kAtlas_GrassTiles)); CGPoint mapPos = Utilities.CGPointMake(xFlowerPosition, yCliffStart); mapPos.x -= 32.0f; mapPos.y += 28.0f; CGPoint screenPosition = (Globals.g_world.game).GetScreenPosition(mapPos); int bridgeX = 12; int bridgeY = 0; int billboardId = 0; //isBeingDrawn = true; for (int x = 0; x < 2; x++) { for (int y = 0; y < 6; y++) { int tileSubtexture = ((Globals.g_world.game).lBuilder).GetTileMapTileP1P2((int)AtlasType.kAtlas_GrassTiles, bridgeX + x, bridgeY + y); CGPoint pos = Utilities.CGPointMake(screenPosition.x + ((float)x * 64.0f), screenPosition.y + ((float)y * 64.0f)); if ((Globals.g_world.game).IsOnScreenNewP1(pos, 50.0f)) // if (true) { isBeingDrawn = true; (DrawManager.Instance()).AddTextureToListP1(myAtlasBillboard[billboardId], pos, tileSubtexture, 1.0f); } else { myAtlasBillboard[billboardId].StopRender(); } billboardId++; } } (DrawManager.Instance()).Flush(); }