[Implemented] Nativ DirectX7 should be a Subsystem too
[Implemented] Nativ DirectX7 should be a Subsystem too
How can I detect with compilerif thats I use currently the DirectX7 sprite lib?
I cannot...so I hope the DirectX7 will be also a Subsystem (The default one).
I cannot...so I hope the DirectX7 will be also a Subsystem (The default one).
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Re: [PB4.20b1] Nativ DirectX7 should be a Subsystem too
if no subsystem used :IceSoft wrote:How can I detect with compilerif thats I use currently the DirectX7 sprite lib?
I cannot...so I hope the DirectX7 will be also a Subsystem (The default one).
Code: Select all
CompilerIf SubSystem("")
Re: [PB4.20b1] Nativ DirectX7 should be a Subsystem too
Ok fine.thyphoon wrote:if no subsystem used :Code: Select all
CompilerIf SubSystem("")
As long as there are only 'Graphic' Subssystems existing as long I can use this piece of code. Thanks.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Code: Select all
CompilerIf SubSystem("")
Try and change the subsystem:
Code: Select all
Debug SubSystem("")
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...

Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX 9")
CompilerElse
MessageRequester("", "DirectX 7")
CompilerEndIf
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
What about DX9: I have currently 3 Subsystems:nco2k wrote:
c ya,Code: Select all
CompilerIf Subsystem("DirectX9") MessageRequester("", "DirectX 9") CompilerElse MessageRequester("", "DirectX 7") CompilerEndIf
nco2k
the native DirectX7
the 4.20 DirectX9
the S.M. DX9
And do not forget the currently not working OpenGL subsystem!
So we need a new compiler directive: CompilerElseIf
Last edited by IceSoft on Fri Jan 04, 2008 7:30 pm, edited 1 time in total.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Makes me think... is there a CompilerElseIf these days?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
traumatic wrote:What about using CompilerCase for that?
Code: Select all
CompilerSelect <numeric constant>
CompilerCase
...
[CompilerDefault]
...
CompilerEndSelect
You can only get an info about a subsystem like using or not using...not of which one is used.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
No prob... I doing it all the time.traumatic wrote:... I thought into the wrong direction.IceSoft wrote:You can only get an info about a subsystem like using or not using...not of which one is used.

Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
i agree on the missing CompilerElseIf, but stop saying xyz is not possible, because it is...
c ya,
nco2k

Code: Select all
CompilerIf Subsystem("DirectX9")
MessageRequester("", "DirectX9")
CompilerElse
CompilerIf Subsystem("DX9")
MessageRequester("", "DX9")
CompilerElse
CompilerIf Subsystem("OpenGL")
MessageRequester("", "OpenGL")
CompilerElse
MessageRequester("", "DirectX7")
CompilerEndIf
CompilerEndIf
CompilerEndIf
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Please add the missing 2 new grafic subsystem which I will make with the release of PB4.20.nco2k wrote:i agree on the missing CompilerElseIf, but stop saying xyz is not possible, because it is...
c ya,Code: Select all
CompilerIf Subsystem("DirectX9") MessageRequester("", "DirectX9") CompilerElse CompilerIf Subsystem("DX9") MessageRequester("", "DX9") CompilerElse CompilerIf Subsystem("OpenGL") MessageRequester("", "OpenGL") CompilerElse MessageRequester("", "DirectX7") CompilerEndIf CompilerEndIf CompilerEndIf
nco2k
DX10 and SDL
If you have it done...I will say no longer it is not possible.

Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
and that is connected how to this thread? dont mix apples and oranges. :roll:IceSoft wrote:Please add the missing 2 new grafic subsystem which I will make with the release of PB4.20.
DX10 and SDL
If you have it done...I will say no longer it is not possible.
first you said its not possible to detect dx7 because its not a subsystem and i showed you otherwise. then you said its not possible to detect various subsystems because of the missing CompilerElseIf and i showed you otherwise.
you wanted a solution, you got a soultion... its that simple.
c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
You could have use CompilerSelect if it wasn't so buggy. I think I need to report something!
You can test the concept with constants, but unfortunately with Subsystem() inlined everything goes boom.
You can test the concept with constants, but unfortunately with Subsystem() inlined everything goes boom.
Code: Select all
#DX9 = Subsystem("DirectX9")
#OpenGL = Subsystem("opengl")
#SDL = Subsystem("sdl")
#DX10 = Subsystem("dx10")
CompilerSelect 1
CompilerCase #DX9
Debug "nine"
CompilerCase #OpenGL
Debug "opengl"
CompilerCase #sdl
Debug "sdl"
CompilerCase #dx10
Debug "ten!"
CompilerDefault
Debug "seven"
CompilerEndSelect