diff --git a/Data/Scripts.rxdata b/Data/Scripts.rxdata index 10b905b6f..c5d671ed0 100644 Binary files a/Data/Scripts.rxdata and b/Data/Scripts.rxdata differ diff --git a/Data/Scripts/001_Technical/001_Ruby Utilities.rb b/Data/Scripts/001_Technical/001_Ruby Utilities.rb index d59d5ca63..2cdea4115 100644 --- a/Data/Scripts/001_Technical/001_Ruby Utilities.rb +++ b/Data/Scripts/001_Technical/001_Ruby Utilities.rb @@ -1,3 +1,19 @@ +#=============================================================================== +# mkxp setup +#=============================================================================== +$MKXP = !!defined?(System) + +def mkxp? + return $MKXP +end + +CHARACTER_OFFSETS = { + "p" => [0, 2], + "g" => [0, 2], + "y" => [0, 2], + "q" => [0, 2] +} + #=============================================================================== # class Class #=============================================================================== diff --git a/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb b/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb index 18e7924bb..2cc2931c0 100644 --- a/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb +++ b/Data/Scripts/009_Objects and windows/003_SpriteWindow.rb @@ -391,18 +391,21 @@ def pbSetSystemFont(bitmap) elsif fontname=="Pokemon Emerald Small" || fontname=="Power Green Small" bitmap.font.size=25 else - bitmap.font.size=31 + bitmap.font.name=pbNarrowFontName + bitmap.font.size = mkxp? ? 29 : 31 + #bitmap.font.size = mkxp? ? 29 : 31 end end # Sets a bitmap's font to the system small font. def pbSetSmallFont(bitmap) - bitmap.font.name=pbSmallFontName - bitmap.font.size=25 + bitmap.font.name = pbSmallFontName + bitmap.font.size = 25 end # Sets a bitmap's font to the system narrow font. def pbSetNarrowFont(bitmap) + p "narrow" bitmap.font.name=pbNarrowFontName bitmap.font.size=31 end diff --git a/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb b/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb index 099067682..6637aa383 100644 --- a/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb +++ b/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb @@ -1310,6 +1310,11 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base for ch in fmt chx = ch[1]+ch[3] chy = ch[2]+ch[4] + offset = CHARACTER_OFFSETS[ch[0]] + if offset + ch[1] += offset[0] if offset[0] + ch[2] += offset[1] if offset[1] + end width = chx if width'. + // Be careful not to include any spaces. + // This is not connected to the built-in font, which is + // always used when a non-existing font family is + // requested by RGSS. + // (default: none) + // + // "fontSub": ["Arial>Open Sans", + // "Times New Roman>Liberation Serif"] + + + // Because mkxp is usually distributed as a stand alone + // build, no predefined load paths are initialized + // ($:, $LOAD_PATH) in the MRI backend. With this option, + // they can be specified manually (eg. when using a system + // libruby.so). It is however recommended to statically + // link all required gems into libruby.so. + // (default: none) + // + // "rubyLoadpath": ["/usr/lib64/ruby/", + // "/usr/local/share/ruby/site_ruby"], + + + // SoundFont to use for midi playback (via fluidsynth) + // (default: none) + // + // "midiSoundFont": "Audio/BGM/GMGSx.sf2", + + + // Activate "chorus" effect for midi playback + // + // "midiChorus": false, + + + // Activate "reverb" effect for midi playback + // + // "midiReverb": false, + + + // Number of OpenAL sources to allocate for SE playback. + // If there are a lot of sounds playing at the same time + // and audibly cutting each other off, try increasing + // this number. Maximum: 64. + // + // "SESourceCount": 6 + + + // The Windows game executable name minus ".exe". By default + // this is "Game", but some developers manually rename it. + // mkxp needs this name because both the .ini (game + // configuration) and .rgssad (encrypted data archive) must + // carry the same name minus their extension, and we cannot + // guess the executable's name. + // You could just as well rename them both to "Game.ini" and + // "Game.rgssad", but specifying the executable name here + // is a tiny bit less intrusive. + // + // "execName": "Game" + +}