• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

First Machine Age's Mods (Combined repo.)


Commit MetaInfo

Révision63869fc81778186eb5e9987cce05a0d579e41b3d (tree)
l'heure2020-08-10 08:49:27
Auteurmelchior <melchior@user...>
Commitermelchior

Message de Log

Added implicit color conversion routines, for ease of use.

Change Summary

Modification

--- a/ElementalTools/ColorHelper.cs
+++ b/ElementalTools/ColorHelper.cs
@@ -46,7 +46,10 @@ namespace ElementalTools
4646 Alpha = a;
4747 }
4848
49-
49+ public static implicit operator int(RGBAColor_Int32 input)
50+ {
51+ return input.IntegerValue;
52+ }
5053 }
5154
5255 [StructLayout(LayoutKind.Explicit, Size = 4, Pack = 1)]
@@ -85,7 +88,10 @@ namespace ElementalTools
8588 Alpha = a;
8689 }
8790
88-
91+ public static implicit operator int(BGRAColor_Int32 input)
92+ {
93+ return input.IntegerValue;
94+ }
8995 }
9096
9197
--- a/ElementalTools/Items/SteelItem.cs
+++ b/ElementalTools/Items/SteelItem.cs
@@ -554,25 +554,25 @@ namespace ElementalTools
554554
555555 switch (edge) {
556556 case SharpnessState.Rough:
557- return this.color_Rough.IntegerValue;
557+ return this.color_Rough;
558558
559559 case SharpnessState.Dull:
560- return this.color_Dull.IntegerValue;
560+ return this.color_Dull;
561561
562562 case SharpnessState.Honed:
563- return this.color_Honed.IntegerValue;
563+ return this.color_Honed;
564564
565565 case SharpnessState.Keen:
566- return this.color_Keen.IntegerValue;
566+ return this.color_Keen;
567567
568568 case SharpnessState.Sharp:
569- return this.color_Sharp.IntegerValue;
569+ return this.color_Sharp;
570570
571571 case SharpnessState.Razor:
572- return this.color_Razor.IntegerValue;
572+ return this.color_Razor;
573573 }
574574
575- return this.color_Default.IntegerValue;
575+ return this.color_Default;
576576 }
577577
578578 #endregion