设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1662|回复: 4
打印 上一主题 下一主题

[已经解决] 为什么用*FullScene+++的时候在77老错?求大佬帮忙看看

[复制链接]

Lv2.观梦者

梦石
0
星屑
774
在线时间
83 小时
注册时间
2018-4-19
帖子
23
跳转到指定楼层
1
发表于 2018-5-1 16:44:31 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
  1. #--------------------------------------------------------------------------------
  2. #                        ==[LEGAL CRAP]==
  3. # - You may modify this script as you see fit
  4. # - You may use this script freely in any commercial or free game
  5. # - Due to the simplicity of the script, you are not required to credit the author
  6. # if you use it in any of your games. Credit is nice, but not required.
  7. #
  8. # Script Authored by: Matt Sully aka "Gump",修改整合by:NTRPG天空花嫁
  9. #================================================================================
  10. # Fullscreen++ v2.2 for VX and VXace by Zeus81
  11. # Free for non commercial and commercial use
  12. # Licence : [url]http://creativecommons.org/licenses/by-sa/3.0/[/url]
  13. # Contact : [email protected]
  14. # (fr) Manuel d'utilisation : [url]http://pastebin.com/raw.php?i=1TQfMnVJ[/url]
  15. # (en) User Guide           : [url]http://pastebin.com/raw.php?i=EgnWt9ur[/url]
  16. # (cn) NTRPG天空花嫁        : [url]http://patreon.com/NTRPG[/url]
  17. # 放在Main前面    F5全屏
  18. #==============================================================================
  19. # ★ RGSS3_解像度変更
  20. #==============================================================================

  21. #Graphics.resize_screen(640, 480)    # 更改窗口大小(640, 480) (544, 416)  
  22. #==============================================================================
  23. # ■ Game_Troop
  24. #==============================================================================
  25. class Game_Troop < Game_Unit
  26.   #--------------------------------------------------------------------------
  27.   # ● セットアップ
  28.   #--------------------------------------------------------------------------
  29.   alias tmwresize_game_troop_setup setup
  30.   def setup(troop_id)
  31.     tmwresize_game_troop_setup(troop_id)
  32.     @enemies.each do |enemy|                  # バトラー座標の補正
  33.       enemy.screen_x = enemy.screen_x * Graphics.width / 544
  34.       enemy.screen_y = enemy.screen_y * Graphics.height / 416
  35.       # 解像度が変わっても Window_BattleStatus のサイズは変わらないため
  36.       # その誤差を埋めるためにY座標だけさらに微調整します
  37.       h = 120   # Window_BattleStatus の高さ
  38.       enemy.screen_y += h * Graphics.height / 416 - h
  39.     end
  40.   end
  41. end


  42. #================================================================================

  43. $imported ||= {}
  44. $imported[:Zeus_Fullscreen] = __FILE__

  45. class << Graphics
  46.   Disable_VX_Fullscreen = false


  47.   CreateWindowEx            = Win32API.new('user32'  , 'CreateWindowEx'           , 'ippiiiiiiiii', 'i')
  48.   GetClientRect             = Win32API.new('user32'  , 'GetClientRect'            , 'ip'          , 'i')
  49.   GetDC                     = Win32API.new('user32'  , 'GetDC'                    , 'i'           , 'i')
  50.   GetSystemMetrics          = Win32API.new('user32'  , 'GetSystemMetrics'         , 'i'           , 'i')
  51.   GetWindowRect             = Win32API.new('user32'  , 'GetWindowRect'            , 'ip'          , 'i')
  52.     GetActiveWindow = Win32API.new('user32', 'GetActiveWindow', '', 'i')
  53.     GetClientRect = Win32API.new('user32', 'GetClientRect', 'ip', 'i')
  54.     GetWindowPlacement = Win32API.new('user32', 'GetWindowPlacement', 'ip', 'i')
  55.     Active_Window = GetActiveWindow.call   
  56.   FillRect                  = Win32API.new('user32'  , 'FillRect'                 , 'ipi'         , 'i')
  57.   FindWindow                = Win32API.new('user32'  , 'FindWindow'               , 'pp'          , 'i')
  58.   ReleaseDC                 = Win32API.new('user32'  , 'ReleaseDC'                , 'ii'          , 'i')
  59.   SendInput                 = Win32API.new('user32'  , 'SendInput'                , 'ipi'         , 'i')
  60.   SetWindowLong             = Win32API.new('user32'  , 'SetWindowLong'            , 'iii'         , 'i')
  61.   SetWindowPos              = Win32API.new('user32'  , 'SetWindowPos'             , 'iiiiiii'     , 'i')
  62.   ShowWindow                = Win32API.new('user32'  , 'ShowWindow'               , 'ii'          , 'i')
  63.   SystemParametersInfo      = Win32API.new('user32'  , 'SystemParametersInfo'     , 'iipi'        , 'i')
  64.   UpdateWindow              = Win32API.new('user32'  , 'UpdateWindow'             , 'i'           , 'i')
  65.   GetPrivateProfileString   = Win32API.new('kernel32', 'GetPrivateProfileString'  , 'ppppip'      , 'i')
  66.   WritePrivateProfileString = Win32API.new('kernel32', 'WritePrivateProfileString', 'pppp'        , 'i')
  67.   CreateSolidBrush          = Win32API.new('gdi32'   , 'CreateSolidBrush'         , 'i'           , 'i')
  68. #  InputInitialize = Win32API.new('AInput', 'InputInitialize', 'LLLLL', '')
  69. #SetResolution  = Win32API.new( "Display", "SetResolution", "lll", "l") #unless $deactivate_resolution
  70.    Screenshot       = Win32API.new("Screenshot", "Screenshot", "llllpll", "")
  71.   
  72.   GetModuleFileName       = Win32API.new("kernel32", "GetModuleFileName", "lpl", "l")
  73.   GetModuleHandle         = Win32API.new("kernel32", "GetModuleHandle", "p", "l")
  74.   RtlMoveMemory           = Win32API.new("kernel32", "RtlMoveMemory", "pli", "v")
  75.   RtlMoveMemoryLP         = Win32API.new("kernel32", "RtlMoveMemory", "lpi", "v")
  76.   VirtualProtect          = Win32API.new("kernel32", "VirtualProtect", "lllp", "i")
  77.   FindWindow              = Win32API.new("user32", "FindWindow", "pp", "l")
  78.   
  79.   DeleteObject              = Win32API.new('gdi32'   , 'DeleteObject'             , 'i'           , 'i')
  80.   Win32API.new("user32", "ActivateKeyboardLayout", "l", "l").call(0x04090409) #关闭输入法

  81.   
  82.   unless method_defined?(:zeus_fullscreen_update)
  83.     HWND     = FindWindow.call('RGSS Player', 0)
  84.     BackHWND = CreateWindowEx.call(0x08000008, 'Static', '', 0x80000000, 0, 0, 0, 0, 0, 0, 0, 0)
  85.     alias zeus_fullscreen_resize_screen resize_screen
  86.     alias zeus_fullscreen_update        update
  87.   end
  88. private
  89.   def initialize_fullscreen_rects
  90.     @borders_size    ||= borders_size
  91.     @fullscreen_rect ||= screen_rect
  92.     @workarea_rect   ||= workarea_rect
  93.   end

  94.   def borders_size
  95.     GetWindowRect.call(HWND, wrect = [0, 0, 0, 0].pack('l4'))
  96.     GetClientRect.call(HWND, crect = [0, 0, 0, 0].pack('l4'))
  97.     wrect, crect = wrect.unpack('l4'), crect.unpack('l4')
  98.     Rect.new(0, 0, wrect[2]-wrect[0]-crect[2], wrect[3]-wrect[1]-crect[3])
  99.   end
  100.   def screen_rect
  101.     Rect.new(0, 0, GetSystemMetrics.call(0), GetSystemMetrics.call(1))
  102.   end
  103.   def workarea_rect
  104.     SystemParametersInfo.call(0x30, 0, rect = [0, 0, 0, 0].pack('l4'), 0)
  105.     rect = rect.unpack('l4')
  106.     Rect.new(rect[0], rect[1], rect[2]-rect[0], rect[3]-rect[1])
  107.   end
  108.   def hide_borders() SetWindowLong.call(HWND, -16, 0x14000000) end
  109.   def show_borders() SetWindowLong.call(HWND, -16, 0x14CA0000) end
  110.   def hide_back()    ShowWindow.call(BackHWND, 0)              end
  111.   def show_back
  112.     ShowWindow.call(BackHWND, 3)
  113.     UpdateWindow.call(BackHWND)
  114.     dc    = GetDC.call(BackHWND)
  115.     rect  = [0, 0, @fullscreen_rect.width, @fullscreen_rect.height].pack('l4')
  116.     brush = CreateSolidBrush.call(0)
  117.     FillRect.call(dc, rect, brush)
  118.     ReleaseDC.call(BackHWND, dc)
  119.     DeleteObject.call(brush)
  120.   end
  121.   def resize_window(w, h)
  122.     if @fullscreen
  123.       x, y, z = (@fullscreen_rect.width-w)/2, (@fullscreen_rect.height-h)/2, -1
  124.     else
  125.       w += @borders_size.width
  126.       h += @borders_size.height
  127.       x = @workarea_rect.x + (@workarea_rect.width  - w) / 2
  128.       y = @workarea_rect.y + (@workarea_rect.height - h) / 2
  129.       z = -2
  130.     end
  131.     SetWindowPos.call(HWND, z, x, y, w, h, 0)
  132.   end
  133.   def release_alt
  134.     inputs = [1,18,2, 1,164,2, 1,165,2].pack('LSx2Lx16'*3)
  135.     SendInput.call(3, inputs, 28)
  136.   end
  137. public
  138.   def load_fullscreen_settings
  139.     buffer = [].pack('x256')
  140.     section = 'Fullscreen++'
  141.     filename = './Game.ini'
  142.     get_option = Proc.new do |key, default_value|
  143.       l = GetPrivateProfileString.call(section, key, default_value, buffer, buffer.size, filename)
  144.       buffer[0, l]
  145.     end
  146.     @fullscreen       = get_option.call('Fullscreen'     , '0') == '1'
  147.     @fullscreen_ratio = get_option.call('FullscreenRatio', '0').to_i
  148.     @windowed_ratio   = get_option.call('WindowedRatio'  , '1').to_i
  149.     toggle_vx_fullscreen if Disable_VX_Fullscreen and vx_fullscreen?
  150.     fullscreen? ? fullscreen_mode : windowed_mode
  151.   end
  152.   def save_fullscreen_settings
  153.     section = 'Fullscreen++'
  154.     filename = './Game.ini'
  155.     set_option = Proc.new do |key, value|
  156.       WritePrivateProfileString.call(section, key, value.to_s, filename)
  157.     end
  158.     set_option.call('Fullscreen'     , @fullscreen ? '1' : '0')
  159.     set_option.call('FullscreenRatio', @fullscreen_ratio)
  160.     set_option.call('WindowedRatio'  , @windowed_ratio)
  161.   end
  162.   def fullscreen?
  163.     @fullscreen or vx_fullscreen?
  164.   end
  165.   def vx_fullscreen?
  166.     rect = screen_rect
  167.     rect.width == 816 and rect.height == 624  #544:416  816:624
  168.   end
  169.   def toggle_fullscreen
  170.     fullscreen? ? windowed_mode : fullscreen_mode
  171.   end
  172.   def toggle_vx_fullscreen
  173.     windowed_mode if @fullscreen and !vx_fullscreen?
  174.     inputs = [1,18,0, 1,13,0, 1,13,2, 1,18,2].pack('LSx2Lx16'*4)
  175.     SendInput.call(4, inputs, 28) #4
  176.     zeus_fullscreen_update
  177.     self.ratio += 0 # refresh window size
  178.   end
  179.   def vx_fullscreen_mode
  180.     return if vx_fullscreen?
  181.     toggle_vx_fullscreen
  182.   end
  183.   def fullscreen_mode
  184.     return if vx_fullscreen?
  185.     initialize_fullscreen_rects
  186.     show_back
  187.     hide_borders
  188.     @fullscreen = true
  189.     self.ratio += 0 # refresh window size
  190.   end
  191.   def windowed_mode
  192.     toggle_vx_fullscreen if vx_fullscreen?
  193.     initialize_fullscreen_rects
  194.     hide_back
  195.     show_borders
  196.     @fullscreen = false
  197.     self.ratio += 0 # refresh window size
  198.   end
  199.   def toggle_ratio
  200.     return if vx_fullscreen?
  201.     self.ratio += 1
  202.   end
  203.   def ratio
  204.     return 1 if vx_fullscreen?
  205.     @fullscreen ? @fullscreen_ratio : @windowed_ratio
  206.   end
  207.   def ratio=(r)
  208.     return if vx_fullscreen?
  209.     initialize_fullscreen_rects
  210.     r = 0 if r < 0
  211.     if @fullscreen
  212.       @fullscreen_ratio = r
  213.       w_max, h_max = @fullscreen_rect.width, @fullscreen_rect.height
  214.     else
  215.       @windowed_ratio = r
  216.       w_max = @workarea_rect.width  - @borders_size.width
  217.       h_max = @workarea_rect.height - @borders_size.height
  218.     end
  219.     if r == 0
  220.       w, h = w_max, w_max * height / width
  221.       h, w = h_max, h_max * width / height if h > h_max
  222.     else
  223.       w, h = width * r, height * r
  224.       return self.ratio = 0 if w > w_max or h > h_max
  225.     end
  226.     resize_window(w, h)
  227.     save_fullscreen_settings
  228.   end
  229.   def update
  230.     release_alt if Disable_VX_Fullscreen and Input.trigger?(Input::ALT)
  231.     zeus_fullscreen_update
  232.     toggle_fullscreen if Input.trigger?(Input::F5)
  233.     #toggle_ratio      if Input.trigger?(Input::F6)
  234.   end
  235.   def resize_screen(width, height)
  236.     zeus_fullscreen_resize_screen(width, height)
  237.     self.ratio += 0 # refresh window size
  238.   end
  239. end
  240. Graphics.load_fullscreen_settings
复制代码




Lv2.观梦者

梦石
0
星屑
774
在线时间
83 小时
注册时间
2018-4-19
帖子
23
5
 楼主| 发表于 2018-7-2 12:29:07 | 只看该作者
//==
// Game Time MV Version 1.1
//==

/*:
* @plugindesc Provides an in-game clock with date and tinting function!
* @author Vlue
*
* @param Real Time
* @desc Whether to use real (system) time or not - (default: false)
* @default false
*
* @param Pause Time (Message)
* @desc Whether to pause time while the message window is up - (default: false)
* @default false
*
* @param Pause Time (Menu)
* @desc Whether to pause time while the menu is open - (default: true)
* @default true
*
* @param Pause Time (Battle)
* @desc Whether to pause time during battle - (default: true)
* @default true
*
* @param Default Clock Format
* @desc (Map Clock) Off, Simple, Expanded, Full
* @default Simple
*
* @param Default Menu Clock Format
* @desc (Menu Clock) Off, Simple, Expanded, Full
* @default Simple
*
* @param Days of the Week
* @desc The names of the days of the week
* @default "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"
*
* @param Month Names
* @desc The names of the months
* @default "January","February","March","April","May","June","July","August","September","October","November","December"
*
* @param Days in a Month
* @desc Define the number of days in each month
* @default 31,28,31,30,31,30,31,31,30,31,30,31
*
* @param Year Post
* @desc The post name of the year period (I.E. BC, AD)
* @default A.D.
*
* @param Twenty Four Hour Mode
* @desc Whether to display time in 12 or 24 hour segments
* @default false
*
* @param Clock Toggle Button
* @desc Toggles the clock on press (All known buttons unsure)
* @default shift
*
* @param Clock Window Details
* @desc Finetune the details of the clock window
* @default x: 576, y: 552, width: 240
*
* @param Menu Clock Window Details
* @desc Finetune the details of the menu clock window
* @default x: 0, y: 482, width: 240
*
* @param Blink Speed
* @desc The speed in which those little dots blink (0 to ignore)
* @default 120
*
* @param Default Timelapse
* @desc Number of frames it takes for one second to pass, in frames
* @default 60
*
* @param Use Seconds
* @desc Whether to use seconds or not (not using causes minutes to increase every timelapse)
* @default false
*
* @help Game Time MV! 1.1
*  Follow me on twitter: https://twitter.com/DaimoniousTails
*   Or facebook: https://www.facebook.com/DaimoniousTailsGames/
*   for the most recent updates!
*  Find all of my work here: http://daimonioustails.weebly.com/
*
*  Notes:
* Map notes take two tags: <time:false> and <tint:false> to prevent either time or tint from passing
* The tinting process will be automatically stopped whenever you manually tint the screen, no need to
*  pause it yourself. You will need to restart it though using the plugin command, when done
*
*  Script Calls:
* $gameTime.getTime("time") - returns current time value (second, minute, hour, day,
*   dayweek, month, year)
* $gameTime.inBetweenMin(m1,m2) - returns true if the current min is between m1 (including m1) and m2
* $gameTime.inBetweenHour(h1,h2) - returns true if the current hour is between h1 (including h1) and h2
*
*  Plugin Commands:
* GameTime pauseTint true/false        (pauses or unpauses the tint)
* GameTime pauseTime true/false        (pauses or unpauses time)
* GameTime set s m h d dw m y        (sets the current time to values (x to ignore)
*  I.e. GameTime set 0 0 6 x x 2 2005 - Sets time to the 6th hour, 2 month, and 2005th
*    year and ignoring day and month
* GameTime add value amount         (increments time by the value * amount) - second,
*   minute, hour, day, dayweek, month, year.
* GameTime clock format                (Changes the orientation of the clock - off, simple, expanded, full)
* GameTime year string         (Changes the year post date string)
* GameTime countdown varID minutes    (Sets a countdown timer in variable ID for x minutes)
*
*  Message Codes:
* GTSEC    - replaces with current second
* GTMIN        - replaces with current minute
* GTHOUR12        - replaces with current hour
* GTHOUR24 - replaces with current hour24
* GTDAYN        - replaces with current day (of month)
* GTDAYF        - replaces with current day (of week)
* GTMONN        - replaces with current day (number)
* GTMONF        - replaces with current day (name)
* GTYEAR        - repalces with current year
* GTMERI   - replaced by either AM or PM depending
*
*  Tint Values
* You may edit the tint values, but you will have to open up the plugin in a text editor
* and edit the values in there. (They will be the first thing you see at after the comments).
*/

