sure...
My Main.frm code:
Code:
Private Sub Form_Load()
On Local Error GoTo Error_Handler
'//Call our DirectX8 Object Initialization Routine
Dx8_Init
'//Call our Direct3D8 Initialization Routine
D3D8_Init
'//Call our Direct Input8 Object Initialization Routine
DI_Object_Init
'//Call our Direct Input8 Keyboard Initialization Routine
DI_Keyboard_Init
'//Set the variable that controls whether or not our program
'//is running to TRUE...
bRunning = True
'//Hide the mouse cursor
ShowCursor False
Dim tc_Start As Long
tc_Start = GetTickCount()
'//Load Game Font1...
GameFont_Load_Font1
'//Begin our main loop...
Do
'//Check for input from the keyboard...
DIKeyboardDev.GetDeviceStateKeyboard DIKeyState
'//If the Escape Key (Esc) is pressed, set
'//bRunning = false so that the program can
'//get out of the main loop, clean up, and end the program.
If DIKeyState.Key(1) > 0 Then
bRunning = False
End If
D3DDev.Clear 0, ByVal 0, D3DCLEAR_TARGET, RGB(0, 0, 0), 1#, 0
'//********THIS IS THE PROBLEM AREA********
'//********IT BEGINS HERE...***************
'//Start the D3DDevice Scnene...
D3DDev.BeginScene
GameFont_Display_Font1 "Hello World!", 64, 160, 64, 64, "left"
D3DDev.EndScene
'//********...AND ENDS HERE****************
'//********END OF PROBLEM AREA*************
If GetTickCount() - tc_Start > 16 Then
'//Update the Direct3D Backbuffer and display its
'//contents to the screen.
D3DDev.Present ByVal 0, ByVal 0, 0, ByVal 0
'//Reset TickCounter Start Position...
tc_Start = GetTickCount()
End If
DoEvents
'//...loop until bRunning = false
Loop Until bRunning = False
'//Clean up and end the program...
Shutdown
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
Clean_Up.bas...
Code:
'//Mouse cursor show and hide commands
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Public Sub Shutdown()
On Local Error GoTo Error_Handler
'//Unacquire the Keyboard Device...\
If DIKeyboardDevAcquired = True Then
DIKeyboardDev.Unacquire
DIKeyboardDevAcquired = False
Set DIKeyboardDev = Nothing
End If
'//Check to see if Controler 0 has been Acquired...
'//If so, then Unacquire it...
If DIControlerDevAcquired(0) = True Then
DIControlerDev(0).Unacquire
DIControlerDevAcquired(0) = False
Set DIControlerDev(0) = Nothing
End If
'//...Then do the same for Controler 1.
If DIControlerDevAcquired(1) = True Then
DIControlerDev(1).Unacquire
DIControlerDevAcquired(1) = False
Set DIControlerDev(1) = Nothing
End If
'//Destroy the Direct Input8 Object...
Set DInput = Nothing
'//Destroy the d3d device8 object...
Set D3DDev = Nothing
'//Destroy the d3d8 object...
Set D3D = Nothing
'//Last, but not least, destroy the directx8 object...
Set Dx = Nothing
'//Unhide the cursor...
ShowCursor True
'//Finaly, the program ends...
End
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
End
End Sub
DI_Init.bas...
Code:
Public Sub DI_Object_Init()
On Local Error GoTo Error_Handler
'//Set DInput as the DirectInputObject and Create it...
Set DInput = Dx.DirectInputCreate()
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
Public Sub DI_Keyboard_Init()
On Local Error GoTo Error_Handler
'//Create Direct Input Interface for the Keyboard to the Program.
Set DIKeyboardDev = DInput.CreateDevice("GUID_SysKeyboard")
DIKeyboardDev.SetCommonDataFormat DIFORMAT_KEYBOARD
DIKeyboardDev.SetCooperativeLevel Main.hWnd, _
DISCL_BACKGROUND Or DISCL_NONEXCLUSIVE
DIKeyboardDev.Acquire
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
DIKey_Codes.bas...
Code:
Public Const DIK_ESC As Byte = 1
Public Const DIK_1 As Byte = 2
Public Const DIK_2 As Byte = 3
Public Const DIK_3 As Byte = 4
Public Const DIK_4 As Byte = 5
Public Const DIK_5 As Byte = 6
Public Const DIK_6 As Byte = 7
Public Const DIK_7 As Byte = 8
Public Const DIK_8 As Byte = 9
Public Const DIK_9 As Byte = 10
Public Const DIK_0 As Byte = 11
Public Const DIK_MINUS As Byte = 12
Public Const DIK_EQUAL As Byte = 13
Public Const DIK_BACKSPACE As Byte = 14
Public Const DIK_TAB As Byte = 15
Public Const DIK_Q As Byte = 16
Public Const DIK_W As Byte = 17
Public Const DIK_E As Byte = 18
Public Const DIK_R As Byte = 19
Public Const DIK_T As Byte = 20
Public Const DIK_Y As Byte = 21
Public Const DIK_U As Byte = 22
Public Const DIK_I As Byte = 23
Public Const DIK_O As Byte = 24
Public Const DIK_P As Byte = 25
Public Const DIK_LBRACKET As Byte = 26
Public Const DIK_RBRACKET As Byte = 27
Public Const DIK_ENTER As Byte = 28
Public Const DIK_LCTRL As Byte = 29
Public Const DIK_A As Byte = 30
Public Const DIK_S As Byte = 31
Public Const DIK_D As Byte = 32
Public Const DIK_F As Byte = 33
Public Const DIK_G As Byte = 34
Public Const DIK_H As Byte = 35
Public Const DIK_J As Byte = 36
Public Const DIK_K As Byte = 37
Public Const DIK_L As Byte = 38
Public Const DIK_SEMICOLON As Byte = 39
Public Const DIK_APOSTROPHY As Byte = 40
Public Const DIK_TILD As Byte = 41
Public Const DIK_LSHIFT As Byte = 42
Public Const DIK_BACKSLASH As Byte = 43
Public Const DIK_Z As Byte = 44
Public Const DIK_X As Byte = 45
Public Const DIK_C As Byte = 46
Public Const DIK_V As Byte = 47
Public Const DIK_B As Byte = 48
Public Const DIK_N As Byte = 49
Public Const DIK_M As Byte = 50
Public Const DIK_COMMA As Byte = 51
Public Const DIK_PERIOD As Byte = 52
Public Const DIK_FOWARDSLASH As Byte = 53
Public Const DIK_RSHIFT As Byte = 54
Public Const DIK_NUMASTRICKS As Byte = 55
Public Const DIK_LALT As Byte = 56
Public Const DIK_SPACE As Byte = 57
Public Const DIK_CAPS As Byte = 58
Public Const DIK_F1 As Byte = 59
Public Const DIK_F2 As Byte = 60
Public Const DIK_F3 As Byte = 61
Public Const DIK_F4 As Byte = 62
Public Const DIK_F5 As Byte = 63
Public Const DIK_F6 As Byte = 64
Public Const DIK_F7 As Byte = 65
Public Const DIK_F8 As Byte = 66
Public Const DIK_F9 As Byte = 67
Public Const DIK_F10 As Byte = 68
Public Const DIK_NUMLOCK As Byte = 69
Public Const DIK_SCRLLOCK As Byte = 70
Public Const DIK_NUM7 As Byte = 71
Public Const DIK_NUM8 As Byte = 72
Public Const DIK_NUM9 As Byte = 73
Public Const DIK_NUMMINUS As Byte = 74
Public Const DIK_NUM4 As Byte = 75
Public Const DIK_NUM5 As Byte = 76
Public Const DIK_NUM6 As Byte = 77
Public Const DIK_NUMPLUS As Byte = 78
Public Const DIK_NUM1 As Byte = 79
Public Const DIK_NUM2 As Byte = 80
Public Const DIK_NUM3 As Byte = 81
Public Const DIK_NUM0 As Byte = 82
Public Const DIK_NUMPERIOD As Byte = 83
Public Const DIK_F11 As Byte = 87
Public Const DIK_F12 As Byte = 88
Public Const DIK_F13 As Byte = 86
Public Const DIK_F14 As Byte = 84
Public Const DIK_F15 As Byte = 85
Public Const DIK_NUMCOMMA As Byte = 91
Public Const DIK_PAUSE As Byte = 116
Public Const DIK_NUMENTER As Byte = 156
Public Const DIK_RCONTROL As Byte = 157
Public Const DIK_NUMFOWARDSLASH As Byte = 181
Public Const DIK_SYSRQ As Byte = 183
Public Const DIK_RALT As Byte = 184
Public Const DIK_HOME As Byte = 199
Public Const DIK_UP As Byte = 200
Public Const DIK_PAGEUP As Byte = 201
Public Const DIK_LEFT As Byte = 203
Public Const DIK_RIGHT As Byte = 205
Public Const DIK_END As Byte = 207
Public Const DIK_DOWN As Byte = 208
Public Const DIK_PAGEDOWN As Byte = 209
Public Const DIK_INSERT As Byte = 210
Public Const DIK_DELETE As Byte = 211
Public Const DIK_LWIN As Byte = 219
Public Const DIK_RWIN As Byte = 220
Public Const DIK_APPS As Byte = 221
Game_Font_Codes.bas...
Code:
'//Game Font Table...
Public GameFontTable(69) As RECT
'//Game Font Codes...
Public Const GFC_A As Byte = 1
Public Const GFC_B As Byte = 2
Public Const GFC_C As Byte = 3
Public Const GFC_D As Byte = 4
Public Const GFC_E As Byte = 5
Public Const GFC_F As Byte = 6
Public Const GFC_G As Byte = 7
Public Const GFC_H As Byte = 8
Public Const GFC_I As Byte = 9
Public Const GFC_J As Byte = 10
Public Const GFC_K As Byte = 11
Public Const GFC_L As Byte = 12
Public Const GFC_M As Byte = 13
Public Const GFC_N As Byte = 14
Public Const GFC_O As Byte = 15
Public Const GFC_P As Byte = 16
Public Const GFC_Q As Byte = 17
Public Const GFC_R As Byte = 18
Public Const GFC_S As Byte = 19
Public Const GFC_T As Byte = 20
Public Const GFC_U As Byte = 21
Public Const GFC_V As Byte = 22
Public Const GFC_W As Byte = 23
Public Const GFC_X As Byte = 24
Public Const GFC_Y As Byte = 25
Public Const GFC_Z As Byte = 26
Public Const GFC_SPACE As Byte = 27
Public Const GFC_0 As Byte = 28
Public Const GFC_1 As Byte = 29
Public Const GFC_2 As Byte = 30
Public Const GFC_3 As Byte = 31
Public Const GFC_4 As Byte = 32
Public Const GFC_5 As Byte = 33
Public Const GFC_6 As Byte = 34
Public Const GFC_7 As Byte = 35
Public Const GFC_8 As Byte = 36
Public Const GFC_9 As Byte = 37
Public Const GFC_ACCENT As Byte = 38
Public Const GFC_TILD As Byte = 39
Public Const GFC_EXCLAIM As Byte = 40
Public Const GFC_AT As Byte = 41
Public Const GFC_POUND As Byte = 42
Public Const GFC_STRING As Byte = 43
Public Const GFC_PERCENT As Byte = 44
Public Const GFC_CAROT As Byte = 45
Public Const GFC_AND As Byte = 46
Public Const GFC_ASTERICKS = 47
Public Const GFC_LPARENTHESES As Byte = 48
Public Const GFC_RPARENTHESES As Byte = 49
Public Const GFC_MINUS As Byte = 50
Public Const GFC_UNDERSCORE As Byte = 51
Public Const GFC_EQUAL As Byte = 52
Public Const GFC_PLUS As Byte = 53
Public Const GFC_COMMA As Byte = 54
Public Const GFC_PERIOD As Byte = 55
Public Const GFC_FSLASH As Byte = 56
Public Const GFC_BSLASH As Byte = 57
Public Const GFC_OR As Byte = 58
Public Const GFC_COLON As Byte = 59
Public Const GFC_QUOTE As Byte = 60
Public Const GFC_SEMICOLON As Byte = 61
Public Const GFC_APOSTROPHY As Byte = 62
Public Const GFC_LCAROT As Byte = 63
Public Const GFC_RCAROT As Byte = 64
Public Const GFC_QUESTION As Byte = 65
Public Const GFC_LBRACKET As Byte = 66
Public Const GFC_RBRACKET As Byte = 67
Public Const GFC_LBRACE As Byte = 68
Public Const GFC_RBRACE As Byte = 69
Public Const GFC_A2 As Byte = 70
Public Const GFC_B2 As Byte = 71
Public Const GFC_C2 As Byte = 72
Public Const GFC_D2 As Byte = 73
Public Const GFC_E2 As Byte = 74
Public Const GFC_F2 As Byte = 75
Public Const GFC_G2 As Byte = 76
Public Const GFC_H2 As Byte = 77
Public Const GFC_I2 As Byte = 78
Public Const GFC_J2 As Byte = 79
Public Const GFC_K2 As Byte = 80
Public Const GFC_L2 As Byte = 81
Public Const GFC_M2 As Byte = 82
Public Const GFC_N2 As Byte = 83
Public Const GFC_O2 As Byte = 84
Public Const GFC_P2 As Byte = 85
Public Const GFC_Q2 As Byte = 86
Public Const GFC_R2 As Byte = 87
Public Const GFC_S2 As Byte = 88
Public Const GFC_T2 As Byte = 89
Public Const GFC_U2 As Byte = 90
Public Const GFC_V2 As Byte = 91
Public Const GFC_W2 As Byte = 92
Public Const GFC_X2 As Byte = 93
Public Const GFC_Y2 As Byte = 94
Public Const GFC_Z2 As Byte = 95
Game_Font_Processes.bas...
Code:
'//Load the image for font1.bmp
Public Sub GameFont_Load_Font1()
On Local Error GoTo Error_Handler:
Dim x As Long
Dim y As Long
Dim c As Byte
Set tex_Font1 = GFX_Load_Texture(App.Path + "\Graphics\Fonts\Font1.bmp", _
1024, 320)
For y = 0 To 320 - 64 Step 64
For x = 0 To 1024 - 64 Step 64
c = c + 1
GameFontTable(c).Left = x
GameFontTable(c).Top = y
GameFontTable(c).Right = x + 64
GameFontTable(c).bottom = y + 64
If c > 68 Then GoTo GFLoad_Finnish
Next x
Next y
GFLoad_Finnish:
Set Sprite = D3Dx.CreateSprite(D3DDev)
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
'//Display the characters of Font1 using the string Text on the screen...
Public Sub GameFont_Display_Font1(ByVal Text As String, _
ByVal x As Long, ByVal y As Long, _
ByVal Sizex As Long, ByVal Sizey As Long, _
ByVal Center As String)
On Local Error GoTo Error_Handler
Dim i As Long
Dim GFC As Byte
Dim s As D3DVECTOR2
Dim RotCenter As D3DVECTOR2
Dim Rot As Single
Dim Offset As D3DVECTOR2
For i = 0 To Len(Text) - 1
GFC = GameFont_TextToCode(Mid(Text, i + 1))
If Center = "left" Then
If GFC < 70 Then
s.x = (Sizex / 64) * 1
s.y = (Sizey / 64) * 1
RotCenter.x = Sizex / 2
RotCenter.y = Sizey / 2
Rot = 0
Offset.x = (i * 64) + (x + (Sizex / 2))
Offset.y = (i * 64) + (y + (Sizey / 2))
Sprite.Draw tex_Font1, GameFontTable(GFC), s, RotCenter, Rot, Offset, dxvbliba.D3DColorRGBA(0, 0, 0, 255)
End If
If GFC >= 70 Then
s.x = (Sizex / 64) * 1
s.y = ((Sizey / 2) / 64) * 1
RotCenter.x = Sizex / 2
RotCenter.y = Sizey / 2
Rot = 0
Offset.x = (i * 64) + (x + (Sizex / 2))
Offset.y = (i * 64) + (y + Sizey)
Sprite.Draw tex_Font1, GameFontTable(GFC - 70), s, RotCenter, Rot, Offset, dxvbliba.D3DColorRGBA(0, 0, 0, 255)
End If
End If
Next i
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
'//Convert Text Input to GameFontCode...
Public Function GameFont_TextToCode(ByVal t As String) As Byte
On Local Error GoTo Error_Handler
Dim Code As Byte
If t = "A" Then Code = GFC_A
If t = "B" Then Code = GFC_B
If t = "C" Then Code = GFC_C
If t = "D" Then Code = GFC_D
If t = "E" Then Code = GFC_E
If t = "F" Then Code = GFC_F
If t = "G" Then Code = GFC_G
If t = "H" Then Code = GFC_H
If t = "I" Then Code = GFC_I
If t = "J" Then Code = GFC_J
If t = "K" Then Code = GFC_K
If t = "L" Then Code = GFC_L
If t = "M" Then Code = GFC_M
If t = "N" Then Code = GFC_N
If t = "O" Then Code = GFC_O
If t = "P" Then Code = GFC_P
If t = "Q" Then Code = GFC_Q
If t = "R" Then Code = GFC_R
If t = "S" Then Code = GFC_S
If t = "T" Then Code = GFC_T
If t = "U" Then Code = GFC_U
If t = "V" Then Code = GFC_V
If t = "W" Then Code = GFC_W
If t = "X" Then Code = GFC_X
If t = "Y" Then Code = GFC_Y
If t = "Z" Then Code = GFC_Z
If t = " " Then Code = GFC_SPACE
If t = "0" Then Code = GFC_0
If t = "1" Then Code = GFC_1
If t = "2" Then Code = GFC_2
If t = "3" Then Code = GFC_3
If t = "4" Then Code = GFC_4
If t = "5" Then Code = GFC_5
If t = "6" Then Code = GFC_6
If t = "7" Then Code = GFC_7
If t = "8" Then Code = GFC_8
If t = "9" Then Code = GFC_9
If t = "`" Then Code = GFC_ACCENT
If t = "~" Then Code = GFC_TILD
If t = "!" Then Code = GFC_EXCLAIM
If t = "@" Then Code = GFC_AT
If t = "#" Then Code = GFC_POUND
If t = "$" Then Code = GFC_STRING
If t = "%" Then Code = GFC_PERCENT
If t = "^" Then Code = GFC_CAROT
If t = "&" Then Code = GFC_AND
If t = "*" Then Code = GFC_ASTERICKS
If t = "(" Then Code = GFC_LPARENTHESES
If t = ")" Then Code = GFC_RPARENTHESES
If t = "-" Then Code = GFC_MINUS
If t = "_" Then Code = GFC_UNDERSCORE
If t = "=" Then Code = GFC_EQUAL
If t = "+" Then Code = GFC_PLUS
If t = "," Then Code = GFC_COMMA
If t = "." Then Code = GFC_PERIOD
If t = "/" Then Code = GFC_FSLASH
If t = "\" Then Code = GFC_BSLASH
If t = "|" Then Code = GFC_OR
If t = ":" Then Code = GFC_COLON
If t = Chr(34) Then Code = GFC_QUOTE
If t = ";" Then Code = GFC_SEMICOLON
If t = "'" Then Code = GFC_APOSTROPHY
If t = "<" Then Code = GFC_LCAROT
If t = ">" Then Code = GFC_RCAROT
If t = "?" Then Code = GFC_QUESTION
If t = "[" Then Code = GFC_LBRACKET
If t = "]" Then Code = GFC_RBRACKET
If t = "{" Then Code = GFC_LBRACE
If t = "}" Then Code = GFC_RBRACE
If t = "a" Then Code = GFC_A2
If t = "b" Then Code = GFC_B2
If t = "c" Then Code = GFC_C2
If t = "d" Then Code = GFC_D2
If t = "e" Then Code = GFC_E2
If t = "f" Then Code = GFC_F2
If t = "g" Then Code = GFC_G2
If t = "h" Then Code = GFC_H2
If t = "i" Then Code = GFC_I2
If t = "j" Then Code = GFC_J2
If t = "k" Then Code = GFC_K2
If t = "l" Then Code = GFC_L2
If t = "m" Then Code = GFC_M2
If t = "n" Then Code = GFC_N2
If t = "o" Then Code = GFC_O2
If t = "p" Then Code = GFC_P2
If t = "q" Then Code = GFC_Q2
If t = "r" Then Code = GFC_R2
If t = "s" Then Code = GFC_S2
If t = "t" Then Code = GFC_T2
If t = "u" Then Code = GFC_U2
If t = "v" Then Code = GFC_V2
If t = "w" Then Code = GFC_W2
If t = "x" Then Code = GFC_X2
If t = "y" Then Code = GFC_Y2
If t = "z" Then Code = GFC_Z2
GameFont_TextToCode = Code
Exit Function
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Function
GFX_Init.bas...
Code:
'//Basic Dx8_Initialization
Public Sub Dx8_Init()
On Local Error GoTo Error_Handler
'//Set the DirectX8 Object to Dx
Set Dx = New DirectX8
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
Public Sub D3D8_Init()
On Local Error GoTo Error_Handler
'//Set D3D8 to create the Direct3D Object using Dx
Set D3D = Dx.Direct3DCreate()
'//Use whatever display mode is set at the time of program execution...
D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, DispMode
'//Set up the screen.
D3DPP.hDeviceWindow = Main.hWnd
D3DPP.BackBufferCount = 1
D3DPP.BackBufferWidth = 640
D3DPP.BackBufferHeight = 480
D3DPP.BackBufferFormat = DispMode.Format
D3DPP.SwapEffect = D3DSWAPEFFECT_FLIP
D3DPP.Windowed = 0
D3DPP.MultiSampleType = D3DMULTISAMPLE_NONE
'//Now set the Direct3D Device with the above information...
Set D3DDev = D3D.CreateDevice(D3DADAPTER_DEFAULT, _
D3DDEVTYPE_HAL, _
Main.hWnd, _
D3DCREATE_SOFTWARE_VERTEXPROCESSING, _
D3DPP)
Set D3DBackbuffer = D3DDev.GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO)
Exit Sub
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number) + " in D3D8_Init() under module GFX_Init.bas.", vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Sub
GFX_Load.bas...
Code:
Public Function GFX_Load_Texture(ByVal filename As String, _
ByVal width As Long, _
ByVal height As Long) As Direct3DTexture8
On Local Error GoTo Error_Handler
'//Place holder texture for the return of the function's texture
Dim Texture As Direct3DTexture8
'//Now load it from the file...
Set Texture = D3Dx.CreateTextureFromFileEx(D3DDev, filename, width, height, _
D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, _
D3DX_FILTER_POINT, D3DX_FILTER_POINT, RGB(255, 0, 255), ByVal 0, ByVal 0)
Set GFX_Load_Texture = Texture
Exit Function
Error_Handler:
MsgBox D3Dx.GetErrorString(Err.Number), vbOKOnly, Conversion.Error(Err.Number)
Shutdown
End Function
Globals.bas...
Code:
'//Determins whether or not the game is running...
Public bRunning As Boolean
'//DirectX8 Graphics
Public Dx As DirectX8
Public D3D As Direct3D8
Public D3Dx As New D3DX8
Public D3DDev As Direct3DDevice8
Public D3DPP As D3DPRESENT_PARAMETERS
Public DispMode As D3DDISPLAYMODE
Public D3DDevBackbuffer As Direct3DSurface8
Public Sprite As D3DXSprite
'//End of DirectX8 Vertex Variables
'//GFX Textures
'//Font 1
Public tex_Font1 As Direct3DTexture8
'//Direct Input
Public DInput As DirectInput8
Public DIKeyboardDev As DirectInputDevice8
Public DIKeyboardDevAcquired As Boolean
Public DIKeyState As DIKEYBOARDSTATE
Public DIControlerDev(1) As DirectInputDevice8
Public DIControlerDevAcquired(1) As Boolean
Public DIControlerState(1) As DIJOYSTATE
And that's acutally the entire program!
The code you're probably looking for is in GFX_Load.bas and Game_Font_Processes.bas.
I really apreciate all of this help...
I am, however, thinking of just using D3D8 for making flat plains using two triangles put together, texture it with the image, and just go from there because I've been doing some extra searching on other sites and it seems so much easier that way...AND directx4vb.vbgamer.com has tutorials on this stuff that I've always found easiest to read. So for I've seen nothing on sprites and directx8 and those who are stuck with similar issues like me, keep getting told to use D3DVertices and just make plains on the screen without depth...except I think I'll even add depth kind of like Super Smash Bros...Only, it's stick figures and it's completely original from scratch...
But then I would still have to figure out what to do with my custom fonts.