Realmcrafter France
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Le deal à ne pas rater :
Réassort du coffret Pokémon 151 Électhor-ex : où l’acheter ?
Voir le deal

Ecran 16/9 (Full HD)

Aller en bas

Ecran 16/9 (Full HD) Empty Ecran 16/9 (Full HD)

Message par Giuliani Mer 25 Juin - 22:51

Basé sur le code de Checkpointng pour la résolution
et sur le code de Siramoida pour le curseur

1) Dans le dossier Client/Modules/MainMenu.bb
Rechercher la fonction GameOptionsMenu():


; Graphics options window
WGraphics = GY_CreateWindow(LanguageString$(LS_GraphicsOptions), 0.2, 0.3, 0.6, 0.4, True, True, False)
GY_CreateLabel(WGraphics, 0.02, 0.05, LanguageString$(LS_SelectResolution))
LResolution = GY_CreateListBox(WGraphics, 0.02, 0.15, 0.4, 0.75)
G.GY_Gadget = Object.GY_Gadget(LResolution)
L.GY_ListBox = Object.GY_ListBox(G\TypeHandle)
For i = 1 To CountGfxModes3D()
Width = GfxModeWidth(i)
Height = GfxModeHeight(i)
If Width >= 640 And Width / 4 * 3 = Height
ModeName$ = Str$(Width) + " x " + Str$(Height)
Found = False
For B.GY_ListItem = Each GY_ListItem
If B\Box = L
If B\Dat$ = ModeName$
Found = True
Exit
EndIf
EndIf
Next
If Found = False Then GY_AddListBoxItem(LResolution, ModeName$)
EndIf
Next


Et remplacez par ça:


; Graphics options window
WGraphics = GY_CreateWindow(LanguageString$(LS_GraphicsOptions), 0.2, 0.3, 0.6, 0.4, True, True, False)
GY_CreateLabel(WGraphics, 0.02, 0.05, LanguageString$(LS_SelectResolution))
LResolution = GY_CreateListBox(WGraphics, 0.02, 0.15, 0.4, 0.75)
G.GY_Gadget = Object.GY_Gadget(LResolution)
L.GY_ListBox = Object.GY_ListBox(G\TypeHandle)
For i = 1 To CountGfxModes3D()
Width = GfxModeWidth(i)
Height = GfxModeHeight(i)
If ((Width * 3) = (Height * 4))
ModeName$ = Str$(Width) + " x " + Str$(Height)
Found = False
For B.GY_ListItem = Each GY_ListItem
If B\Box = L
If B\Dat$ = ModeName$
Found = True
Exit
EndIf
EndIf
Next
If Found = False Then GY_AddListBoxItem(LResolution, ModeName$)
ElseIf ((Width * 9) = (Height * 16))
ModeName$ = Str$(Width) + " x " + Str$(Height)
Found = False
For B.GY_ListItem = Each GY_ListItem
If B\Box = L
If B\Dat$ = ModeName$
Found = True
Exit
EndIf
EndIf
Next
If Found = False Then GY_AddListBoxItem(LResolution, ModeName$)
EndIf
Next

Sauvegardez


2) Ensuite dans Client/Modules/Gooey.bb ajoutez la fonction suivante (je l'ai ajouté en fin de code):


Function FixFovCam(Cam, xWidth, yHeight)
Local FOV# = (2 * ATan(Tan((74) / 2) * xWidth / yHeight))
CameraZoom(Cam, 1.0 / Tan(FOV# / 2))
End Function


Dans le même fichier
Recherchez la fonction Function GY_Update():

;;Turn mouse position/speed into screen co-ordinates
;GY_MouseX# = Float#(MouseX()) / Float#(GraphicsWidth())
;GY_MouseY# = Float#(MouseY()) / Float#(GraphicsHeight())
;GY_MXSpeed# = Float#(GY_MouseXSpeed) / Float#(GraphicsWidth())
;GY_MYSpeed# = Float#(GY_MouseYSpeed) / Float#(GraphicsHeight())

Et remplacez par tout ça:


;;Standard ratio, 4:3, 5:3
fix# = 0.0
mult2# =1.0
mult# = 1.0

;;Change variables if ratio is widescreen
If(GraphicsWidth() * 9 = GraphicsHeight() * 16)
fix# = 0.167
mult2# = 0.167
mult# = 1.333
EndIf

;; NOW actually Turn mouse position/speed into screen co-ordinates
GY_MouseX# = Float#(MouseX()) / Float#(GraphicsWidth()) * mult# - fix#
GY_MouseY# = Float#(MouseY()) / Float#(GraphicsHeight())
GY_MXSpeed# = Float#(GY_MouseXSpeed) * mult2# / Float#(GraphicsWidth())
GY_MYSpeed# = Float#(GY_MouseYSpeed) / Float#(GraphicsHeight())


3) Et enfin dans Client/Modules/ClientLoaders.bb
dans la fonction LoadGame trouvez le code suivant:


; GUI
Cam2 = CreateCamera()
CameraRange(Cam2, 5.0, 10.0)
CameraClsMode(Cam2, False, False)
PositionEntity(Cam2, 0, -5000, 0)
GY_Load(Cam2)


Et remplacez par ça:


; GUI
Cam2 = CreateCamera()
CameraRange(Cam2, 5.0, 10.0)
CameraClsMode(Cam2, False, False)
PositionEntity(Cam2, 0, -5000, 0)
GY_Load(Cam2)

; Fix FOV Cam
FixFovCam(Cam2, Width, Height)

4) Enfin Ouvrez le fichier principal Client.bb, en haut cliquez sur Program/Create Executable.
Renommez-le newclient.exe, récupérez l’exécutable créé et collez-le à la racine de votre dossier projet. (N'écrasez pas l'ancien client.exe!)
Lancez le serveur.exe, puis lancez votre newclient.exe

Tout fonctionne, dans Graphic Options vous pouvez passer en 1920*1080
Giuliani
Giuliani
Admin

Messages : 263
Points : 424
Date d'inscription : 25/06/2014
Age : 44
Localisation : Toulouse

https://realmcrafter.1fr1.net

Revenir en haut Aller en bas

Revenir en haut


 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum