1
0
mirror of synced 2025-02-20 04:21:02 +01:00

few unlockables improvements

This commit is contained in:
0auBSQ 2024-10-18 07:45:12 +09:00
parent 41086c5f3f
commit fc88d051a9
7 changed files with 463 additions and 420 deletions

View File

@ -63,6 +63,9 @@ namespace FDK {
private static int NoteModeID;
private static int NoiseEffectID;
private static int TimeID;
/// <summary>
/// 描画に使用する共通のバッファを作成
/// </summary>
@ -97,23 +100,39 @@ namespace FDK {
uniform sampler2D texture1;
uniform vec4 textureRect;
uniform vec2 scale;
uniform bool noteMode;
uniform int noteMode;
uniform int useNoiseEffect;
uniform float time;
varying vec2 texcoord;
float randomGrayscale(vec2 uv) {
return fract(sin(dot(uv.xy * 10.0, vec2(12.9898, 78.233))) * (43758.5453 * time * 0.02));
}
void main()
{
vec2 rect;
if (noteMode)
if (noteMode == 1)
{
rect = textureRect.xy + (texcoord * textureRect.zw * scale);
rect = rect - (floor((rect - textureRect.xy) / textureRect.zw) * textureRect.zw);
}
else
{
rect = vec2(textureRect.xy + (texcoord * textureRect.zw));
}
gl_FragColor = texture2D(texture1, rect) * color;
vec4 texColor = texture2D(texture1, rect) * color;
if (useNoiseEffect == 1) {
float n = randomGrayscale(rect);
texColor.rgb = vec3(n);
}
gl_FragColor = texColor;
}"
);
//------
@ -125,7 +144,8 @@ namespace FDK {
TextureRectID = Game.Gl.GetUniformLocation(ShaderProgram, "textureRect"); //テクスチャの切り抜きの座標と大きさ
CameraID = Game.Gl.GetUniformLocation(ShaderProgram, "camera"); //テクスチャの切り抜きの座標と大きさ
NoteModeID = Game.Gl.GetUniformLocation(ShaderProgram, "noteMode"); //テクスチャの切り抜きの座標と大きさ
NoiseEffectID = Game.Gl.GetUniformLocation(ShaderProgram, "useNoiseEffect");
TimeID = Game.Gl.GetUniformLocation(ShaderProgram, "time");
//------
@ -230,6 +250,12 @@ namespace FDK {
}
// Properties
public bool bUseNoiseEffect {
get;
set;
}
public bool b加算合成 {
get;
set;
@ -713,6 +739,11 @@ namespace FDK {
Game.Gl.Uniform1(NoteModeID, rollMode ? 1 : 0);
float _time = (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) % 100;
Game.Gl.Uniform1(TimeID, _time);
Game.Gl.Uniform1(NoiseEffectID, bUseNoiseEffect ? 1 : 0);
//描画-----
Game.Gl.BindVertexArray(VAO);
unsafe {
@ -844,6 +875,10 @@ namespace FDK {
Game.Gl.Uniform1(NoteModeID, 0);
float _time = (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) % 100;
Game.Gl.Uniform1(TimeID, _time);
Game.Gl.Uniform1(NoiseEffectID, bUseNoiseEffect ? 1 : 0);
//描画-----
Game.Gl.BindVertexArray(VAO);
unsafe {

View File

@ -229,6 +229,8 @@ namespace OpenTaiko {
this.Type = "me";
bool fulfiled = this.tValueRequirementMet(inputValues[0], this.Values[0]);
return (fulfiled, CLangManager.LangInstance.GetString(fulfiled ? "UNLOCK_COIN_BOUGHT" : "UNLOCK_COIN_MORE"));
default:
return (false, null);
}
}

View File

@ -152,7 +152,14 @@ namespace OpenTaiko {
this.rCurrentlyDisplayedPreimage.vcScaleRatio.X = num4 * xRatio;
this.rCurrentlyDisplayedPreimage.vcScaleRatio.Y = num4 * xRatio;
this.rCurrentlyDisplayedPreimage.t2D拡大率考慮中央基準描画(OpenTaiko.Skin.SongSelect_Preimage[0], OpenTaiko.Skin.SongSelect_Preimage[1]);
var HiddenIndex = OpenTaiko.Databases.DBSongUnlockables.tGetSongHiddenIndex(OpenTaiko.stageSongSelect.actSongList.rCurrentlySelectedSong);
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.BLURED) {
this.rCurrentlyDisplayedPreimage.bUseNoiseEffect = true;
this.rCurrentlyDisplayedPreimage.t2D拡大率考慮中央基準描画(OpenTaiko.Skin.SongSelect_Preimage[0], OpenTaiko.Skin.SongSelect_Preimage[1]);
this.rCurrentlyDisplayedPreimage.bUseNoiseEffect = false;
} else
this.rCurrentlyDisplayedPreimage.t2D拡大率考慮中央基準描画(OpenTaiko.Skin.SongSelect_Preimage[0], OpenTaiko.Skin.SongSelect_Preimage[1]);
}
}
}

View File

@ -137,7 +137,7 @@ namespace OpenTaiko {
if ((cスコア != null)
&& !string.IsNullOrEmpty(cスコア..strBGMファイル名)
&& OpenTaiko.stageSongSelect.ePhaseID != CStage.EPhase.SongSelect_FadeOutToNowLoading
&& HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED
&& HiddenIndex < DBSongUnlockables.EHiddenIndex.GRAYED
) {
string strPreviewFilename = cスコア.. + cスコア..Presound;
try {

View File

@ -910,10 +910,9 @@ namespace OpenTaiko {
}
#endregion
#region [ "曲データを検索しています" ]
try
{
try {
this.txEnumeratingSongs = new CTexture(ft曲リスト用フォント.DrawText("Now loading songs.\nPlease wait...", Color.White));
this.txEnumeratingSongs.vcScaleRatio = new Vector3D<float>( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
this.txEnumeratingSongs.vcScaleRatio = new Vector3D<float>(0.5f, 0.5f, 1f); // 半分のサイズで表示する。
/*
using ( Bitmap image = new Bitmap( 640, 96 ) )
@ -1344,7 +1343,7 @@ namespace OpenTaiko {
var IsSongLocked = OpenTaiko.Databases.DBSongUnlockables.tIsSongLocked(stバー情報[nパネル番号].reference);
var HiddenIndex = OpenTaiko.Databases.DBSongUnlockables.tGetSongHiddenIndex(stバー情報[nパネル番号].reference);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED) {
OpenTaiko.Tx.SongSelect_Bar_Genre_Locked_Top?.t2D描画(xAnime - (int)Box_X, y - ((int)Box_Y));
}
@ -1413,7 +1412,7 @@ namespace OpenTaiko {
#region [ Bar ]
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED) {
DrawBarCenter(OpenTaiko.Tx.SongSelect_Bar_Genre_Locked, OpenTaiko.Skin.SongSelect_Bar_X[barCenterNum], OpenTaiko.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, false, false);
} else {
var bar_genre = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, OpenTaiko.Tx.SongSelect_Bar_Genre);
@ -1558,7 +1557,7 @@ namespace OpenTaiko {
#region [Difficulty bars]
if (OpenTaiko.Tx.SongSelect_Frame_Score != null && HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED) {
if (OpenTaiko.Tx.SongSelect_Frame_Score != null && HiddenIndex < DBSongUnlockables.EHiddenIndex.GRAYED) {
// 難易度がTower、Danではない
if (OpenTaiko.stageSongSelect.n現在選択中の曲の難易度 != (int)Difficulty.Tower && OpenTaiko.stageSongSelect.n現在選択中の曲の難易度 != (int)Difficulty.Dan) {
#region [Display difficulty boxes]
@ -1965,7 +1964,7 @@ namespace OpenTaiko {
var IsSongLocked = OpenTaiko.Databases.DBSongUnlockables.tIsSongLocked(rCurrentlySelectedSong);
var HiddenIndex = OpenTaiko.Databases.DBSongUnlockables.tGetSongHiddenIndex(rCurrentlySelectedSong);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED) {
DrawBarCenter(OpenTaiko.Tx.SongSelect_Bar_Genre_Locked_Top, OpenTaiko.Skin.SongSelect_Bar_X[barCenterNum], OpenTaiko.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, false, false);
//TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked_Top?.t2D描画();
}
@ -2709,7 +2708,7 @@ namespace OpenTaiko {
if (eバー種別 == Eバー種別.Random) {
OpenTaiko.Tx.SongSelect_Bar_Genre_Random?.t2D描画(x, y);
} else if (eバー種別 != Eバー種別.BackBox) {
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED) {
OpenTaiko.Tx.SongSelect_Bar_Genre_Locked?.t2D描画(x, y);
return;
} else {

View File

@ -432,7 +432,7 @@ namespace OpenTaiko {
var IsSongLocked = OpenTaiko.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
var HiddenIndex = OpenTaiko.Databases.DBSongUnlockables.tGetSongHiddenIndex(this.rNowSelectedSong);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED) {
OpenTaiko.Tx.SongSelect_Song_Panel[4]?.t2D描画(0, 0);
} else {
if (OpenTaiko.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Dan)
@ -468,7 +468,7 @@ namespace OpenTaiko {
var IsSongLocked = OpenTaiko.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
var HiddenIndex = OpenTaiko.Databases.DBSongUnlockables.tGetSongHiddenIndex(this.rNowSelectedSong);
if (HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED) {
if (HiddenIndex < DBSongUnlockables.EHiddenIndex.GRAYED) {
actSongInfo.Draw();
if (this.n現在選択中の曲の難易度 == (int)Difficulty.Dan) {
actDanInfo.Draw();
@ -514,7 +514,7 @@ namespace OpenTaiko {
if (this.actDifficultySelectionScreen.bIsDifficltSelect == false || this.actSongList.ctDifficultyIn.CurrentValue < 1000)
this.actPreimageパネル.Draw();
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
if (HiddenIndex >= DBSongUnlockables.EHiddenIndex.GRAYED)
OpenTaiko.Tx.SongSelect_Song_Panel[5]?.t2D描画(0, 0);
if (IsSongLocked) {