Project1
标题:
求汉化 位图显示功能增强[汉化中]
[打印本页]
作者:
雪流星
时间:
2008-11-22 14:15
标题:
求汉化 位图显示功能增强[汉化中]
http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_xp/draw_function&tech=bitmap_extension
日语的,懒得用翻译引擎慢慢去猜他的意思
看截图效果很华丽,但是说明看不明白
自己接了{/gg}
需要 dll
http://rpg.blue/upload_program/d/snstar2006_trgssex_107794431.rar
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ Bitmap 扩张 - KGC_BitmapExtension ◆ XP/VX ◆
#_/ ◇ Last update : 2008/11/16 ◇
#_/----------------------------------------------------------------------------
#_/ Bitmap 类描画功能增强。
#_/ XP/VX 通用脚本
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
=begin
增强 Bitmap 类的绘制,增摘了下列功能:
* 位图操作
o SRCCOPY, SRCPAINT, 等七种操作方式
* 特殊合成
o 加法
o 减法
o 乘法
o 高光
* 裁减
o 矩形
o 圆角矩形
o 椭圆(包含圆形)
o 星形
o 复合型
* 位图保存
※ alpha 通道会被舍弃
XP 和 VX通用
━━━━━ 使用方法 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
──── Class - Bitmap ────────────────────────────
rop_blt(x, y, src_bitmap, src_rect[, rop])
x, y : 描画的 X, Y 座标
src_bitmap : 描画的 Bitmap
src_rect : src_bitmap 传送范围
rop : 位图操作
SRCCOPY, SRCPAINT, SRCAND, SRCINVERT, SRCERASE,
NOTSRCCOPY, NOTSRCERASE
(默认: SRCCOPY)
rop 就是指定位图描绘的方式。
--------------------------------------------------------------------------------
blend_blt(x, y, src_bitmap, src_rect[, blend_type])
x, y : 描画的 X, Y 座标
src_bitmap : 描画的 Bitmap
src_rect : src_bitmap 传送范围
blend_type : 合成方式
BLEND_NORMAL, BLEND_ADD, BLEND_SUB, BLEND_MUL, BLEND_HILIGHT
(默认 : BLEND_NORMAL)
blend+type 就是指定描绘 src_bitmap 的合成方式。
--------------------------------------------------------------------------------
clip_blt(x, y, src_bitmap, src_rect, region)
x, y : 描画的 X, Y 座标
src_bitmap : 描画的 Bitmap
src_rect : src_bitmap 传送范围
region : 执行裁剪的区域 (Region)
region 指定裁剪并描绘 src_bitmap 的区域和形状。
--------------------------------------------------------------------------------
save(filename)
filename : 保存文件名
保存为 bitmap 格式。
━━━━━ 使用方法 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Region
各种形状区域的超级类。
--------------------------------------------------------------------------------
RectRegion < Region
- 构造符 -
(x, y, width, height)
(rect)
- 公开成员 -
x, y, width, height : 矩形的位置和大小
矩形区域
指定一个矩形的绘制范围。
--------------------------------------------------------------------------------
RoundRectRegion < RectRegion
- 构造符 -
(x, y, width, height[, width_ellipse[, height_ellipse]])
width_ellipse : 圆角宽度
height_ellipse : 圆角高度
(rect[, width_ellipse[, height_ellipse]])
- 公开成员 -
RectRegion 的公开成员
width_ellipse, height_ellipse : 圆角宽、高度
圆角矩形区域
指定一个圆角矩形的绘制范围。
--------------------------------------------------------------------------------
EllipticRegion < RectRegion
- 构造符 -
(x, y, width, height)
(rect)
- 公开成员 -
RectRegion 的公开成员
椭圆形区域
指定一个椭圆形的绘制范围。
--------------------------------------------------------------------------------
CircularRegion < EllipticRegion
- 构造符 -
(x, y, radius)
x, y : 原心座標
radius : 半径
- 公开成员 -
x, y, radius : 原心与半径
圆形区域
指定一个圆形的绘制范围。
--------------------------------------------------------------------------------
PolygonRegion < Region
- 构造符 -
(point1, point2, ...)
point : [x, y] 形式的座标
- 公开成员 -
points : [x, y] 形式的座標
fill_mode : 多边形充填形式
ALTERNATE : 奇数番目の線分と偶数番目の線分の間の領域のみ
WINDING : すべて線分の間の領域
初始值为 WINDING
多边形区域
由指定座标所连结而成的多边行描绘范围。
--------------------------------------------------------------------------------
StarRegion < PolygonRegion
- 构造符 -
(x, y, width, height[, angle])
(region[, angle])
region : Rect, RectRegion, EllipticRegion, CircularRegion のいずれか
angle : 開始角度 (省略時 : 0)
- 公开成员 -
fill_mode : 与 PolygonRegion 一样
x, y, width, height : 基准矩形
angle : 开始角度 (0 ~ 359)
星形区域
由与基准矩形内切的椭圆形形成的星形描绘范围。
--------------------------------------------------------------------------------
CombinedRegion < Region
複合リージョンです。
リージョン r1, r2 に対する以下の二項演算によって生成されます。
r1 & r2 : r1 与 r2 之積 (共通部分)
r1 * r2 : r1 与 r2 之積
r1 | r2 : r1 与 r2 之和 (双方的总和)
r1 + r2 : r1 与 r2 之和
r1 ^ r2 : r1 与 r2 之排他的論理和 (片方のみに存在する領域をとる)
r1 - r2 : r1 与 r2 之差 (除去共通部分)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
=end
$imported = {} if $imported == nil
$imported["BitmapExtension"] = true
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ TRGSSEx
#------------------------------------------------------------------------------
# "TRGSSEx.dll" の機能を扱うモジュールです。
#==============================================================================
module TRGSSEx
# 合成タイプ
BLEND_NORMAL = 0 # 通常
BLEND_ADD = 1 # 加算
BLEND_SUB = 2 # 減算
BLEND_MUL = 3 # 乗算
BLEND_HILIGHT = 4 # 覆い焼き
# ラスタオペレーションコード
SRCCOPY = 0x00CC0020 # dest = src
SRCPAINT = 0x00EE0086 # dest = dest | src
SRCAND = 0x008800C6 # dest = dest & src
SRCINVERT = 0x00660046 # dest = dest ^ src
SRCERASE = 0x00440328 # dest = dest & ~src
NOTSRCCOPY = 0x00330008 # dest = ~src
NOTSRCERASE = 0x001100A6 # dest = ~(dest | src) = ~dest & ~src
DLL_NAME = 'TRGSSEx'
begin
NO_TRGSS_EX = false
@@_trgss_ex_version =
Win32API.new(DLL_NAME, 'DllGetVersion', 'v', 'l')
@@_trgss_ex_rop_blt =
Win32API.new(DLL_NAME, 'RopBlt', 'pllllplll', 'l')
@@_trgss_ex_clip_blt =
Win32API.new(DLL_NAME, 'ClipBlt', 'pllllplll', 'l')
@@_trgss_ex_blend_blt =
Win32API.new(DLL_NAME, 'BlendBlt', 'pllllplll', 'l')
@@_trgss_ex_save_to_bitmap =
Win32API.new(DLL_NAME, 'SaveToBitmapA', 'pp', 'l')
rescue
NO_TRGSS_EX = true
end
module_function
#--------------------------------------------------------------------------
# ○ バージョン取得
# (<例> 1.23 → 123)
#--------------------------------------------------------------------------
def version
return -1 if NO_TRGSS_EX
return @@_trgss_ex_version.call
end
#--------------------------------------------------------------------------
# ○ BitBltRop
#--------------------------------------------------------------------------
def rop_blt(dest_info, dx, dy, dw, dh, src_info, sx, sy, rop)
return @@_trgss_ex_rop_blt.call(dest_info, dx, dy, dw, dh,
src_info, sx, sy, rop)
end
#--------------------------------------------------------------------------
# ○ ClipBlt
#--------------------------------------------------------------------------
def clip_blt(dest_info, dx, dy, dw, dh, src_info, sx, sy, hRgn)
return @@_trgss_ex_clip_blt.call(dest_info, dx, dy, dw, dh,
src_info, sx, sy, hRgn)
end
#--------------------------------------------------------------------------
# ○ BlendBlt
#--------------------------------------------------------------------------
def blend_blt(dest_info, dx, dy, dw, dh, src_info, sx, sy, blend)
return @@_trgss_ex_blend_blt.call(dest_info, dx, dy, dw, dh,
src_info, sx, sy, blend)
end
#--------------------------------------------------------------------------
# ○ SaveToBitmapA
#--------------------------------------------------------------------------
def save_to_bitmap(filename, info)
return @@_trgss_ex_save_to_bitmap.call(filename, info)
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Bitmap
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# ○ ビットマップ情報 (object_id, width, height) の pack を取得
#--------------------------------------------------------------------------
def get_base_info
return [object_id, width, height].pack('l3')
end
#--------------------------------------------------------------------------
# ○ ラスタオペレーションを使用して描画
# rop : ラスタオペレーションコード
#--------------------------------------------------------------------------
def rop_blt(x, y, src_bitmap, src_rect, rop = TRGSSEx::SRCCOPY)
return -1 if TRGSSEx::NO_TRGSS_EX
return TRGSSEx.rop_blt(get_base_info,
x, y, src_rect.width, src_rect.height,
src_bitmap.get_base_info, src_rect.x, src_rect.y, rop)
end
#--------------------------------------------------------------------------
# ○ クリッピング描画
# region : リージョン
#--------------------------------------------------------------------------
def clip_blt(x, y, src_bitmap, src_rect, region)
return -1 if TRGSSEx::NO_TRGSS_EX
hRgn = region.create_region_handle
return if hRgn == nil || hRgn == 0
result = TRGSSEx.clip_blt(get_base_info,
x, y, src_rect.width, src_rect.height,
src_bitmap.get_base_info, src_rect.x, src_rect.y, hRgn)
# 後始末
Region.delete_region_handles
return result
end
#--------------------------------------------------------------------------
# ○ ブレンド描画
# blend : ブレンドタイプ
#--------------------------------------------------------------------------
def blend_blt(x, y, src_bitmap, src_rect, blend = TRGSSEx::BLEND_NORMAL)
return -1 if TRGSSEx::NO_TRGSS_EX
return TRGSSEx.blend_blt(get_base_info,
x, y, src_rect.width, src_rect.height,
src_bitmap.get_base_info, src_rect.x, src_rect.y, blend)
end
#--------------------------------------------------------------------------
# ○ 保存
# filename : 保存先
#--------------------------------------------------------------------------
def save(filename)
return -1 if TRGSSEx::NO_TRGSS_EX
return TRGSSEx.save_to_bitmap(filename, get_base_info)
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ Region
#------------------------------------------------------------------------------
# クリッピング用のリージョンを扱うクラスです。
#==============================================================================
class Region
#--------------------------------------------------------------------------
# ○ クラス変数
#--------------------------------------------------------------------------
@@handles = [] # 生成したリージョンハンドル
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_delete_object = Win32API.new('gdi32', 'DeleteObject', 'l', 'l')
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
# 継承先で再定義
return 0
end
#--------------------------------------------------------------------------
# ○ AND (&)
#--------------------------------------------------------------------------
def &(obj)
return nil unless obj.is_a?(Region)
return CombinedRegion.new(CombinedRegion::RGN_AND, self, obj)
end
#--------------------------------------------------------------------------
# ○ AND (*)
#--------------------------------------------------------------------------
def *(obj)
return self.&(obj)
end
#--------------------------------------------------------------------------
# ○ OR (|)
#--------------------------------------------------------------------------
def |(obj)
return nil unless obj.is_a?(Region)
return CombinedRegion.new(CombinedRegion::RGN_OR, self, obj)
end
#--------------------------------------------------------------------------
# ○ OR (+)
#--------------------------------------------------------------------------
def +(obj)
return self.|(obj)
end
#--------------------------------------------------------------------------
# ○ XOR (^)
#--------------------------------------------------------------------------
def ^(obj)
return nil unless obj.is_a?(Region)
return CombinedRegion.new(CombinedRegion::RGN_XOR, self, obj)
end
#--------------------------------------------------------------------------
# ○ DIFF (-)
#--------------------------------------------------------------------------
def -(obj)
return nil unless obj.is_a?(Region)
return CombinedRegion.new(CombinedRegion::RGN_DIFF, self, obj)
end
#--------------------------------------------------------------------------
# ○ リージョンハンドル破棄
#--------------------------------------------------------------------------
def self.delete_region_handles
@@handles.uniq!
@@handles.each { |h| @@_api_delete_object.call(h) }
@@handles.clear
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ RectRegion
#------------------------------------------------------------------------------
# 矩形リージョンを扱うクラスです。
#==============================================================================
class RectRegion < Region
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :x # X 座標
attr_accessor :y # Y 座標
attr_accessor :width # 幅
attr_accessor :height # 高さ
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_create_rect_rgn = Win32API.new('gdi32',
'CreateRectRgn', 'llll', 'l')
@@_api_create_rect_rgn_indirect = Win32API.new('gdi32',
'CreateRectRgnIndirect', 'l', 'l')
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(*args)
if args[0].is_a?(Rect)
rect = args[0]
@x = rect.x
@y = rect.y
@width = rect.width
@height = rect.height
else
@x, @y, @width, @height = args
end
end
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
hRgn = @@_api_create_rect_rgn.call(@x, @y, @x + @width, @y + @height)
@@handles << hRgn
return hRgn
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ RoundRectRegion
#------------------------------------------------------------------------------
# 角丸矩形リージョンを扱うクラスです。
#==============================================================================
class RoundRectRegion < RectRegion
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :width_ellipse # 丸みの幅
attr_accessor :height_ellipse # 丸みの高さ
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_create_round_rect_rgn = Win32API.new('gdi32',
'CreateRoundRectRgn', 'llllll', 'l')
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(*args)
super
if args[0].is_a?(Rect)
@width_ellipse = args[1]
@height_ellipse = args[2]
else
@width_ellipse = args[4]
@height_ellipse = args[5]
end
end
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
hRgn = @@_api_create_round_rect_rgn.call(@x, @y, @x + @width, @y + @height,
width_ellipse, height_ellipse)
@@handles << hRgn
return hRgn
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ EllipticRegion
#------------------------------------------------------------------------------
# 楕円形リージョンを扱うクラスです。
#==============================================================================
class EllipticRegion < RectRegion
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_create_elliptic_rgn = Win32API.new('gdi32',
'CreateEllipticRgn', 'llll', 'l')
@@_api_create_elliptic_rgn_indirect = Win32API.new('gdi32',
'CreateEllipticRgnIndirect', 'l', 'l')
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
hRgn = @@_api_create_elliptic_rgn.call(@x, @y, @x + @width, @y + @height)
@@handles << hRgn
return hRgn
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ CircularRegion
#------------------------------------------------------------------------------
# 円形リージョンを扱うクラスです。
#==============================================================================
class CircularRegion < EllipticRegion
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :radius # 半径
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(x, y, r)
@cx = x
@cy = y
@radius = r
super(@cx - r, @cy - r, r * 2, r * 2)
end
#--------------------------------------------------------------------------
# ○ 中心 X 座標参照
#--------------------------------------------------------------------------
def x
return @cx
end
#--------------------------------------------------------------------------
# ○ 中心 Y 座標参照
#--------------------------------------------------------------------------
def y
return @cy
end
#--------------------------------------------------------------------------
# ○ 中心 X 座標変更
#--------------------------------------------------------------------------
def x=(value)
@cx = value
@x = @cx - radius
end
#--------------------------------------------------------------------------
# ○ 中心 Y 座標変更
#--------------------------------------------------------------------------
def y=(value)
@cy = value
@y = @cy - radius
end
#--------------------------------------------------------------------------
# ○ 半径変更
#--------------------------------------------------------------------------
def radius=(value)
@radius = value
@x = @cx - @radius
@y = @cy - @radius
@width = @height = @radius * 2
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ PolygonRegion
#------------------------------------------------------------------------------
# 多角形リージョンを扱うクラスです。
#==============================================================================
class PolygonRegion < Region
#--------------------------------------------------------------------------
# ○ 定数
#--------------------------------------------------------------------------
# 多角形充填形式
ALTERNATE = 1 # 交互モード
WINDING = 2 # 螺旋モード
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :points # 頂点座標 [x, y] の配列
attr_accessor :fill_mode # 多角形充填形式
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_create_polygon_rgn = Win32API.new('gdi32',
'CreatePolygonRgn', 'pll', 'l')
@@_api_create_polypolygon_rgn = Win32API.new('gdi32',
'CreatePolyPolygonRgn', 'llll', 'l')
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(*points)
@points = points # [x, y] の配列
@fill_mode = WINDING
end
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
pts = ""
points.each { |pt| pts += pt.pack("ll") }
hRgn = @@_api_create_polygon_rgn.call(pts, points.size, fill_mode)
@@handles << hRgn
return hRgn
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ StarRegion
#------------------------------------------------------------------------------
# 星型リージョンを扱うクラスです。
#==============================================================================
class StarRegion < PolygonRegion
#--------------------------------------------------------------------------
# ○ 定数
#--------------------------------------------------------------------------
POINT_NUM = 5 # 点数
PI_4 = 4.0 * Math::PI # 4 * Pi
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :x # X 座標
attr_reader :y # Y 座標
attr_reader :width # 幅
attr_reader :height # 高さ
attr_reader :angle # 開始角度 (0 ~ 359)
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(*args)
super()
shape = args[0]
ang = args[1]
case shape
when CircularRegion
@x = shape.x - shape.radius
@y = shape.y - shape.radius
@width = @height = shape.radius * 2
when Rect, RectRegion, EllipticRegion
@x = shape.x
@y = shape.y
@width = shape.width
@height = shape.height
when Integer
@x, @y, @width, @height = args
ang = args[4]
else
@x = @y = @width = @height = 0
end
@angle = (ang == nil ? 0 : ang) % 360
@points = create_star_points
end
#--------------------------------------------------------------------------
# ○ 星型座標を生成
#--------------------------------------------------------------------------
def create_star_points
dw = (width + 1) / 2
dh = (height + 1) / 2
dx = x + dw
dy = y + dh
base_angle = angle * Math::PI / 180.0
pts = []
POINT_NUM.times { |i|
ang = base_angle + PI_4 * i / POINT_NUM
pts << [dx + (Math.sin(ang) * dw).to_i,
dy - (Math.cos(ang) * dh).to_i]
}
return pts
end
#--------------------------------------------------------------------------
# ○ X 座標変更
#--------------------------------------------------------------------------
def x=(value)
@x = value
@points = create_star_points
end
#--------------------------------------------------------------------------
# ○ Y 座標変更
#--------------------------------------------------------------------------
def y=(value)
@y = value
@points = create_star_points
end
#--------------------------------------------------------------------------
# ○ 幅変更
#--------------------------------------------------------------------------
def width=(value)
@width = value
@points = create_star_points
end
#--------------------------------------------------------------------------
# ○ 高さ座標変更
#--------------------------------------------------------------------------
def height=(value)
@height = value
@points = create_star_points
end
#--------------------------------------------------------------------------
# ○ 開始角度変更
#--------------------------------------------------------------------------
def angle=(value)
@angle = value % 360
@points = create_star_points
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ CombinedRegion
#------------------------------------------------------------------------------
# 混合リージョンを扱うクラスです。
#==============================================================================
class CombinedRegion < Region
#--------------------------------------------------------------------------
# ○ 定数
#--------------------------------------------------------------------------
# 合成モード
RGN_AND = 1
RGN_OR = 2
RGN_XOR = 3
RGN_DIFF = 4
RGN_COPY = 5
#--------------------------------------------------------------------------
# ○ Win32API
#--------------------------------------------------------------------------
@@_api_combine_rgn = Win32API.new('gdi32', 'CombineRgn', 'llll', 'l')
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(mode, region1, region2)
@exp = CombinedRegionExp.new(mode, region1.clone, region2.clone)
end
#--------------------------------------------------------------------------
# ○ リージョンハンドル生成
#--------------------------------------------------------------------------
def create_region_handle
return combine_region(@exp.region1, @exp.region2, @exp.mode)
end
#--------------------------------------------------------------------------
# ○ リージョン合成
# dest : 合成先
# src : 合成元
# mode : 合成モード
#--------------------------------------------------------------------------
def combine_region(dest, src, mode)
hdest = dest.create_region_handle
hsrc = src.create_region_handle
@@_api_combine_rgn.call(hdest, hdest, hsrc, mode)
return hdest
end
protected :combine_region
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# □ Struct
#==============================================================================
# □ CombinedRegionExp 構造体
CombinedRegionExp = Struct.new("CombinedRegionExp", :mode, :region1, :region2)
复制代码
作者:
偶尔杀人越货
时间:
2008-11-22 16:35
先毫不犹豫的抱下来,据说约束桑在holiday,你要等几天了
作者:
沉影不器
时间:
2008-11-22 19:09
提示:
作者被禁止或删除 内容自动屏蔽
作者:
星辰天羽
时间:
2008-11-22 20:09
前几天在QQ上问了下,好像KISS姐在研究这些东西
作者:
越前リョーマ
时间:
2008-11-22 20:11
这效果真的很不错。
作者:
雪流星
时间:
2008-11-22 21:45
以下引用
偶尔杀人越货于2008-11-22 8:35:04
的发言:
先毫不犹豫的抱下来,据说约束桑在holiday,你要等几天了
那还是我来吧
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1