10-08-2022, 02:57 AM
(10-07-2022, 09:56 AM)SMcNeill Wrote: Try this:
Code: (Select All)Data 0,1,2,7,8,9,10,11,12,13,256,32
Dim mode(11)
For i = 0 To 11
Read mode(i)
Next
Dim m As _MEM
For i = 0 To 11
If i < 10 Then
Screen mode(i)
Else
Screen _NewImage(640, 400, mode(i))
End If
Print "ACTUAL MODE:"; mode(i)
w = _Width(0)
h = _Height(0)
bpp = _PixelSize
Select Case bpp
Case 0 'text screen
Print "SCREEN 0"
Case 1
For j = 1 To 255
If _PaletteColor(j, 0) = &HFF000000 Then Exit For
Next
Select Case j
Case 4: Print "SCREEN 1"
Case 2: If h = 200 Then Print "SCREEN 2" Else Print "SCREEN 11"
Case 1: Print "SCREEN 10"
Case 16
If w = 320 Then
If _PaletteColor(17, 0) = &HFF000000 Then Print "SCREEN 7" Else Print "SCREEN 13"
Else
Select Case h
Case 200: Print "SCREEN 8"
Case 350: Print "SCREEN 9"
Case 480: Print "SCREEN 12"
Case Else
Print "SCREEN _NEWIMAGE("; w; ","; h; ", 256)"
End Select
End If
End Select
Case 4
Print "SCREEN _NEWIMAGE("; w; ","; h; ",32)"
End Select
Sleep
Next
Hi Steve
fine your version of GetScreenMode with new _QB64keywords....
_PaletteColor
_PixelSize
and the _MEM type of data assembled together with DATA into code.
A fantastic example of how to mix old Qbasic and QB64!
Thanks for sharing it.