Add files via upload

This commit is contained in:
bakustarver 2024-11-21 15:53:35 +02:00 committed by GitHub
parent 8c4edea89f
commit 00eaf0fd37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 73 additions and 12 deletions

View file

@ -46,8 +46,15 @@ module Preload
.include?("CustomGab.display_message(stat + XpLevel::MAX_LVL_MESSAGE)")
.include?("$scene4 = Scene_Menu.new(0)")
.sub!("$scene4 = Scene_Menu.new(0)", "$scene4 = Scene_Menu.new"),
Patch.new("Audio_EX2 WF-RGSS patch") #【WF-RGSS】共通rev29 base
.include?("module WFRGSS_AudioEX")
.sub!("return true if @audio__init", "return true"),
# .include?("self.to_widechar(")
Patch.new("WF-RGSS base patch") #【WF-RGSS】共通rev29 base
.include?("'MultiByteToWideChar', %w(i l p i p i)")
.include?("MultiByteToWideChar")
.include?("self.to_widechar(")
# .match?(/module WFRGSS\$/)
# .if? {|script| script.source.match? '/.*module WFRGSS\$/'}
# .remove!,
.replace!("testencode.rb"), #Window_Base
Patch.new("window check content height fix (mgq paradox)")
@ -189,11 +196,17 @@ module Preload
.imported?(nil)
.include?('text.push(self.to_s.scan(/#<(\S+):/)[0][0].to_s)')
.remove!,
Patch.new("tktk_bitmap dll test debug")
# Patch.new("tktk_bitmap dll test debug")
# .imported?(nil)
# .include?("DLL_NAME = 'tktk_bitmap'")
# # .remove!,
# .replace!("bitmap_tktk.rb"),
Patch.new("HN_Light tktk dll disable ")
.imported?(nil)
.include?("DLL_NAME = 'tktk_bitmap'")
# .remove!,
.replace!("bitmap_tktk.rb"),
.include?("HN_Light version")
.include?("tktkgame")
.sub!("@dark_sprite.update", "@dark_sprite.dispose"),
Patch.new("Flirt quest")
.imported?(nil)
.include?('class Spriteset_BattleUnit')

View file

@ -41,6 +41,29 @@ URL:: http://www.tktkgame.com/
############################################
=end
def dummy_blend_blt(dest_id, x, y, src_id, src_x, src_y, width, height, blend_mode, opacity)
puts "Blending operation started!"
puts "Destination Image ID: #{dest_id}"
puts "Source Image ID: #{src_id}"
puts "Blending Position: (#{x}, #{y})"
puts "Source Image Rectangle: (#{src_x}, #{src_y}, #{width}, #{height})"
puts "Blend Mode: #{blend_mode}"
puts "Opacity: #{opacity}"
puts "Simulating image blending operation..."
# More logic to simulate the blending can go here
puts "Finished blending images with the specified settings."
end
# Example usage:
# dest_bmp = Object.new
# src_bmp = Object.new
# rect = OpenStruct.new(x: 0, y: 0, width: 100, height: 100)
# Call the dummy blend function directly without a class
# dummy_blend_blt(
# dest_bmp.object_id, 10, 20, src_bmp.object_id, rect.x, rect.y, rect.width, rect.height, 'multiply', 0.7
# )
module TKTK_Bitmap
LARGE_BITMAP = true # 大容量のBitmap作成機能を使うかどうか
DLL_NAME = 'tktk_bitmap'
@ -83,7 +106,21 @@ module TKTK_Bitmap
# 色の反転
def invert(bitmap)
return @@invert.call(bitmap.object_id)
# $game_self_switches.delete(7,["A"])
# puts "ggg"
# $game_switches.each_with_index do |
# switch, index|
# # puts "Switch #{index + 1}: #{switch}"
# end
$game_switches[11] = false
# puts $game_switches[8]
# puts $game_switches[9]
# puts $game_switches[10]
# puts $game_switches[11]
# puts $game_switches[12]
return 0
end
# モザイク効果
@ -115,11 +152,18 @@ module TKTK_Bitmap
end
def blend_blt(dest_bmp, x, y, src_bmp, rect, blend_type=0, opacity=255)
@@blend_blt.call(dest_bmp.object_id, x, y, src_bmp.object_id,
rect.x, rect.y, rect.width, rect.height,
blend_type, opacity)
$game_switches[11] = false
# @@blend_blt.call(dest_bmp.object_id, x, y, src_bmp.object_id,
# rect.x, rect.y, rect.width, rect.height,
# blend_type, opacity)
# return 0
# dest_bmp.object_id, 10, 20, src_bmp.object_id, rect.x, rect.y, rect.width, rect.height, 'multiply', 0.7
# dest_bmp.object_id, 10, 20, src_bmp.object_id, rect.x, rect.y, rect.width, rect.height, 'multiply', 0.7
end
# ビットマップのサイズを変更(危険)
def change_size(bitmap, new_width, new_height)
return -1 if (new_width <=0 or new_height <= 0)

View file

@ -826,6 +826,7 @@ unless defined? Abstract
# ◆(内部専用)◆ ワイド文字列( Unicode ) へ変換
#--------------------------------------------------------------------------
def self.to_widechar(str, codepage)
puts "vvvvxzz"
# Convert the string from the specified encoding to UTF-16 (which is Ruby's default wide character encoding)
return ""
end
@ -1009,6 +1010,7 @@ module MessageBox
# マウスカーソルを表示
Input.mouse_show if Input.method_defined?(:mouse_show)
# メッセージボックス
puts error_message , title , MB_FATAL
messagebox( error_message , title , MB_FATAL )
rescue Hangup
nil # !※例外時にここを通過せずに外部に投げられる恐れあり

View file

@ -123,7 +123,7 @@ class << SceneManager
# ● 実行
#--------------------------------------------------------------------------
def SceneManager.run
Exit.setup
# Exit.setup
Exit.clearreset(true)
__wfexit_run__
end
@ -183,9 +183,9 @@ ensure
# -------------------------------------------------------------------------
# 後処理を担当します。
# スクリプト内容によってはここで解放処理が必要になることがあります。
Exit.dispose
# Exit.dispose
# ★ ----------------------------------------------------------------------
Exit.quit # フックを解放する。実行しないと終了しない危険性大
# Exit.quit # フックを解放する。実行しないと終了しない危険性大
end
exit # Mainセクションが後に控えている時に処理が渡らないようにする

View file

@ -493,6 +493,8 @@ module Preload
e = script.source.encoding
script.source.force_encoding "ASCII-8BIT"
# Apply patches
script.source.gsub!(".encode('SHIFT_JIS')", '')
Patches.each do |patch|
break if patch.eval script
end