Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form DDTut1
|
||||
Caption = "DirectDraw Tutorial 1"
|
||||
ClientHeight = 4485
|
||||
ClientLeft = 570
|
||||
ClientTop = 690
|
||||
ClientWidth = 5670
|
||||
Icon = "DDTut1.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 299
|
||||
ScaleMode = 3 'Pixel
|
||||
ScaleWidth = 378
|
||||
Begin VB.PictureBox Picture1
|
||||
ClipControls = 0 'False
|
||||
Height = 4452
|
||||
Left = 0
|
||||
ScaleHeight = 4395
|
||||
ScaleWidth = 5595
|
||||
TabIndex = 0
|
||||
Top = 0
|
||||
Width = 5652
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "DDTut1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Option Compare Text
|
||||
|
||||
'Module level variables
|
||||
Dim objDX As New DirectX7
|
||||
Dim objDD As DirectDraw7
|
||||
Dim objDDSurf As DirectDrawSurface7
|
||||
Dim objDDPrimSurf As DirectDrawSurface7
|
||||
Dim ddsd1 As DDSURFACEDESC2
|
||||
Dim ddsd2 As DDSURFACEDESC2
|
||||
Dim ddClipper As DirectDrawClipper
|
||||
|
||||
Dim bInit As Boolean
|
||||
|
||||
Private Sub Form_Load()
|
||||
init
|
||||
End Sub
|
||||
|
||||
Sub init()
|
||||
|
||||
Dim sMedia As String
|
||||
'Initialization procedure
|
||||
|
||||
'The empty string parameter means to use the active display driver
|
||||
Set objDD = objDX.DirectDrawCreate("")
|
||||
'Notice that the show event calls Form_Resize
|
||||
|
||||
'Indicate this app will be a normal windowed app
|
||||
'with the same display depth as the current display
|
||||
Call objDD.SetCooperativeLevel(Me.hWnd, DDSCL_NORMAL)
|
||||
|
||||
'Indicate that the ddsCaps member is valid in this type
|
||||
ddsd1.lFlags = DDSD_CAPS
|
||||
'This surface is the primary surface (what is visible to the user)
|
||||
ddsd1.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE
|
||||
'Your creating the primary surface now with the surface description you just set
|
||||
Set objDDPrimSurf = objDD.CreateSurface(ddsd1)
|
||||
|
||||
'Call the FindMediaDir procedure
|
||||
sMedia = FindMediaDir("lake.bmp")
|
||||
If sMedia = vbNullString Then sMedia = AddDirSep(CurDir)
|
||||
|
||||
'Now let's set the second surface description
|
||||
ddsd2.lFlags = DDSD_CAPS
|
||||
'This is going to be a plain off-screen surface
|
||||
ddsd2.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
|
||||
'Now we create the off-screen surface
|
||||
Set objDDSurf = objDD.CreateSurfaceFromFile(sMedia & "lake.bmp", ddsd2)
|
||||
|
||||
Set ddClipper = objDD.CreateClipper(0)
|
||||
ddClipper.SetHWnd Picture1.hWnd
|
||||
objDDPrimSurf.SetClipper ddClipper
|
||||
'Yes it has been initialized and is ready to blit
|
||||
bInit = True
|
||||
|
||||
'Ok now were ready to blit this thing, call the blt procedure
|
||||
blt
|
||||
|
||||
End Sub
|
||||
Private Sub Form_Resize()
|
||||
|
||||
'This procedure is called by the me.show event or when
|
||||
'The form is resized during runtime.
|
||||
'Since DX uses pixels and VB uses twips this procedure
|
||||
'Syncs up the two scales
|
||||
'Remember to change the ScaleMode property on the
|
||||
'Form to Pixels. Notice the Width and Height of the form
|
||||
'Stay in twips even after you change the ScaleMode, but
|
||||
'The ScaleWidth and the ScaleHeight are now in pixels.
|
||||
Picture1.Width = Me.ScaleWidth
|
||||
Picture1.Height = Me.ScaleHeight
|
||||
blt
|
||||
End Sub
|
||||
Sub blt()
|
||||
|
||||
'Has it been initialized? If not let's get out of this procedure
|
||||
If bInit = False Then Exit Sub
|
||||
|
||||
'Some local variables
|
||||
Dim ddrval As Long
|
||||
Dim r1 As RECT
|
||||
Dim r2 As RECT
|
||||
|
||||
'Gets the bounding rect for the entire window handle, stores in r1
|
||||
objDX.GetWindowRect Picture1.hWnd, r1
|
||||
|
||||
r2.Bottom = ddsd2.lHeight
|
||||
r2.Right = ddsd2.lWidth
|
||||
|
||||
ddrval = objDDPrimSurf.blt(r1, objDDSurf, r2, DDBLT_WAIT)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Picture1_Paint()
|
||||
'This procedure is called during runtime when the form
|
||||
'is moved or resized.
|
||||
Do While objDD.TestCooperativeLevel <> DD_OK
|
||||
DoEvents
|
||||
Loop
|
||||
objDD.RestoreAllSurfaces
|
||||
init
|
||||
blt
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation
|
||||
Reference=*\G{E1211242-8E94-11D1-8808-00C04FC2C602}#1.0#0#dx7vb.dll#DirectX 7 for Visual Basic Type Library
|
||||
Form=DDTut1.frm
|
||||
Module=MediaDir; ..\..\..\common\media.bas
|
||||
Startup="DDTut1"
|
||||
Command32=""
|
||||
Name="Project1"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
RevisionVer=0
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="MSFT"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
Reference in New Issue
Block a user