VB Code:
Dim WorldDC As Long
Dim WorldBMP As Long
Dim FormDC As Long
Dim WorldRegions() As Long
Dim num_regions As Long
Private Function Initialize()
End Function
Public Function BeginScene(hdc As Long) As Long
'Here we will initialize the WorldDC and paint it plain black
Dim hr As Long, vr As Long
Dim wh As Long, ww As Long 'world height and width
FormDC = hdc
hr = GetDeviceCaps(hdc, HORZRES)
vr = GetDeviceCaps(hdc, VERTRES)
'set them to how they should be
If (hr > 0) Then
ww = hr * 0.4
wh = vr * 0.15
End If
'set up our world
WorldDC = CreateCompatibleDC(hdc)
WorldBMP = CreateCompatibleBitmap(hdc, ww, wh)
SelectObject WorldDC, WorldBMP
'fill it with black
BitBlt WorldDC, 0, 0, ww, wh, 0, 0, 0, vbBlackness
End Function
Public Function UpdateScene() As Long
'blit the backbuffer to the screen
BitBlt FormDC, 0, 0, ww, wh, WorldDC, 0, 0, vbSrcCopy
End Function
Public Function EndScene() As Long
'delete the memory users
DeleteDC WorldDC
DeleteObject WorldBMP
End Function
Private Function Terminate()
'Delete the memory users
DeleteDC WorldDC
DeleteObject WorldBMP
End Function
Anyone know why it doesn't blit blackness to the screen? I admit its been well into 7 months since I've typed a line of anything but ASM.