var $gameTime = null;

(function() {

        var tints = [ [-68,-68,0,68],
                                  [-68,-68,0,68],
                                  [-68,-68,0,68],
                                  [-68,-68,0,68],
                                  [-68,-68,0,68],
                                  [-68,-68,0,68],
                                  [-48,-48,0,48],
                                  [-28,-28,0,28],
                                  [-8,-8,0,8],
                                  [0,0,0,0],
                                  [0,0,0,0],
                                  [0,0,0,0],
                                  [0,0,0,0],
                                  [5,5,5,0],
                                  [10,10,10,0],
                                  [15,15,15,0],
                                  [10,10,10,0],
                                  [34,0,0,0],
                                  [68,-17,17,0],
                                  [68,-34,-34,0],
                                  [34,-51,-17,34],
                                  [-34,-68,0,68],
                                  [-68,-68,0,68],
                                  [-68,-68,0,68]
        ]
       
        var parameters = PluginManager.parameters('GameTime');
        var realTime = (parameters['Real Time'] || "false").toLowerCase() == "true";
        var messageTime = (parameters['Pause Time (Message)'] || "false").toLowerCase() == "true";
        var menuTime = (parameters['Pause Time (Menu)'] || "true").toLowerCase() == "true";
        var battleTime = (parameters['Pause Time (Battle)'] || "true").toLowerCase() == "true";
        var clockFormat = (parameters['Default Clock Format'] || "simple").toLowerCase();
        var clockMenuFormat = (parameters['Default Menu Clock Format'] || "simple").toLowerCase();
        var defaultDaysWeek = '"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"'
        var daysWeek = eval("[" + (parameters['Days of the Week'] || defaultDaysWeek) + "]");
        var defaultMonthNames = '"January","February","March","April","May","June","July","August","September","October","November","December"'
        var monthNames = eval("[" + (parameters['Month Names'] || defaultMonthNames) + "]");
        var yearPost = (parameters['Year Post'] || "A.D.");
        var hourtf = (parameters['Twenty Four Hour Mode'] || "false").toLowerCase() == "true";
        var toggleButton = (parameters['Clock Toggle Button'] || "shift").toLowerCase();
        var clockDetails = eval("( {" + (parameters['Clock Window Details'] || "x: 576, y: 552, width: 240") + "} )");
        var clockMenuDetails = eval("( {" + (parameters['Menu Clock Window Details'] || "x: 0, y: 482, width: 240") + "} )");
        var blinkSpeed = (parameters['Blink Speed'] || 120);
        var timeLapse = (parameters['Default Timelapse'] || 60);
        var daysMonth = eval("[" + (parameters['Days in a Month'] || "31,28,31,30,31,30,31,31,30,31,30,31") + "]");
        var useSeconds = (parameters['Use Seconds'] || "false").toLowerCase() == "true";
       
        TextManager.getErrorDetails = function() {
                if($gameMap) {
                        return "[Map: " + $gameMap._mapId + "] [Event: " + $gameMap._interpreter._eventId + "] : \n"
                }
        }
       
        function GameTime() {
                this.initialize.apply(this, arguments);
        }
        GameTime.prototype.initialize = function() {
                this.old_time = -1;
                this.old_tint = [0,0,0,0];
                this.pauseTint = false;
                this.pauseTime = false;
                this.currentTime = new Current_Time();
        }
        GameTime.prototype.update = function() {
                if(!this.pauseTime && !this.noTimeMap()) {this.currentTime.update();}
                this.updateTint();
        }
        GameTime.prototype.getTime = function(type) {
                return this.currentTime.getTime(type);
        }
        GameTime.prototype.inBetweenMin = function(m1,m2) {
                var min = this.getTime("minute");
                return min >= m1 && min < m2;
        }
        GameTime.prototype.inBetweenHour = function(h1,h2) {
                var hour = this.getTime("hour");
                return hour >= h1 && hour < h2;
        }
        GameTime.prototype.updateTint = function() {
                if(this.pauseTint) {return;}
                if(this.noTintMap()) {
                        $gameScreen.startTint([0,0,0,0],0);
                        return;}
                min = this.getTime("minute");
                if(min == this.old_time) {return;}
                this.old_time = min;
                rgba = this.get_new_tint(min);
                if(rgba == this.old_tint) {return;}
                this.old_tint = rgba;
                $gameScreen.startTint(rgba,0);
        }
        GameTime.prototype.get_new_tint = function(min) {
                var hour = this.getTime("hour");
                var ctint = tints[hour];
                var ntint = null;
                if(hour + 1 != 24) {ntint = tints[hour+1];} else {ntint = tints[0];}
                var r = ctint[0] - ((ctint[0] - ntint[0]) * (min / 60));
                var g = ctint[1] - ((ctint[1] - ntint[1]) * (min / 60));
                var b = ctint[2] - ((ctint[2] - ntint[2]) * (min / 60));
                var a = ctint[3] - ((ctint[3] - ntint[3]) * (min / 60));
                return [r,g,b,a];
        }
        GameTime.prototype.setTime = function(args) {
                this.currentTime.setTime(args);
        }
        GameTime.prototype.addTime = function(args) {
                this.currentTime.addTime(args);
        }
        GameTime.prototype.noTimeMap = function() {
                if($dataMap != null) {
                        return $dataMap.note.indexOf("<time:false>") >= 0;
                }
                return false;
        }
        GameTime.prototype.noTintMap = function() {
                if($dataMap != null) {
                        return $dataMap.note.indexOf("<tint:false>") >= 0;
                }
                return false;
        }
       
       
        function Current_Time() {
                this.sec = 0;
                this.min = 0;
                this.hour = 0;
                this.day = 0;
                this.dayweek = 0;
                this.month = 0;
                this.year = 1;
                console.log(realTime);
        }
        Current_Time.prototype.setTime = function(args) {
                if(args[1] != "x") {this.sec = args[1];}
                if(args[2] && args[2] != "x") {this.min = Number(args[2]);}
                if(args[3] && args[3] != "x") {this.hour = Number(args[3]);}
                if(args[4] && args[4] != "x") {this.day = Number(args[4]);}
                if(args[5] && args[5] != "x") {this.dayweek = Number(args[5]);}
                if(args[6] && args[6] != "x") {this.month = Number(args[6]);}
                if(args[7] && args[7] != "x") {this.year = Number(args[7]);}
        }
        Current_Time.prototype.addTime = function(args) {
                var func = "this.add" + args[1] + "()";
                for(var i = 0;i < Number(args[2]);i++) {
                        try { eval(func); } catch(err) {
                                throw new Error(TextManager.getErrorDetails() +
                                  "Incorrect time value (" + args[1] + ") called for: gametime set")
                        }
                }
        }
        Current_Time.prototype.update = function() {
                if(realTime) {
                        var date = new Date();
                        this.sec = date.getSeconds();
                        this.min = date.getMinutes();
                        this.hour = date.getHours();
                } else if(Graphics.frameCount % timeLapse == 0) {
                        if(messageTime && $gameMessage.isBusy()) {return;}
                        if(menuTime && SceneManager._scene.inMenu()) {return;}
                        if(battleTime && SceneManager._scene.inBattle()) {return;}
                        if(useSeconds) {this.addsec();} else {this.addmin();}
                }
        }
        Current_Time.prototype.addsec = function() {
                this.sec++;
                if(this.sec == 60) {
                        this.sec = 0;
                        this.addmin();
                }
        }
        Current_Time.prototype.addmin = function() {
                this.min++;
                this.countdownTimers();
                if(this.min == 60) {
                        this.min = 0;
                        this.addhour();
                }
        }
        Current_Time.prototype.addhour = function() {
                this.hour++;
                if(this.hour == 24) {
                        this.hour = 0;
                        this.addday();
                }
        }
        Current_Time.prototype.addday = function() {
                this.day++;
                this.dayweek++;
                if(this.dayweek == daysWeek.length) {this.dayweek = 0;}
                if(this.day == daysMonth[this.month]) {
                        this.day = 0
                        this.addmonth();
                }
        }
        Current_Time.prototype.addmonth = function() {
                this.month++;
                if(this.month == monthNames.length) {
                        this.month = 0;
                        this.addyear();
                }
        }
        Current_Time.prototype.addyear = function() {
                this.year++;
        }
        Current_Time.prototype.getTime = function(string) {
                if(string == "second") {return this.sec;}
                if(string == "minute") {return this.min;}
                if(string == "hour")   {return this.hour;}
                if(string == "day")           {return this.day;}
                if(string == "dayweek"){return this.dayweek;}
                if(string == "dayyear"){return this.dayyear();}
                if(string == "month")  {return this.month;}
                if(string == "year")   {return this.year;}
                throw new Error(TextManager.getErrorDetails() + "Incorrect time value (" + string + ") called for: getTime")
        }
        Current_Time.prototype.dayyear = function() {
                var month = getTime("month");
                var day = getTime("day");
                while(month > 0) {
                        day += daysMonth[month];
                        month--;
                }
                return day;
        }
        Current_Time.prototype.countdownTimers = function() {
                timers = $gameParty._countdownTimers;
                for(var id in timers) {
                        if(timers[id]) {
                                $gameVariables.setValue(id, $gameVariables.value(id) - 1);
                                if($gameVariables.value(id) <= 0) {
                                        $gameParty.removeTimer(id);
                                }
                        }
                }
        }
       
        function Window_GameTime() {
                this.initialize.apply(this);
        }
        Window_GameTime.prototype = Object.create(Window_Base.prototype);
        Window_GameTime.prototype.constructor = Window_GameTime;
        Window_GameTime.prototype.initialize = function() {
                var height = 72;
                if(this.getFormat() == "full") {height += 36;}
                var details = SceneManager._scene.inMenu() ? clockMenuDetails : clockDetails;
                Window_Base.prototype.initialize.call(this, details.x,details.y,details.width,height);
        }
        Window_GameTime.prototype.update = function() {
                Window_Base.prototype.update.call(this);
                if(Input.isTriggered(toggleButton)) {
                        this.visible = !this.visible;}
                if(this.getFormat() == "off") {this.visible = false;}
                if(this.visible) {this.refresh();}
        }
        Window_GameTime.prototype.refresh = function() {
                this.contents.clear();
                var clockText = "";
                if(this.getFormat() == "simple") {clockText = this.normal_clock();}
                if(this.getFormat() == "expanded") {clockText = this.dated_clock();}
                if(this.getFormat() == "full") {
                        clockText = this.full_clock();
                        this.drawText(this.dated_clock(),0,36,this.contents.width,0);}
                this.drawText(clockText,0,0,this.contents.width,0);
        }
        Window_GameTime.prototype.normal_clock = function() {
                var meri = "";
                var hour = $gameTime.getTime("hour");
                var minute = $gameTime.getTime("minute");
                if(!hourtf) {
                        if(hour > 11) {meri = "PM";} else {meri = "AM";}
                        if(hour == 0) {hour = 12;}
                        if(hour > 12) {hour -= 12;}
                }
                if(hour < 10) {hour = " " + String(hour);} else {hour = String(hour);}
                if(minute < 10) {minute = "0" + String(minute);} else {minute = String(minute);}
                return hour + this.blinky() + minute + " " + meri;
        }
        Window_GameTime.prototype.dated_clock = function() {
                var hour = $gameTime.getTime("hour");
                var minute = $gameTime.getTime("minute");
                var dayweek = daysWeek[$gameTime.getTime("dayweek")];
                var day = $gameTime.getTime("day") + 1;
                var timeString = this.normal_clock();
                if(day < 10) {day = " " + String(day);} else {day = String(day);}
                return monthNames[$gameTime.getTime("month")] + day + "日" + " " + dayweek + " " + timeString;
        }
        Window_GameTime.prototype.full_clock = function() {
                return monthNames[$gameTime.getTime("month")] + ", " + $gameTime.getTime("year") + " " + $gameParty.yearPost();
        }
        Window_GameTime.prototype.blinky = function() {
                if(Graphics.frameCount % blinkSpeed > (blinkSpeed / 2)) {return " ";}
                return ":";
        }
        Window_GameTime.prototype.getFormat = function() {
                if(SceneManager._scene.inMenu()) {return clockMenuFormat;} else {return clockFormat;}
        }

        var gameTime_DataManager_createGameObjects = DataManager.createGameObjects;
        var gameTime_DataManager_makeSaveContents = DataManager.makeSaveContents;
        var gameTime_DataManager_extractSaveContents = DataManager.extractSaveContents;
        DataManager.createGameObjects = function() {
                gameTime_DataManager_createGameObjects.call(this);
                $gameTime = new GameTime();
        }
        DataManager.makeSaveContents = function () {
                var contents = gameTime_DataManager_makeSaveContents(this);
                contents.time = $gameTime;
                return contents;
        }
        DataManager.extractSaveContents = function(contents) {
                gameTime_DataManager_extractSaveContents.call(this, contents);
                $gameTime = contents.time;
                var gt = new GameTime();
                var ct = new Current_Time();
                $gameTime.__proto__ = gt.__proto__;
                $gameTime.currentTime.__proto__ = ct.__proto__;
        }
       
        var gameTime_Scene_Base_update = Scene_Base.prototype.update;
        Scene_Base.prototype.update = function() {
                gameTime_Scene_Base_update.call(this);
                $gameTime.update();
        }
       
        var gameTime_Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
        var gameTime_Scene_Map_create = Scene_Map.prototype.create;
        var gameTime_Scene_Map_update = Scene_Map.prototype.update;
        Scene_Map.prototype.createAllWindows = function() {
                this._gameTimeWindow = new Window_GameTime();
                this.addWindow(this._gameTimeWindow);
                gameTime_Scene_Map_createAllWindows.call(this);
        }
        Scene_Map.prototype.create = function() {
                gameTime_Scene_Map_create.call(this);
                $gameTime.updateTint();
        }
        Scene_Map.prototype.update = function() {
                gameTime_Scene_Map_update.call(this);
                if($gameMap._updateClock) {
                        this._gameTimeWindow = new Window_GameTime();
                        this.addWindow(this._gameTimeWindow);
                        $gameMap._updateClock = null;
                }
        }
       
        var gameTime_Scene_Menu_create = Scene_Menu.prototype.create;
        Scene_Menu.prototype.create = function() {
                gameTime_Scene_Menu_create.call(this);
                this._gameTimeWindow = new Window_GameTime();
                this.addWindow(this._gameTimeWindow);
        }
       
        Scene_Base.prototype.inMenu = function() {return false;}
        Scene_Base.prototype.inBattle = function() {return false;}
        Scene_Battle.prototype.inBattle = function() {return true;}
        Scene_MenuBase.prototype.inMenu = function() {return true;}
       
        var GameTime_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
        Game_Interpreter.prototype.pluginCommand = function(command, args) {
                GameTime_Game_Interpreter_pluginCommand.call(this, command, args);
                if(command.toLowerCase() === 'gametime') {
                        if(args[0] === 'pauseTint') {
                                $gameTime.pauseTint = args[1] == "true";
                        }
                        if(args[0] === 'pauseTime') {
                                $gameTime.pauseTime = args[1] == "true";
                        }
                        if(args[0] === 'set') {
                                $gameTime.setTime(args);
                        }
                        if(args[0] === 'add') {
                                $gameTime.addTime(args);
                        }
                        if(args[0] === 'clock') {
                                clockFormat = args[1];
                                $gameMap._updateClock = true;
                        }
                        if(args[0] === 'year') {
                                $gameParty._yearPost = args[1];
                        }
                        if(args[0] === 'countdown') {
                                $gameParty.addTimer(Number(args[1]),Number(args[2]));
                        }
                }
        }
       
        Game_Party.prototype.yearPost = function() {
                return this._yearPost || yearPost;
        }
        Game_Party.prototype.addTimer = function(varId, timer) {
                if(!this._countdownTimers) { this._countdownTimers = {} };
                this._countdownTimers[varId] = true;
                $gameVariables.setValue(varId, timer);
        }
        Game_Party.prototype.removeTimer = function(varId) {
                if(!this._countdownTimers) { this._countdownTimers = {} };
                this._countdownTimers[varId] = false;
        }
       
        var GameTime_Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters;
        Window_Base.prototype.convertEscapeCharacters = function(text) {
                text = GameTime_Window_Base_convertEscapeCharacters.call(this, text);
                text = text.replace(/\GTSEC/g, function() {
                        return String($gameTime.getTime("second"));
                }.bind(this));
                text = text.replace(/\GTMIN/g, function() {
                        var min = $gameTime.getTime("minute")
                        min = min < 10 ? "0" + min : min;
                        return String(min);
                }.bind(this));
                text = text.replace(/\GTHOUR12/g, function() {
                        var hour = $gameTime.getTime("hour")
                        if(hour > 12) {hour -= 12}
                        if(hour == 0) {hour = 12}
                        return String(hour);
                }.bind(this));
                text = text.replace(/\GTHOUR24/g, function() {
                        return String($gameTime.getTime("hour"));
                }.bind(this));
                text = text.replace(/\GTDAYN/g, function() {
                        return String($gameTime.getTime("day")+1);
                }.bind(this));
                text = text.replace(/\GTDAYF/g, function() {
                        return daysWeek[$gameTime.getTime("dayweek")];
                }.bind(this));
                text = text.replace(/\GTMONN/g, function() {
                        return String($gameTime.getTime("month")+1);
                }.bind(this));
                text = text.replace(/\GTMONF/g, function() {
                        return monthNames[$gameTime.getTime("month")];
                }.bind(this));
                text = text.replace(/\GTYEAR/g, function() {
                        return String($gameTime.getTime("month")+1);
                }.bind(this));
                text = text.replace(/\GTMERI/g, function() {
                        return $gameTime.getTime("hour") > 11 ? "PM" : "AM";
                }.bind(this));
                return text;
        }
       
        var GameTime_Game_Interpreter_command223 = Game_Interpreter.prototype.command223;
        Game_Interpreter.prototype.command223 = function() {
                $gameTime.pauseTint = true;
                return GameTime_Game_Interpreter_command223.call(this);
        }
       
})();
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
774
在线时间
83 小时
注册时间
2018-4-19
帖子
23
4
 楼主| 发表于 2018-5-1 21:56:09 | 只看该作者
fux2 发表于 2018-5-1 19:47
名为Screenshot的dll文件不存在

完美解决,谢谢大佬!
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (管理员)

老黄鸡

梦石
0
星屑
42355
在线时间
7599 小时
注册时间
2009-7-6
帖子
13506

开拓者贵宾

3
发表于 2018-5-1 19:47:54 | 只看该作者
名为Screenshot的dll文件不存在

评分

参与人数 1+1 收起 理由
21世纪游戏吧 + 1 塞糖

查看全部评分

RGDirect - DirectX驱动的RGSS,点我了解.
RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复 支持 1 反对 0

使用道具 举报

Lv2.观梦者

梦石
0
星屑
774
在线时间
83 小时
注册时间
2018-4-19
帖子
23
2
 楼主| 发表于 2018-5-1 16:45:23 | 只看该作者
#  InputInitialize = Win32API.new('AInput', 'InputInitialize', 'LLLLL', '')
#SetResolution  = Win32API.new( "Display", "SetResolution", "lll", "l") #unless $deactivate_resolution
   Screenshot       = Win32API.new("Screenshot", "Screenshot", "llllpll", "")
这里!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-17 07:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表