mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Added mkxp-z and fixed pkmnem, pkmnems and pkmnemn fonts
This commit is contained in:
@@ -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
|
||||
#===============================================================================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<chx
|
||||
height = chy if height<chy
|
||||
if !ch[5] && ch[0]=="\n"
|
||||
@@ -1337,6 +1342,11 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
for ch in @fmtchars
|
||||
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<chx
|
||||
height = chy if height<chy
|
||||
@textchars.push(ch[5] ? "" : ch[0])
|
||||
|
||||
@@ -951,7 +951,7 @@ def renderLineBrokenChunks(bitmap,xDst,yDst,normtext,maxheight=0)
|
||||
for i in 0...normtext.length
|
||||
width=normtext[i][3]
|
||||
textx=normtext[i][1]+xDst
|
||||
texty=normtext[i][2]+yDst
|
||||
texty=normtext[i][2]+yDst + (mkxp? ? 4 : 0)
|
||||
if maxheight==0 || normtext[i][2]<maxheight
|
||||
bitmap.font.color=normtext[i][5]
|
||||
bitmap.draw_text(textx,texty,width+2,normtext[i][4],normtext[i][0])
|
||||
@@ -963,7 +963,7 @@ def renderLineBrokenChunksWithShadow(bitmap,xDst,yDst,normtext,maxheight,baseCol
|
||||
for i in 0...normtext.length
|
||||
width=normtext[i][3]
|
||||
textx=normtext[i][1]+xDst
|
||||
texty=normtext[i][2]+yDst
|
||||
texty=normtext[i][2]+yDst + (mkxp? ? 4 : 0)
|
||||
if maxheight==0 || normtext[i][2]<maxheight
|
||||
height=normtext[i][4]
|
||||
text=normtext[i][0]
|
||||
@@ -1161,7 +1161,7 @@ def pbDrawTextPositions(bitmap,textpos)
|
||||
for i in textpos
|
||||
textsize = bitmap.text_size(i[0])
|
||||
x = i[1]
|
||||
y = i[2]
|
||||
y = i[2] + (mkxp? ? 4 : 0)
|
||||
if i[3]==true || i[3]==1 # right align
|
||||
x -= textsize.width
|
||||
elsif i[3]==2 # centered
|
||||
|
||||
Reference in New Issue
Block a user