PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : RM2k3 Font Changer DynRPG-Plugin (ersetzt RM2k/3 Font Changer und AutoFontInstall)



Cherry
01.05.2014, 19:04
Ich hab heute mal schnell ein Plugin gemacht um eigene Fonts im RM2k3 zu verwenden. Braucht DynRPG (http://cherrytree.at/dynrpg).

Im Prinzip ersetzt es die Tools RM2k/3 Font Changer (http://www.multimediaxis.de/threads/99506-Programmvorstellung-RM2K-Font-Changer) und AutoFontInstall (http://www.multimediaxis.de/threads/99506-Programmvorstellung-RM2K-Font-Changer?p=2092166&viewfull=1#post2092166).

Download: http://share.cherrytree.at/showfile-14292/font_changer.zip

Einfach die DLL in DynPlugins kopieren, einen Ordner "Fonts" erstellen, die Fonts da reinkopieren, und wie in der Readme beschrieben in die DynRPG.ini eintragen, z.B.:


[font_changer]
Font1=A New Font
Font2=Another Font

Eine Sammlung von netten Schriftarten gibts z.B. hier: http://rpga.info/forum/showthread.php?p=488466

Morden
01.05.2014, 19:16
Hey, das ist ja super! So gibt es dann auch keine Probleme mit Icons u.Ä.!

Eine Frage: Gibt's dazu auch den SourceCode? ^^

PeAcE
MorDen

Cherry
01.05.2014, 19:27
Hatte ich nur schnell in FreeBasic hingeschmiert:


#Include "windows.bi"

Extern "windows-ms"
Sub linkVersion Naked Alias "linkVersion" () Export
Asm
.quad 2
End Asm
End Sub
End Extern

Type DelphiString
c As Integer = -1
l As Integer = 0
s As ZString * 1024
Declare Sub set(newstring As String)
End Type

Sub DelphiString.set(newstring As String)
l = Len(newstring)
s = newstring
End Sub

Dim Shared As DelphiString font1, font2

Function onStartup Cdecl Alias "onStartup" (pluginName As ZString Ptr) As Boolean Export
Var p = CurDir() & "\Fonts"
Var f = Dir(p & "\*.*")

Do While Len(f)
AddFontResource(p & "\" & f)
f = Dir()
Loop

Dim As ZString * 1024 f1, f2
GetPrivateProfileString(pluginName, "Font1", "", @f1, SizeOf(f1), CurDir() & "\DynRPG.ini")
GetPrivateProfileString(pluginName, "Font2", "", @f2, SizeOf(f2), CurDir() & "\DynRPG.ini")

font1.set(f1)
font2.set(f2)

If font1.l Then
*CPtr(Any Ptr Ptr, &h4884A8) = @font1.s
EndIf

If font2.l Then
*CPtr(Any Ptr Ptr, &h4884BF) = @font2.s
EndIf

Return TRUE
End Function

Sub onExit Cdecl Alias "onExit" () Export
Var p = CurDir() & "\Fonts"
Var f = Dir(p & "\*.*")

Do While Len(f)
RemoveFontResource(p & "\" & f)
f = Dir()
Loop
End Sub

Davy Jones
01.05.2014, 23:02
Großes danke an Cherry, das wird sofort eingebaut =D