yes
This commit is contained in:
parent
52e2627871
commit
1baaa856ec
@ -20,7 +20,6 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
using FDK;
|
using FDK;
|
||||||
using ImGuiNET;
|
|
||||||
using Silk.NET.Core;
|
using Silk.NET.Core;
|
||||||
using Silk.NET.GLFW;
|
using Silk.NET.GLFW;
|
||||||
using Silk.NET.Input;
|
using Silk.NET.Input;
|
||||||
@ -438,6 +437,7 @@ namespace SampleFramework {
|
|||||||
ViewPortOffset.X = (size.X - ViewPortSize.X) / 2;
|
ViewPortOffset.X = (size.X - ViewPortSize.X) / 2;
|
||||||
ViewPortOffset.Y = (size.Y - ViewPortSize.Y) / 2;
|
ViewPortOffset.Y = (size.Y - ViewPortSize.Y) / 2;
|
||||||
|
|
||||||
|
|
||||||
Gl.Viewport(ViewPortOffset.X, ViewPortOffset.Y, (uint)ViewPortSize.X, (uint)ViewPortSize.Y);
|
Gl.Viewport(ViewPortOffset.X, ViewPortOffset.Y, (uint)ViewPortSize.X, (uint)ViewPortSize.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
#TITLE:OpenTaiko Headquarters
|
#TITLE:OpenTaiko Headquarters
|
||||||
#TITLERU:Штаб-квартира OpenTaiko
|
#TITLERU:Штаб-квартира OpenTaiko
|
||||||
#TITLEZH:OpenTaiko总部
|
#TITLEZH:OpenTaiko总部
|
||||||
#GENRE:OpenTaiko Headquarters
|
#GENRE:OpenTaiko Headquarters
|
||||||
#BOXEXPLANATION1:Greetings, from the OPTK-HQ channel,
|
#BOXEXPLANATION1:Greetings, from the OPTK-HQ channel,
|
||||||
#BOXEXPLANATION2:broadcasting to you now!
|
#BOXEXPLANATION2:broadcasting to you now!
|
||||||
#BOXEXPLANATION3:Let's see what today brings us...
|
#BOXEXPLANATION3:Let's see what today brings us...
|
||||||
#BOXEXPLANATIONRU1:Здравствуйте, в канале OPTK-HQ,
|
#BOXEXPLANATIONRU1:Здравствуйте, в канале OPTK-HQ,
|
||||||
#BOXEXPLANATIONRU2:ведёт прямой эфир для вас!
|
#BOXEXPLANATIONRU2:ведёт прямой эфир для вас!
|
||||||
#BOXEXPLANATIONRU3:Смотрите что сегодня нам принесёт...
|
#BOXEXPLANATIONRU3:Смотрите что сегодня нам принесёт...
|
||||||
#BOXEXPLANATIONZH1:各位观众,大家好,这里是OPTK-HQ频道
|
#BOXEXPLANATIONZH1:各位观众,大家好,这里是OPTK-HQ频道
|
||||||
#BOXEXPLANATIONZH2:为您播出节目!
|
#BOXEXPLANATIONZH2:为您播出节目!
|
||||||
#BOXEXPLANATIONZH3:现在请看今天给我们带来的内容……
|
#BOXEXPLANATIONZH3:现在请看今天给我们带来的内容……
|
||||||
#BOXTYPE:9
|
#BOXTYPE:9
|
||||||
#BGTYPE:6
|
#BGTYPE:6
|
||||||
#BOXCOLOR:#999999
|
#BOXCOLOR:#999999
|
||||||
#BACKCOLOR:#444444
|
#BACKCOLOR:#444444
|
||||||
|
#SCENEPRESET:Headquarters1
|
@ -1,88 +1,96 @@
|
|||||||
{
|
{
|
||||||
"Regular": {
|
"Regular": {
|
||||||
"": {
|
"": {
|
||||||
"UP": [ "0","1" ],
|
"UP": [ "0","1" ],
|
||||||
"DOWN": [ "0","1","2" ],
|
"DOWN": [ "0","1","2" ],
|
||||||
"DANCER": [ "0" ],
|
"DANCER": [ "0" ],
|
||||||
"FOOTER": [ "0" ],
|
"FOOTER": [ "0" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
},
|
},
|
||||||
"Dango": {
|
"Dango": {
|
||||||
"UP": [ "0" ],
|
"UP": [ "0" ],
|
||||||
"DOWN": [ "0" ],
|
"DOWN": [ "0" ],
|
||||||
"DANCER": [ "0" ],
|
"DANCER": [ "0" ],
|
||||||
"FOOTER": [ "0" ],
|
"FOOTER": [ "0" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
},
|
},
|
||||||
"Clouds": {
|
"Clouds": {
|
||||||
"UP": [ "1" ],
|
"UP": [ "1" ],
|
||||||
"DOWN": [ "1" ],
|
"DOWN": [ "1" ],
|
||||||
"DANCER": [ "0" ],
|
"DANCER": [ "0" ],
|
||||||
"FOOTER": [ "0" ],
|
"FOOTER": [ "0" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
},
|
},
|
||||||
"Forest": {
|
"Forest": {
|
||||||
"UP": [ "1" ],
|
"UP": [ "1" ],
|
||||||
"DOWN": [ "2" ],
|
"DOWN": [ "2" ],
|
||||||
"DANCER": [ "0" ],
|
"DANCER": [ "0" ],
|
||||||
"FOOTER": [ "0" ],
|
"FOOTER": [ "0" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
},
|
},
|
||||||
"Dashy": {
|
"Dashy": {
|
||||||
"UP": [ "8" ],
|
"UP": [ "8" ],
|
||||||
"DOWN": [ "8" ],
|
"DOWN": [ "8" ],
|
||||||
"DANCER": [ "Dashy" ],
|
"DANCER": [ "Dashy" ],
|
||||||
"FOOTER": [ "8" ],
|
"FOOTER": [ "8" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
},
|
},
|
||||||
"Outfox": {
|
"Outfox": {
|
||||||
"UP": [ "Outfox" ],
|
"UP": [ "Outfox" ],
|
||||||
"DOWN": [ "Outfox" ],
|
"DOWN": [ "Outfox" ],
|
||||||
"DANCER": [ "0" ],
|
"DANCER": [ "0" ],
|
||||||
"FOOTER": [ "Outfox" ],
|
"FOOTER": [ "Outfox" ],
|
||||||
"MOB": [ "0" ],
|
"MOB": [ ],
|
||||||
"RUNNER": [ "0" ]
|
"RUNNER": [ ]
|
||||||
}
|
},
|
||||||
},
|
"Headquarters1": {
|
||||||
"Dan": {
|
"UP": [ "0","1" ],
|
||||||
"Summer": {
|
"DOWN": [ "0","1","2" ],
|
||||||
"UP": [ "Summer" ]
|
"DANCER": [ "0" ],
|
||||||
},
|
"FOOTER": [ "0" ],
|
||||||
"Fall": {
|
"MOB": [ "0" ],
|
||||||
"UP": [ "Fall" ]
|
"RUNNER": [ ]
|
||||||
},
|
}
|
||||||
"Winter": {
|
},
|
||||||
"UP": [ "Winter" ]
|
"Dan": {
|
||||||
},
|
"Summer": {
|
||||||
"Spring": {
|
"UP": [ "Summer" ]
|
||||||
"UP": [ "Spring" ]
|
},
|
||||||
}
|
"Fall": {
|
||||||
},
|
"UP": [ "Fall" ]
|
||||||
"Tower": {
|
},
|
||||||
"": {
|
"Winter": {
|
||||||
"DOWN": [ "Day", "Sunset", "Mountain" ],
|
"UP": [ "Winter" ]
|
||||||
"FOOTER": [ "0" ]
|
},
|
||||||
},
|
"Spring": {
|
||||||
"Day": {
|
"UP": [ "Spring" ]
|
||||||
"DOWN": [ "Day" ],
|
}
|
||||||
"FOOTER": [ "0" ]
|
},
|
||||||
},
|
"Tower": {
|
||||||
"Sunset": {
|
"": {
|
||||||
"DOWN": [ "Sunset" ],
|
"DOWN": [ "Day", "Sunset", "Mountain" ],
|
||||||
"FOOTER": [ "0" ]
|
"FOOTER": [ "0" ]
|
||||||
},
|
},
|
||||||
"Mountain": {
|
"Day": {
|
||||||
"DOWN": [ "Mountain" ],
|
"DOWN": [ "Day" ],
|
||||||
"FOOTER": [ "0" ]
|
"FOOTER": [ "0" ]
|
||||||
},
|
},
|
||||||
"Event": {
|
"Sunset": {
|
||||||
"DOWN": [ "Event" ],
|
"DOWN": [ "Sunset" ],
|
||||||
"FOOTER": [ "0" ]
|
"FOOTER": [ "0" ]
|
||||||
}
|
},
|
||||||
}
|
"Mountain": {
|
||||||
|
"DOWN": [ "Mountain" ],
|
||||||
|
"FOOTER": [ "0" ]
|
||||||
|
},
|
||||||
|
"Event": {
|
||||||
|
"DOWN": [ "Event" ],
|
||||||
|
"FOOTER": [ "0" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,295 +1,295 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using FDK;
|
using FDK;
|
||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
internal class CActImplDancer : CActivity {
|
internal class CActImplDancer : CActivity {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 踊り子
|
/// 踊り子
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CActImplDancer() {
|
public CActImplDancer() {
|
||||||
base.IsDeActivated = true;
|
base.IsDeActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Activate() {
|
public override void Activate() {
|
||||||
//this.ct踊り子モーション = new CCounter();
|
//this.ct踊り子モーション = new CCounter();
|
||||||
|
|
||||||
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower || OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Dan)
|
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower || OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Dan)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var preset = HScenePreset.GetBGPreset();
|
var preset = HScenePreset.GetBGPreset();
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
Dancer_In = new CTexture[5][];
|
Dancer_In = new CTexture[5][];
|
||||||
Dancer_Out = new CTexture[5][];
|
Dancer_Out = new CTexture[5][];
|
||||||
Dancer = new CTexture[5][];
|
Dancer = new CTexture[5][];
|
||||||
DancerStates = new int[5];
|
DancerStates = new int[5];
|
||||||
nNowDancerInCounter = new float[5];
|
nNowDancerInCounter = new float[5];
|
||||||
nNowDancerOutCounter = new float[5];
|
nNowDancerOutCounter = new float[5];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.DANCER}");
|
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.DANCER}");
|
||||||
if (System.IO.Directory.Exists($@"{dancerOrigindir}")) {
|
if (System.IO.Directory.Exists($@"{dancerOrigindir}")) {
|
||||||
var dirs = System.IO.Directory.GetDirectories($@"{dancerOrigindir}");
|
var dirs = System.IO.Directory.GetDirectories($@"{dancerOrigindir}");
|
||||||
if (dirs.Length > 0) {
|
if (dirs.Length > 0 && preset.DancerSet.Length > 0) {
|
||||||
var _presetPath = (preset != null && preset.DancerSet != null) ? $@"{dancerOrigindir}" + preset.DancerSet[random.Next(0, preset.DancerSet.Length)] : "";
|
var _presetPath = (preset != null && preset.DancerSet != null) ? $@"{dancerOrigindir}" + preset.DancerSet[random.Next(0, preset.DancerSet.Length)] : "";
|
||||||
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
||||||
? _presetPath
|
? _presetPath
|
||||||
: dirs[random.Next(0, dirs.Length)];
|
: dirs[random.Next(0, dirs.Length)];
|
||||||
|
|
||||||
LoadDancerConifg(path);
|
LoadDancerConifg(path);
|
||||||
|
|
||||||
Dancer_In = new CTexture[nDancerCount][];
|
Dancer_In = new CTexture[nDancerCount][];
|
||||||
Dancer_Out = new CTexture[nDancerCount][];
|
Dancer_Out = new CTexture[nDancerCount][];
|
||||||
Dancer = new CTexture[nDancerCount][];
|
Dancer = new CTexture[nDancerCount][];
|
||||||
DancerStates = new int[nDancerCount];
|
DancerStates = new int[nDancerCount];
|
||||||
nNowDancerInCounter = new float[nDancerCount];
|
nNowDancerInCounter = new float[nDancerCount];
|
||||||
nNowDancerOutCounter = new float[nDancerCount];
|
nNowDancerOutCounter = new float[nDancerCount];
|
||||||
|
|
||||||
nDancerInPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1_In{Path.DirectorySeparatorChar}");
|
nDancerInPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1_In{Path.DirectorySeparatorChar}");
|
||||||
if (nDancerInPtn != 0) {
|
if (nDancerInPtn != 0) {
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
Dancer_In[i] = new CTexture[nDancerInPtn];
|
Dancer_In[i] = new CTexture[nDancerInPtn];
|
||||||
for (int p = 0; p < nDancerInPtn; p++) {
|
for (int p = 0; p < nDancerInPtn; p++) {
|
||||||
Dancer_In[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}_In{Path.DirectorySeparatorChar}{p}.png");
|
Dancer_In[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}_In{Path.DirectorySeparatorChar}{p}.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nDancerOutPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1_Out{Path.DirectorySeparatorChar}");
|
nDancerOutPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1_Out{Path.DirectorySeparatorChar}");
|
||||||
if (nDancerOutPtn != 0) {
|
if (nDancerOutPtn != 0) {
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
Dancer_Out[i] = new CTexture[nDancerOutPtn];
|
Dancer_Out[i] = new CTexture[nDancerOutPtn];
|
||||||
for (int p = 0; p < nDancerOutPtn; p++) {
|
for (int p = 0; p < nDancerOutPtn; p++) {
|
||||||
Dancer_Out[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}_Out{Path.DirectorySeparatorChar}{p}.png");
|
Dancer_Out[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}_Out{Path.DirectorySeparatorChar}{p}.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nDancerPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1{Path.DirectorySeparatorChar}");
|
nDancerPtn = OpenTaiko.t連番画像の枚数を数える($@"{path}{Path.DirectorySeparatorChar}1{Path.DirectorySeparatorChar}");
|
||||||
if (nDancerPtn != 0) {
|
if (nDancerPtn != 0) {
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
Dancer[i] = new CTexture[nDancerPtn];
|
Dancer[i] = new CTexture[nDancerPtn];
|
||||||
for (int p = 0; p < nDancerPtn; p++) {
|
for (int p = 0; p < nDancerPtn; p++) {
|
||||||
Dancer[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}{Path.DirectorySeparatorChar}{p}.png");
|
Dancer[i][p] = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}{(i + 1)}{Path.DirectorySeparatorChar}{p}.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arMotionArray_In = CConversion.StringToIntArray(Game_Dancer_In_Motion);
|
arMotionArray_In = CConversion.StringToIntArray(Game_Dancer_In_Motion);
|
||||||
if (this.arMotionArray_In == null) arMotionArray_In = CConversion.StringToIntArray("0,0");
|
if (this.arMotionArray_In == null) arMotionArray_In = CConversion.StringToIntArray("0,0");
|
||||||
|
|
||||||
arMotionArray_Out = CConversion.StringToIntArray(Game_Dancer_Out_Motion);
|
arMotionArray_Out = CConversion.StringToIntArray(Game_Dancer_Out_Motion);
|
||||||
if (this.arMotionArray_Out == null) arMotionArray_Out = CConversion.StringToIntArray("0,0");
|
if (this.arMotionArray_Out == null) arMotionArray_Out = CConversion.StringToIntArray("0,0");
|
||||||
|
|
||||||
this.ar踊り子モーション番号 = CConversion.StringToIntArray(OpenTaiko.Skin.Game_Dancer_Motion);
|
this.ar踊り子モーション番号 = CConversion.StringToIntArray(OpenTaiko.Skin.Game_Dancer_Motion);
|
||||||
if (this.ar踊り子モーション番号 == null) ar踊り子モーション番号 = CConversion.StringToIntArray("0,0");
|
if (this.ar踊り子モーション番号 == null) ar踊り子モーション番号 = CConversion.StringToIntArray("0,0");
|
||||||
|
|
||||||
nNowDancerCounter = 0;
|
nNowDancerCounter = 0;
|
||||||
nNowDancerFrame = 0;
|
nNowDancerFrame = 0;
|
||||||
|
|
||||||
base.Activate();
|
base.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DeActivate() {
|
public override void DeActivate() {
|
||||||
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower || OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Dan)
|
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Tower || OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] == (int)Difficulty.Dan)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//this.ct踊り子モーション = null;
|
//this.ct踊り子モーション = null;
|
||||||
|
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
OpenTaiko.t安全にDisposeする(ref Dancer_In[i]);
|
OpenTaiko.t安全にDisposeする(ref Dancer_In[i]);
|
||||||
OpenTaiko.t安全にDisposeする(ref Dancer_Out[i]);
|
OpenTaiko.t安全にDisposeする(ref Dancer_Out[i]);
|
||||||
OpenTaiko.t安全にDisposeする(ref Dancer[i]);
|
OpenTaiko.t安全にDisposeする(ref Dancer[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CreateManagedResource() {
|
public override void CreateManagedResource() {
|
||||||
base.CreateManagedResource();
|
base.CreateManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReleaseManagedResource() {
|
public override void ReleaseManagedResource() {
|
||||||
base.ReleaseManagedResource();
|
base.ReleaseManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Draw() {
|
public override int Draw() {
|
||||||
if (this.IsFirstDraw) {
|
if (this.IsFirstDraw) {
|
||||||
this.IsFirstDraw = true;
|
this.IsFirstDraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Tower && OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Dan) {
|
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Tower && OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Dan) {
|
||||||
if (OpenTaiko.ConfigIni.ShowDancer && (this.ar踊り子モーション番号.Length - 1) != 0) {
|
if (OpenTaiko.ConfigIni.ShowDancer && (this.ar踊り子モーション番号.Length - 1) != 0) {
|
||||||
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerCounter += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / 60.0f) * (float)OpenTaiko.FPS.DeltaTime / nDancerBeat;
|
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerCounter += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / 60.0f) * (float)OpenTaiko.FPS.DeltaTime / nDancerBeat;
|
||||||
if (nNowDancerCounter >= 1) {
|
if (nNowDancerCounter >= 1) {
|
||||||
nNowDancerCounter = 0;
|
nNowDancerCounter = 0;
|
||||||
}
|
}
|
||||||
nNowDancerFrame = (int)(nNowDancerCounter * (this.ar踊り子モーション番号.Length - 1));
|
nNowDancerFrame = (int)(nNowDancerCounter * (this.ar踊り子モーション番号.Length - 1));
|
||||||
|
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
if ((int)OpenTaiko.stage演奏ドラム画面.actGauge.db現在のゲージ値[0] >= OpenTaiko.Skin.Game_Dancer_Gauge[i]) {
|
if ((int)OpenTaiko.stage演奏ドラム画面.actGauge.db現在のゲージ値[0] >= OpenTaiko.Skin.Game_Dancer_Gauge[i]) {
|
||||||
if (DancerStates[i] == 0) {
|
if (DancerStates[i] == 0) {
|
||||||
DancerStates[i] = 1;
|
DancerStates[i] = 1;
|
||||||
nNowDancerInCounter[i] = 0;
|
nNowDancerInCounter[i] = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DancerStates[i] == 3) {
|
if (DancerStates[i] == 3) {
|
||||||
DancerStates[i] = 2;
|
DancerStates[i] = 2;
|
||||||
nNowDancerOutCounter[i] = 0;
|
nNowDancerOutCounter[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (DancerStates[i]) {
|
switch (DancerStates[i]) {
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case 1: {
|
case 1: {
|
||||||
if (nDancerInInterval == 0) {
|
if (nDancerInInterval == 0) {
|
||||||
DancerStates[i] = 3;
|
DancerStates[i] = 3;
|
||||||
} else {
|
} else {
|
||||||
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerInCounter[i] += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / nDancerInInterval) * (float)OpenTaiko.FPS.DeltaTime;
|
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerInCounter[i] += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / nDancerInInterval) * (float)OpenTaiko.FPS.DeltaTime;
|
||||||
|
|
||||||
if (nNowDancerInCounter[i] >= 1) {
|
if (nNowDancerInCounter[i] >= 1) {
|
||||||
nNowDancerInCounter[i] = 1;
|
nNowDancerInCounter[i] = 1;
|
||||||
DancerStates[i] = 3;
|
DancerStates[i] = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int frame = (int)(nNowDancerInCounter[i] * (this.arMotionArray_In.Length - 1));
|
int frame = (int)(nNowDancerInCounter[i] * (this.arMotionArray_In.Length - 1));
|
||||||
if (this.Dancer_In[i] != null && this.Dancer_In[i].Length > 0 && this.Dancer_In[i][this.arMotionArray_In[frame]] != null) {
|
if (this.Dancer_In[i] != null && this.Dancer_In[i].Length > 0 && this.Dancer_In[i][this.arMotionArray_In[frame]] != null) {
|
||||||
this.Dancer_In[i][this.arMotionArray_In[frame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
this.Dancer_In[i][this.arMotionArray_In[frame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case 2: {
|
||||||
if (nDancerOutInterval == 0) {
|
if (nDancerOutInterval == 0) {
|
||||||
DancerStates[i] = 0;
|
DancerStates[i] = 0;
|
||||||
} else {
|
} else {
|
||||||
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerOutCounter[i] += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / nDancerOutInterval) * (float)OpenTaiko.FPS.DeltaTime;
|
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) nNowDancerOutCounter[i] += Math.Abs((float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / nDancerOutInterval) * (float)OpenTaiko.FPS.DeltaTime;
|
||||||
|
|
||||||
if (nNowDancerOutCounter[i] >= 1) {
|
if (nNowDancerOutCounter[i] >= 1) {
|
||||||
nNowDancerOutCounter[i] = 1;
|
nNowDancerOutCounter[i] = 1;
|
||||||
DancerStates[i] = 0;
|
DancerStates[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int frame = (int)(nNowDancerOutCounter[i] * (this.arMotionArray_Out.Length - 1));
|
int frame = (int)(nNowDancerOutCounter[i] * (this.arMotionArray_Out.Length - 1));
|
||||||
if (this.Dancer_Out[i] != null && this.Dancer_Out[i].Length > 0 && this.Dancer_Out[i][this.arMotionArray_Out[frame]] != null) {
|
if (this.Dancer_Out[i] != null && this.Dancer_Out[i].Length > 0 && this.Dancer_Out[i][this.arMotionArray_Out[frame]] != null) {
|
||||||
this.Dancer_Out[i][this.arMotionArray_Out[frame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
this.Dancer_Out[i][this.arMotionArray_Out[frame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (this.Dancer[i] != null && this.Dancer[i].Length > 0 && this.Dancer[i][this.ar踊り子モーション番号[nNowDancerFrame]] != null) {
|
if (this.Dancer[i] != null && this.Dancer[i].Length > 0 && this.Dancer[i][this.ar踊り子モーション番号[nNowDancerFrame]] != null) {
|
||||||
this.Dancer[i][this.ar踊り子モーション番号[nNowDancerFrame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
this.Dancer[i][this.ar踊り子モーション番号[nNowDancerFrame]].t2D中心基準描画(OpenTaiko.Skin.Game_Dancer_X[i], OpenTaiko.Skin.Game_Dancer_Y[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.Draw();
|
return base.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region[ private ]
|
#region[ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
private int nDancerCount;
|
private int nDancerCount;
|
||||||
private float[] nNowDancerInCounter;
|
private float[] nNowDancerInCounter;
|
||||||
private float[] nNowDancerOutCounter;
|
private float[] nNowDancerOutCounter;
|
||||||
private float nNowDancerCounter;
|
private float nNowDancerCounter;
|
||||||
private int nNowDancerFrame;
|
private int nNowDancerFrame;
|
||||||
private int nDancerInPtn;
|
private int nDancerInPtn;
|
||||||
private int nDancerOutPtn;
|
private int nDancerOutPtn;
|
||||||
private int nDancerPtn;
|
private int nDancerPtn;
|
||||||
private float nDancerBeat;
|
private float nDancerBeat;
|
||||||
private float nDancerInInterval;
|
private float nDancerInInterval;
|
||||||
private float nDancerOutInterval;
|
private float nDancerOutInterval;
|
||||||
private int[] arMotionArray_In;
|
private int[] arMotionArray_In;
|
||||||
private int[] arMotionArray_Out;
|
private int[] arMotionArray_Out;
|
||||||
private int[] ar踊り子モーション番号;
|
private int[] ar踊り子モーション番号;
|
||||||
//public CCounter ct踊り子モーション;
|
//public CCounter ct踊り子モーション;
|
||||||
private CTexture[][] Dancer_In;
|
private CTexture[][] Dancer_In;
|
||||||
private CTexture[][] Dancer_Out;
|
private CTexture[][] Dancer_Out;
|
||||||
private CTexture[][] Dancer;
|
private CTexture[][] Dancer;
|
||||||
private int[] DancerStates;
|
private int[] DancerStates;
|
||||||
private string Game_Dancer_In_Motion;
|
private string Game_Dancer_In_Motion;
|
||||||
private string Game_Dancer_Out_Motion;
|
private string Game_Dancer_Out_Motion;
|
||||||
|
|
||||||
private void LoadDancerConifg(string dancerPath) {
|
private void LoadDancerConifg(string dancerPath) {
|
||||||
var _str = "";
|
var _str = "";
|
||||||
OpenTaiko.Skin.LoadSkinConfigFromFile(dancerPath + @$"{Path.DirectorySeparatorChar}DancerConfig.txt", ref _str);
|
OpenTaiko.Skin.LoadSkinConfigFromFile(dancerPath + @$"{Path.DirectorySeparatorChar}DancerConfig.txt", ref _str);
|
||||||
|
|
||||||
string[] delimiter = { "\n" };
|
string[] delimiter = { "\n" };
|
||||||
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
OpenTaiko.Skin.Game_Dancer_X = new int[] { 640, 430, 856, 215, 1070 };
|
OpenTaiko.Skin.Game_Dancer_X = new int[] { 640, 430, 856, 215, 1070 };
|
||||||
OpenTaiko.Skin.Game_Dancer_Y = new int[] { 500, 500, 500, 500, 500 };
|
OpenTaiko.Skin.Game_Dancer_Y = new int[] { 500, 500, 500, 500, 500 };
|
||||||
nDancerCount = 5;
|
nDancerCount = 5;
|
||||||
nDancerInInterval = 0;
|
nDancerInInterval = 0;
|
||||||
nDancerOutInterval = 0;
|
nDancerOutInterval = 0;
|
||||||
|
|
||||||
foreach (string s in strSingleLine) {
|
foreach (string s in strSingleLine) {
|
||||||
string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' });
|
string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' });
|
||||||
if ((str.Length != 0) && (str[0] != ';')) {
|
if ((str.Length != 0) && (str[0] != ';')) {
|
||||||
try {
|
try {
|
||||||
string strCommand;
|
string strCommand;
|
||||||
string strParam;
|
string strParam;
|
||||||
string[] strArray = str.Split(new char[] { '=' });
|
string[] strArray = str.Split(new char[] { '=' });
|
||||||
|
|
||||||
if (strArray.Length == 2) {
|
if (strArray.Length == 2) {
|
||||||
strCommand = strArray[0].Trim();
|
strCommand = strArray[0].Trim();
|
||||||
strParam = strArray[1].Trim();
|
strParam = strArray[1].Trim();
|
||||||
|
|
||||||
if (strCommand == "Game_Dancer_Count") {
|
if (strCommand == "Game_Dancer_Count") {
|
||||||
nDancerCount = int.Parse(strParam);
|
nDancerCount = int.Parse(strParam);
|
||||||
OpenTaiko.Skin.Game_Dancer_X = new int[nDancerCount];
|
OpenTaiko.Skin.Game_Dancer_X = new int[nDancerCount];
|
||||||
OpenTaiko.Skin.Game_Dancer_Y = new int[nDancerCount];
|
OpenTaiko.Skin.Game_Dancer_Y = new int[nDancerCount];
|
||||||
} else if (strCommand == "Game_Dancer_X") {
|
} else if (strCommand == "Game_Dancer_X") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
OpenTaiko.Skin.Game_Dancer_X[i] = int.Parse(strSplit[i]);
|
OpenTaiko.Skin.Game_Dancer_X[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
} else if (strCommand == "Game_Dancer_Y") {
|
} else if (strCommand == "Game_Dancer_Y") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
OpenTaiko.Skin.Game_Dancer_Y[i] = int.Parse(strSplit[i]);
|
OpenTaiko.Skin.Game_Dancer_Y[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
} else if (strCommand == "Game_Dancer_Motion") {
|
} else if (strCommand == "Game_Dancer_Motion") {
|
||||||
OpenTaiko.Skin.Game_Dancer_Motion = strParam;
|
OpenTaiko.Skin.Game_Dancer_Motion = strParam;
|
||||||
} else if (strCommand == "Game_Dancer_In_Motion") {
|
} else if (strCommand == "Game_Dancer_In_Motion") {
|
||||||
Game_Dancer_In_Motion = strParam;
|
Game_Dancer_In_Motion = strParam;
|
||||||
} else if (strCommand == "Game_Dancer_Out_Motion") {
|
} else if (strCommand == "Game_Dancer_Out_Motion") {
|
||||||
Game_Dancer_Out_Motion = strParam;
|
Game_Dancer_Out_Motion = strParam;
|
||||||
} else if (strCommand == "Game_Dancer_Beat") {
|
} else if (strCommand == "Game_Dancer_Beat") {
|
||||||
nDancerBeat = int.Parse(strParam);
|
nDancerBeat = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Dancer_In_Interval") {
|
} else if (strCommand == "Game_Dancer_In_Interval") {
|
||||||
nDancerInInterval = int.Parse(strParam);
|
nDancerInInterval = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Dancer_Out_Interval") {
|
} else if (strCommand == "Game_Dancer_Out_Interval") {
|
||||||
nDancerOutInterval = int.Parse(strParam);
|
nDancerOutInterval = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Dancer_Gauge") {
|
} else if (strCommand == "Game_Dancer_Gauge") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < nDancerCount; i++) {
|
for (int i = 0; i < nDancerCount; i++) {
|
||||||
OpenTaiko.Skin.Game_Dancer_Gauge[i] = int.Parse(strSplit[i]);
|
OpenTaiko.Skin.Game_Dancer_Gauge[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
Trace.TraceError(exception.ToString());
|
Trace.TraceError(exception.ToString());
|
||||||
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,60 +1,60 @@
|
|||||||
using FDK;
|
using FDK;
|
||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
internal class CActImplFooter : CActivity {
|
internal class CActImplFooter : CActivity {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// フッター
|
/// フッター
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CActImplFooter() {
|
public CActImplFooter() {
|
||||||
base.IsDeActivated = true;
|
base.IsDeActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Activate() {
|
public override void Activate() {
|
||||||
var footerDir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.FOOTER}");
|
var footerDir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.FOOTER}");
|
||||||
var preset = HScenePreset.GetBGPreset();
|
var preset = HScenePreset.GetBGPreset();
|
||||||
|
|
||||||
if (System.IO.Directory.Exists(footerDir)) {
|
if (System.IO.Directory.Exists(footerDir)) {
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
var upDirs = System.IO.Directory.GetFiles(footerDir);
|
var upDirs = System.IO.Directory.GetFiles(footerDir);
|
||||||
if (upDirs.Length > 0) {
|
if (upDirs.Length > 0 && preset.FooterSet.Length > 0) {
|
||||||
var _presetPath = (preset != null && preset.FooterSet != null) ? $@"{footerDir}" + preset.FooterSet[random.Next(0, preset.FooterSet.Length)] + ".png" : "";
|
var _presetPath = (preset != null && preset.FooterSet != null) ? $@"{footerDir}" + preset.FooterSet[random.Next(0, preset.FooterSet.Length)] + ".png" : "";
|
||||||
var path = (preset != null && System.IO.File.Exists(_presetPath))
|
var path = (preset != null && System.IO.File.Exists(_presetPath))
|
||||||
? _presetPath
|
? _presetPath
|
||||||
: upDirs[random.Next(0, upDirs.Length)];
|
: upDirs[random.Next(0, upDirs.Length)];
|
||||||
|
|
||||||
Mob_Footer = OpenTaiko.tテクスチャの生成(path);
|
Mob_Footer = OpenTaiko.tテクスチャの生成(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Activate();
|
base.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DeActivate() {
|
public override void DeActivate() {
|
||||||
OpenTaiko.tDisposeSafely(ref Mob_Footer);
|
OpenTaiko.tDisposeSafely(ref Mob_Footer);
|
||||||
|
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CreateManagedResource() {
|
public override void CreateManagedResource() {
|
||||||
base.CreateManagedResource();
|
base.CreateManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReleaseManagedResource() {
|
public override void ReleaseManagedResource() {
|
||||||
base.ReleaseManagedResource();
|
base.ReleaseManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Draw() {
|
public override int Draw() {
|
||||||
if (this.Mob_Footer != null) {
|
if (this.Mob_Footer != null) {
|
||||||
this.Mob_Footer.t2D描画(0, OpenTaiko.Skin.Resolution[1] - this.Mob_Footer.szTextureSize.Height);
|
this.Mob_Footer.t2D描画(0, OpenTaiko.Skin.Resolution[1] - this.Mob_Footer.szTextureSize.Height);
|
||||||
}
|
}
|
||||||
return base.Draw();
|
return base.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region[ private ]
|
#region[ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
public CTexture Mob_Footer;
|
public CTexture Mob_Footer;
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,83 +1,83 @@
|
|||||||
using FDK;
|
using FDK;
|
||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
internal class CActImplMob : CActivity {
|
internal class CActImplMob : CActivity {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 踊り子
|
/// 踊り子
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CActImplMob() {
|
public CActImplMob() {
|
||||||
base.IsDeActivated = true;
|
base.IsDeActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Activate() {
|
public override void Activate() {
|
||||||
var mobDir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.MOB}");
|
var mobDir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.MOB}");
|
||||||
var preset = HScenePreset.GetBGPreset();
|
var preset = HScenePreset.GetBGPreset();
|
||||||
|
|
||||||
if (System.IO.Directory.Exists(mobDir)) {
|
if (System.IO.Directory.Exists(mobDir)) {
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
var upDirs = System.IO.Directory.GetDirectories(mobDir);
|
var upDirs = System.IO.Directory.GetDirectories(mobDir);
|
||||||
if (upDirs.Length > 0) {
|
if (upDirs.Length > 0 && preset.MobSet.Length > 0) {
|
||||||
var _presetPath = (preset != null && preset.MobSet != null) ? $@"{mobDir}" + preset.MobSet[random.Next(0, preset.MobSet.Length)] : "";
|
var _presetPath = (preset != null && preset.MobSet != null) ? $@"{mobDir}" + preset.MobSet[random.Next(0, preset.MobSet.Length)] : "";
|
||||||
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
||||||
? _presetPath
|
? _presetPath
|
||||||
: upDirs[random.Next(0, upDirs.Length)];
|
: upDirs[random.Next(0, upDirs.Length)];
|
||||||
|
|
||||||
MobScript = new ScriptBG($@"{path}{Path.DirectorySeparatorChar}Script.lua");
|
MobScript = new ScriptBG($@"{path}{Path.DirectorySeparatorChar}Script.lua");
|
||||||
MobScript.Init();
|
MobScript.Init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Activate();
|
base.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DeActivate() {
|
public override void DeActivate() {
|
||||||
MobScript?.Dispose();
|
MobScript?.Dispose();
|
||||||
|
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CreateManagedResource() {
|
public override void CreateManagedResource() {
|
||||||
base.CreateManagedResource();
|
base.CreateManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReleaseManagedResource() {
|
public override void ReleaseManagedResource() {
|
||||||
base.ReleaseManagedResource();
|
base.ReleaseManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Draw() {
|
public override int Draw() {
|
||||||
if (!OpenTaiko.stage演奏ドラム画面.bDoublePlay) {
|
if (!OpenTaiko.stage演奏ドラム画面.bDoublePlay) {
|
||||||
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Tower && OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Dan) {
|
if (OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Tower && OpenTaiko.stageSongSelect.nChoosenSongDifficulty[0] != (int)Difficulty.Dan) {
|
||||||
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) MobScript?.Update();
|
if (!OpenTaiko.stage演奏ドラム画面.bPAUSE) MobScript?.Update();
|
||||||
MobScript?.Draw();
|
MobScript?.Draw();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (HGaugeMethods.UNSAFE_IsRainbow(0))
|
if (HGaugeMethods.UNSAFE_IsRainbow(0))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) nNowMobCounter += (Math.Abs((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / 60.0f) * (float)TJAPlayer3.FPS.DeltaTime) * 180 / nMobBeat;
|
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) nNowMobCounter += (Math.Abs((float)TJAPlayer3.stage演奏ドラム画面.actPlayInfo.dbBPM[0] / 60.0f) * (float)TJAPlayer3.FPS.DeltaTime) * 180 / nMobBeat;
|
||||||
bool endAnime = nNowMobCounter >= 180;
|
bool endAnime = nNowMobCounter >= 180;
|
||||||
|
|
||||||
if (endAnime)
|
if (endAnime)
|
||||||
{
|
{
|
||||||
nNowMobCounter = 0;
|
nNowMobCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int moveHeight = (int)(70 * (TJAPlayer3.Skin.Resolution[1] / 720.0));
|
int moveHeight = (int)(70 * (TJAPlayer3.Skin.Resolution[1] / 720.0));
|
||||||
|
|
||||||
if (Mob != null)
|
if (Mob != null)
|
||||||
Mob.t2D描画(0, (TJAPlayer3.Skin.Resolution[1] - (Mob.szテクスチャサイズ.Height - moveHeight)) + -((float)Math.Sin(nNowMobCounter * (Math.PI / 180)) * moveHeight));
|
Mob.t2D描画(0, (TJAPlayer3.Skin.Resolution[1] - (Mob.szテクスチャサイズ.Height - moveHeight)) + -((float)Math.Sin(nNowMobCounter * (Math.PI / 180)) * moveHeight));
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return base.Draw();
|
return base.Draw();
|
||||||
}
|
}
|
||||||
#region[ private ]
|
#region[ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
private ScriptBG MobScript;
|
private ScriptBG MobScript;
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,224 +1,224 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using FDK;
|
using FDK;
|
||||||
|
|
||||||
namespace OpenTaiko {
|
namespace OpenTaiko {
|
||||||
internal class CActImplRunner : CActivity {
|
internal class CActImplRunner : CActivity {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ランナー
|
/// ランナー
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CActImplRunner() {
|
public CActImplRunner() {
|
||||||
base.IsDeActivated = true;
|
base.IsDeActivated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start(int Player, bool IsMiss, CDTX.CChip pChip) {
|
public void Start(int Player, bool IsMiss, CDTX.CChip pChip) {
|
||||||
if (Runner != null && !OpenTaiko.ConfigIni.SimpleMode) {
|
if (Runner != null && !OpenTaiko.ConfigIni.SimpleMode) {
|
||||||
while (stRunners[Index].b使用中) {
|
while (stRunners[Index].b使用中) {
|
||||||
Index += 1;
|
Index += 1;
|
||||||
if (Index >= 128) {
|
if (Index >= 128) {
|
||||||
Index = 0;
|
Index = 0;
|
||||||
break; // 2018.6.15 IMARER 無限ループが発生するので修正
|
break; // 2018.6.15 IMARER 無限ループが発生するので修正
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pChip.nチャンネル番号 < 0x15 || (pChip.nチャンネル番号 >= 0x1A)) {
|
if (pChip.nチャンネル番号 < 0x15 || (pChip.nチャンネル番号 >= 0x1A)) {
|
||||||
if (!stRunners[Index].b使用中) {
|
if (!stRunners[Index].b使用中) {
|
||||||
stRunners[Index].b使用中 = true;
|
stRunners[Index].b使用中 = true;
|
||||||
stRunners[Index].nPlayer = Player;
|
stRunners[Index].nPlayer = Player;
|
||||||
if (IsMiss == true) {
|
if (IsMiss == true) {
|
||||||
stRunners[Index].nType = 0;
|
stRunners[Index].nType = 0;
|
||||||
} else {
|
} else {
|
||||||
stRunners[Index].nType = random.Next(1, Type + 1);
|
stRunners[Index].nType = random.Next(1, Type + 1);
|
||||||
}
|
}
|
||||||
stRunners[Index].ct進行 = new CCounter(0, OpenTaiko.Skin.Resolution[0], Timer, OpenTaiko.Timer);
|
stRunners[Index].ct進行 = new CCounter(0, OpenTaiko.Skin.Resolution[0], Timer, OpenTaiko.Timer);
|
||||||
stRunners[Index].nOldValue = 0;
|
stRunners[Index].nOldValue = 0;
|
||||||
stRunners[Index].nNowPtn = 0;
|
stRunners[Index].nNowPtn = 0;
|
||||||
stRunners[Index].fX = 0;
|
stRunners[Index].fX = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Activate() {
|
public override void Activate() {
|
||||||
if (OpenTaiko.ConfigIni.SimpleMode) {
|
if (OpenTaiko.ConfigIni.SimpleMode) {
|
||||||
base.Activate();
|
base.Activate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 128; i++) {
|
for (int i = 0; i < 128; i++) {
|
||||||
stRunners[i] = new STRunner();
|
stRunners[i] = new STRunner();
|
||||||
stRunners[i].b使用中 = false;
|
stRunners[i].b使用中 = false;
|
||||||
stRunners[i].ct進行 = new CCounter();
|
stRunners[i].ct進行 = new CCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
var preset = HScenePreset.GetBGPreset();
|
var preset = HScenePreset.GetBGPreset();
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.RUNNER}");
|
var dancerOrigindir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.RUNNER}");
|
||||||
if (System.IO.Directory.Exists($@"{dancerOrigindir}")) {
|
if (System.IO.Directory.Exists($@"{dancerOrigindir}")) {
|
||||||
var dirs = System.IO.Directory.GetDirectories($@"{dancerOrigindir}");
|
var dirs = System.IO.Directory.GetDirectories($@"{dancerOrigindir}");
|
||||||
if (dirs.Length > 0) {
|
if (dirs.Length > 0 && preset.RunnerSet.Length > 0) {
|
||||||
var _presetPath = (preset != null && preset.RunnerSet != null) ? $@"{dancerOrigindir}" + preset.RunnerSet[random.Next(0, preset.RunnerSet.Length)] : "";
|
var _presetPath = (preset != null && preset.RunnerSet != null) ? $@"{dancerOrigindir}" + preset.RunnerSet[random.Next(0, preset.RunnerSet.Length)] : "";
|
||||||
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
var path = (preset != null && System.IO.Directory.Exists(_presetPath))
|
||||||
? _presetPath
|
? _presetPath
|
||||||
: dirs[random.Next(0, dirs.Length)];
|
: dirs[random.Next(0, dirs.Length)];
|
||||||
LoadRunnerConifg(path);
|
LoadRunnerConifg(path);
|
||||||
|
|
||||||
Runner = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}Runner.png");
|
Runner = OpenTaiko.tテクスチャの生成($@"{path}{Path.DirectorySeparatorChar}Runner.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// フィールド上で代入してたためこちらへ移動。
|
// フィールド上で代入してたためこちらへ移動。
|
||||||
base.Activate();
|
base.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DeActivate() {
|
public override void DeActivate() {
|
||||||
if (OpenTaiko.ConfigIni.SimpleMode) {
|
if (OpenTaiko.ConfigIni.SimpleMode) {
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 128; i++) {
|
for (int i = 0; i < 128; i++) {
|
||||||
stRunners[i].ct進行 = null;
|
stRunners[i].ct進行 = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenTaiko.tDisposeSafely(ref Runner);
|
OpenTaiko.tDisposeSafely(ref Runner);
|
||||||
|
|
||||||
base.DeActivate();
|
base.DeActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void CreateManagedResource() {
|
public override void CreateManagedResource() {
|
||||||
base.CreateManagedResource();
|
base.CreateManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReleaseManagedResource() {
|
public override void ReleaseManagedResource() {
|
||||||
base.ReleaseManagedResource();
|
base.ReleaseManagedResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Draw() {
|
public override int Draw() {
|
||||||
if (OpenTaiko.ConfigIni.SimpleMode) {
|
if (OpenTaiko.ConfigIni.SimpleMode) {
|
||||||
return base.Draw();
|
return base.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 128; i++) {
|
for (int i = 0; i < 128; i++) {
|
||||||
if (stRunners[i].b使用中) {
|
if (stRunners[i].b使用中) {
|
||||||
stRunners[i].nOldValue = stRunners[i].ct進行.CurrentValue;
|
stRunners[i].nOldValue = stRunners[i].ct進行.CurrentValue;
|
||||||
stRunners[i].ct進行.Tick();
|
stRunners[i].ct進行.Tick();
|
||||||
if (stRunners[i].ct進行.IsEnded || stRunners[i].fX > OpenTaiko.Skin.Resolution[0]) {
|
if (stRunners[i].ct進行.IsEnded || stRunners[i].fX > OpenTaiko.Skin.Resolution[0]) {
|
||||||
stRunners[i].ct進行.Stop();
|
stRunners[i].ct進行.Stop();
|
||||||
stRunners[i].b使用中 = false;
|
stRunners[i].b使用中 = false;
|
||||||
}
|
}
|
||||||
for (int n = stRunners[i].nOldValue; n < stRunners[i].ct進行.CurrentValue; n++) {
|
for (int n = stRunners[i].nOldValue; n < stRunners[i].ct進行.CurrentValue; n++) {
|
||||||
stRunners[i].fX += (float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[stRunners[i].nPlayer] / 18;
|
stRunners[i].fX += (float)OpenTaiko.stage演奏ドラム画面.actPlayInfo.dbBPM[stRunners[i].nPlayer] / 18;
|
||||||
int Width = OpenTaiko.Skin.Resolution[0] / Ptn;
|
int Width = OpenTaiko.Skin.Resolution[0] / Ptn;
|
||||||
stRunners[i].nNowPtn = (int)stRunners[i].fX / Width;
|
stRunners[i].nNowPtn = (int)stRunners[i].fX / Width;
|
||||||
}
|
}
|
||||||
if (Runner != null) {
|
if (Runner != null) {
|
||||||
if (stRunners[i].nPlayer == 0) {
|
if (stRunners[i].nPlayer == 0) {
|
||||||
Runner.t2D描画((int)(StartPoint_X[0] + stRunners[i].fX), StartPoint_Y[0], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
Runner.t2D描画((int)(StartPoint_X[0] + stRunners[i].fX), StartPoint_Y[0], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
||||||
} else {
|
} else {
|
||||||
Runner.t2D描画((int)(StartPoint_X[1] + stRunners[i].fX), StartPoint_Y[1], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
Runner.t2D描画((int)(StartPoint_X[1] + stRunners[i].fX), StartPoint_Y[1], new Rectangle(stRunners[i].nNowPtn * Size[0], stRunners[i].nType * Size[1], Size[0], Size[1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return base.Draw();
|
return base.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region[ private ]
|
#region[ private ]
|
||||||
//-----------------
|
//-----------------
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
private struct STRunner {
|
private struct STRunner {
|
||||||
public bool b使用中;
|
public bool b使用中;
|
||||||
public int nPlayer;
|
public int nPlayer;
|
||||||
public int nType;
|
public int nType;
|
||||||
public int nOldValue;
|
public int nOldValue;
|
||||||
public int nNowPtn;
|
public int nNowPtn;
|
||||||
public float fX;
|
public float fX;
|
||||||
public CCounter ct進行;
|
public CCounter ct進行;
|
||||||
}
|
}
|
||||||
private STRunner[] stRunners = new STRunner[128];
|
private STRunner[] stRunners = new STRunner[128];
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
int Index = 0;
|
int Index = 0;
|
||||||
|
|
||||||
private CTexture Runner;
|
private CTexture Runner;
|
||||||
|
|
||||||
private void LoadRunnerConifg(string dancerPath) {
|
private void LoadRunnerConifg(string dancerPath) {
|
||||||
var _str = "";
|
var _str = "";
|
||||||
OpenTaiko.Skin.LoadSkinConfigFromFile(dancerPath + @"\RunnerConfig.txt", ref _str);
|
OpenTaiko.Skin.LoadSkinConfigFromFile(dancerPath + @"\RunnerConfig.txt", ref _str);
|
||||||
|
|
||||||
string[] delimiter = { "\n" };
|
string[] delimiter = { "\n" };
|
||||||
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
string[] strSingleLine = _str.Split(delimiter, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
Size = new int[2] { 60, 125 };
|
Size = new int[2] { 60, 125 };
|
||||||
Ptn = 48;
|
Ptn = 48;
|
||||||
Type = 4;
|
Type = 4;
|
||||||
StartPoint_X = new int[2] { 175, 175 };
|
StartPoint_X = new int[2] { 175, 175 };
|
||||||
StartPoint_Y = new int[2] { 40, 560 };
|
StartPoint_Y = new int[2] { 40, 560 };
|
||||||
Timer = 16;
|
Timer = 16;
|
||||||
|
|
||||||
foreach (string s in strSingleLine) {
|
foreach (string s in strSingleLine) {
|
||||||
string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' });
|
string str = s.Replace('\t', ' ').TrimStart(new char[] { '\t', ' ' });
|
||||||
if ((str.Length != 0) && (str[0] != ';')) {
|
if ((str.Length != 0) && (str[0] != ';')) {
|
||||||
try {
|
try {
|
||||||
string strCommand;
|
string strCommand;
|
||||||
string strParam;
|
string strParam;
|
||||||
string[] strArray = str.Split(new char[] { '=' });
|
string[] strArray = str.Split(new char[] { '=' });
|
||||||
|
|
||||||
if (strArray.Length == 2) {
|
if (strArray.Length == 2) {
|
||||||
strCommand = strArray[0].Trim();
|
strCommand = strArray[0].Trim();
|
||||||
strParam = strArray[1].Trim();
|
strParam = strArray[1].Trim();
|
||||||
|
|
||||||
if (strCommand == "Game_Runner_Size") {
|
if (strCommand == "Game_Runner_Size") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
Size[i] = int.Parse(strSplit[i]);
|
Size[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
} else if (strCommand == "Game_Runner_Ptn") {
|
} else if (strCommand == "Game_Runner_Ptn") {
|
||||||
Ptn = int.Parse(strParam);
|
Ptn = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Runner_Type") {
|
} else if (strCommand == "Game_Runner_Type") {
|
||||||
Type = int.Parse(strParam);
|
Type = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Runner_Timer") {
|
} else if (strCommand == "Game_Runner_Timer") {
|
||||||
Timer = int.Parse(strParam);
|
Timer = int.Parse(strParam);
|
||||||
} else if (strCommand == "Game_Runner_StartPoint_X") {
|
} else if (strCommand == "Game_Runner_StartPoint_X") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
StartPoint_X[i] = int.Parse(strSplit[i]);
|
StartPoint_X[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
} else if (strCommand == "Game_Runner_StartPoint_Y") {
|
} else if (strCommand == "Game_Runner_StartPoint_Y") {
|
||||||
string[] strSplit = strParam.Split(',');
|
string[] strSplit = strParam.Split(',');
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
StartPoint_Y[i] = int.Parse(strSplit[i]);
|
StartPoint_Y[i] = int.Parse(strSplit[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
Trace.TraceError(exception.ToString());
|
Trace.TraceError(exception.ToString());
|
||||||
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
Trace.TraceError("例外が発生しましたが処理を継続します。 (6a32cc37-1527-412e-968a-512c1f0135cd)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ランナー画像のサイズ。 X, Y
|
// ランナー画像のサイズ。 X, Y
|
||||||
private int[] Size;
|
private int[] Size;
|
||||||
// ランナーのコマ数
|
// ランナーのコマ数
|
||||||
private int Ptn;
|
private int Ptn;
|
||||||
// ランナーのキャラクターのバリエーション(ミス時を含まない)。
|
// ランナーのキャラクターのバリエーション(ミス時を含まない)。
|
||||||
private int Type;
|
private int Type;
|
||||||
private int Timer;
|
private int Timer;
|
||||||
// スタート地点のX座標 1P, 2P
|
// スタート地点のX座標 1P, 2P
|
||||||
private int[] StartPoint_X;
|
private int[] StartPoint_X;
|
||||||
// スタート地点のY座標 1P, 2P
|
// スタート地点のY座標 1P, 2P
|
||||||
private int[] StartPoint_Y;
|
private int[] StartPoint_Y;
|
||||||
|
|
||||||
//-----------------
|
//-----------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user