Skip to content

Commit

Permalink
Don't use new shapes for GCFW mod panels
Browse files Browse the repository at this point in the history
  • Loading branch information
piepie62 committed Oct 14, 2022
1 parent a6e2d6a commit 20dadf1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
23 changes: 22 additions & 1 deletion src/gemshapesplus/GemShapesPlusCoreMod.as
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ package gemshapesplus
*/
public class GemShapesPlusCoreMod
{
internal static const VERSION:String = "4";
internal static const VERSION:String = "5";
internal static function installCoremods(lattice:Lattice):void
{
if (lattice.doesFileExist("com/giab/games/gcfw/Main.class.asasm"))
{
GemShapesPlusMod.logger.log("installCoremods", "Found GCFW, installing coremod");
installVfxCoremod(lattice, "gcfw");
installGCFWAchiInfoPanelCoremod(lattice);
installNumberCoremod(lattice, "gcfw");
}
else
Expand All @@ -27,6 +28,26 @@ package gemshapesplus
}
}

private static function installGCFWAchiInfoPanelCoremod(lattice:Lattice):void
{
var filename:String = "com/giab/games/gcfw/utils/GemBitmapCreator.class.asasm";
var offset:int = lattice.findPattern(filename, /callpropvoid.*gotoAndStop/);
offset -= 9;
lattice.patchFile(filename, offset, 0, ' \
getlocal0 \n \
getproperty QName(PackageNamespace(""), "mc") \n \
getproperty QName(PackageNamespace(""), "glare") \n \
getlocal2 \n \
not \n \
setproperty QName(PackageNamespace(""), "useOriginals") \n \
getlocal0 \n \
getproperty QName(PackageNamespace(""), "mc") \n \
getproperty QName(PackageNamespace(""), "blackLayer") \n \
getlocal2 \n \
not \n \
setproperty QName(PackageNamespace(""), "useOriginals")');
}

private static function installGCCSToolTipCoremod(lattice:Lattice):void
{
var filename:String = "com/giab/games/gccs/steam/ingame/IngameInfoPanelRenderer.class.asasm";
Expand Down
2 changes: 1 addition & 1 deletion src/gemshapesplus/GemShapesPlusMod.as
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package gemshapesplus
public class GemShapesPlusMod extends MovieClip implements BezelCoreMod
{
public function get BEZEL_VERSION():String { return "2.0.4"; }
public function get VERSION():String { return "1.0.0"; }
public function get VERSION():String { return "1.0.1"; }
public function get MOD_NAME():String { return "Gem Shapes Plus"; }
public function get COREMOD_VERSION():String { return GemShapesPlusCoreMod.VERSION; }

Expand Down
4 changes: 3 additions & 1 deletion src/gemshapesplus/shapemodifiers/ReplacementBlackLayer.as
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ package gemshapesplus.shapemodifiers
private var shouldBeFrame:int;

private var images:Vector.<DisplayObject>;

public var useOriginals:Boolean = false;

public override function set visible(val:Boolean):void
{
Expand Down Expand Up @@ -95,7 +97,7 @@ package gemshapesplus.shapemodifiers

for (var grade:int = 1; grade <= GemShapesPlusMod.GRADE_ORDER.length; grade++)
{
var image:int = GemShapesPlusMod.GRADE_ORDER[grade-1];
var image:int = useOriginals ? grade : GemShapesPlusMod.GRADE_ORDER[grade-1];
if (grade == activeSprite)
{
this.images[image].visible = val;
Expand Down
4 changes: 3 additions & 1 deletion src/gemshapesplus/shapemodifiers/ReplacementGlare.as
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ package gemshapesplus.shapemodifiers
private var images:Vector.<DisplayObject>;

private var bmps:Vector.<BitmapData>;

public var useOriginals:Boolean = false;

public override function set visible(val:Boolean):void
{
Expand Down Expand Up @@ -118,7 +120,7 @@ package gemshapesplus.shapemodifiers

for (var grade:int = 1; grade <= GemShapesPlusMod.GRADE_ORDER.length; grade++)
{
var image:int = GemShapesPlusMod.GRADE_ORDER[grade-1];
var image:int = useOriginals ? grade : GemShapesPlusMod.GRADE_ORDER[grade-1];
if (grade == activeSprite)
{
this.images[image].visible = val;
Expand Down

0 comments on commit 20dadf1

Please sign in to comment.