diff --git a/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb b/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb index 367d7fed7..c65594744 100644 --- a/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb +++ b/Data/Scripts/001_Technical/001_MKXP_Compatibility.rb @@ -4,13 +4,6 @@ def mkxp? return $MKXP end -CHARACTER_OFFSETS = { - "p" => [0, 2], - "g" => [0, 2], - "y" => [0, 2], - "q" => [0, 2] -} - def pbSetWindowText(string) if mkxp? System.set_window_title(string || System.game_title) @@ -18,3 +11,13 @@ def pbSetWindowText(string) Win32API.SetWindowText(string || "RGSS Player") end end + +class Bitmap + if mkxp? + alias mkxp_draw_text draw_text + def draw_text(x, y, width, height, text, align = 0) + height = text_size(text).height + mkxp_draw_text(x, y, width, height, text, align) + end + end +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 4bc3e6ac3..892ec1e3a 100644 --- a/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb +++ b/Data/Scripts/009_Objects and windows/004_SpriteWindow_text.rb @@ -1310,12 +1310,6 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base for ch in fmt chx = ch[1]+ch[3] chy = ch[2]+ch[4] - if mkxp? - offset = (CHARACTER_OFFSETS[ch[0]] || [0, 0]) - offset[1] -= 2 if offset[1] - ch[1] += offset[0] if offset[0] - ch[2] += offset[1] if offset[1] - end width = chx if width0 && x+minTextSize.width>width x=0 -# y+=32 # (textheight==0) ? bitmap.text_size("X").height : textheight - y+=(textheight==0) ? bitmap.text_size("X").height + 1 + (mkxp? ? 6 : 0) : textheight - textheight=0 + y+=32 end end -# textheight=32 # [textheight,textSize.height].max - textheight=[textheight,textSize.height + 1 + (mkxp? ? 6 : 0)].max - ret.push([word,x,y,textwidth,textheight,color]) + ret.push([word,x,y,textwidth,32,color]) x+=textwidth dims[0]=x if dims && dims[0]0 bitmap.font.color=shadowColor bitmap.draw_text(x+2,y,width,height,string,align) @@ -1131,7 +1126,6 @@ def pbDrawOutlineText(bitmap,x,y,width,height,string,baseColor,shadowColor=nil,a return if !bitmap || !string width=(width<0) ? bitmap.text_size(string).width+4 : width height=(height<0) ? bitmap.text_size(string).height+4 : height - y = y + (mkxp? ? 4 : 0) if shadowColor && shadowColor.alpha>0 bitmap.font.color=shadowColor bitmap.draw_text(x-2,y-2,width,height,string,align) diff --git a/Data/Scripts/013_Overworld/003_PField_Visuals.rb b/Data/Scripts/013_Overworld/003_PField_Visuals.rb index 26e75e442..9778ab368 100644 --- a/Data/Scripts/013_Overworld/003_PField_Visuals.rb +++ b/Data/Scripts/013_Overworld/003_PField_Visuals.rb @@ -7,6 +7,7 @@ class LocationWindow @window.resizeToFit(name,Graphics.width) @window.x = 0 @window.y = -@window.height + @window.height = 64 @window.viewport = Viewport.new(0,0,Graphics.width,Graphics.height) @window.viewport.z = 99999 @currentmap = $game_map.map_id diff --git a/Data/Scripts/017_UI/005_PScreen_Party.rb b/Data/Scripts/017_UI/005_PScreen_Party.rb index 315884a77..56626531e 100644 --- a/Data/Scripts/017_UI/005_PScreen_Party.rb +++ b/Data/Scripts/017_UI/005_PScreen_Party.rb @@ -398,7 +398,7 @@ class PokemonPartyPanel < SpriteWrapper "Graphics/Pictures/Party/overlay_lv",20,70,0,0,22,14]]) pbSetSmallFont(@overlaysprite.bitmap) pbDrawTextPositions(@overlaysprite.bitmap,[ - [@pokemon.level.to_s,42,62,0,basecolor,shadowcolor] + [@pokemon.level.to_s,42,63,0,basecolor,shadowcolor] ]) end # Draw annotation text