GfxModeExists()

Blitz3D Forums/Blitz3D Beginners Area/GfxModeExists()

Hansie(Posted 2003) [#1]
all,

is GfxModeExists() useful for anything at all?

the code above does not print "error" as expected:
**********'
vh_scrwidth = 800
vh_scrheight = 7000
vh_scrdepth = 0
vh_scrmode = 0

vh_scrcheck=GfxModeExists(vh_scrwidth,vh_scrheight,vh_scrdepth)
If vh_scrcheck=True
Color $FF,$00,$00
Print "error"
EndIf
Graphics vh_scrwidth,vh_scrheight,vh_scrdepth,vh_scrmode
*********


Shambler(Posted 2003) [#2]
Your code logic is incorrect, the last line

Graphics vh_scrwidth,vh_scrheight,vh_scrdepth,vh_scrmode

will always be executed regardless of the result of the test.


vh_scrwidth = 641 
vh_scrheight = 480 
vh_scrdepth = 32
vh_scrmode = 0 

vh_scrcheck=GfxModeExists(vh_scrwidth,vh_scrheight,vh_scrdepth) 

If vh_scrcheck=False 
Text 0,0,"error" 

Else

Graphics vh_scrwidth,vh_scrheight,vh_scrdepth,vh_scrmode 
Text 0,0,"success"

EndIf

While Not KeyHit(1)
Wend




Apollonius(Posted 2003) [#3]
Maybe you were going to ask or not but I will,
when i try that is there a way to exit the console cause the console is still open while the game is also open :|
?


Shambler(Posted 2003) [#4]
Just press Escape (Esc)

While Not KeyHit(1)
Wend



Apollonius(Posted 2003) [#5]
... I'm not that stupid Shambler >.>
i meant the dos console the graphic enterface, need a picture?


BlitzSupport(Posted 2003) [#6]
Print and Input are mainly for debugging purposes, and use the console. Use Text () instead and you won't get the console...


Hansie(Posted 2003) [#7]
Thanks guys for all the feedback.