mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-01 18:52:02 +03:00
Update mobile version to mobile v2.2.1
The android version just got a much needed update to fix some resolution issues on devices with cutouts. It turns out the mobile source was actually pretty out of date, like 3 versions out of date! This commit brings it up to date. All the changes have just been about keeping the game running on modern devices, though. The biggest change was adding the Starling library to the project, which made the game GPU powered and sped the whole thing up.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
// =================================================================================================
|
||||
//
|
||||
// Starling Framework
|
||||
// Copyright Gamua GmbH. All Rights Reserved.
|
||||
//
|
||||
// This program is free software. You can redistribute and/or modify it
|
||||
// in accordance with the terms of the accompanying license agreement.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
package starling.textures
|
||||
{
|
||||
import flash.display.BitmapData;
|
||||
import flash.display3D.textures.RectangleTexture;
|
||||
import flash.display3D.textures.TextureBase;
|
||||
|
||||
import starling.core.Starling;
|
||||
|
||||
/** @private
|
||||
*
|
||||
* A concrete texture that wraps a <code>RectangleTexture</code> base.
|
||||
* For internal use only. */
|
||||
internal class ConcreteRectangleTexture extends ConcreteTexture
|
||||
{
|
||||
/** Creates a new instance with the given parameters. */
|
||||
public function ConcreteRectangleTexture(base:RectangleTexture, format:String,
|
||||
width:int, height:int, premultipliedAlpha:Boolean,
|
||||
optimizedForRenderTexture:Boolean=false,
|
||||
scale:Number=1)
|
||||
{
|
||||
super(base, format, width, height, false, premultipliedAlpha,
|
||||
optimizedForRenderTexture, scale);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
override public function uploadBitmapData(data:BitmapData):void
|
||||
{
|
||||
rectangleBase.uploadFromBitmapData(data);
|
||||
setDataUploaded();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
override protected function createBase():TextureBase
|
||||
{
|
||||
return Starling.context.createRectangleTexture(
|
||||
nativeWidth, nativeHeight, format, optimizedForRenderTexture);
|
||||
}
|
||||
|
||||
private function get rectangleBase():RectangleTexture
|
||||
{
|
||||
return base as RectangleTexture;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user