Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: bbear on February 15, 2007
-
I'm starting with FreeBasic and I thanks all members with their sources and snippets :clap:
first : how to hide the console window in windowed mode ??
I want to know how to make a "windowed or fullscreen" menu start with a code using tinyPTC : how to switch between mode ?
I found the source of "Dutch Colourz", but I can't find code for these 2 questions ;D
thanks
-
I think if you use
fbc -s gui myprogram.bas
to compile it you should lose the command prompt box.
One way of asking if you want fullscreen or not is to use Windows MessageBox function.
#include once "windows.bi"
Dim answer as integer
answer = MessageBox(0, "Press YES to go Fullscreen", "Choose!", MB_YESNO)
if answer = IDYES then
rem fullscreen
else
rem windowed
end if
Jim
-
For windowed mode, you'll need to use:
#Define ptc_win
Welcome to the forums,
Clyde.
-
for the console and the dialog box, it's ok now ;)
many thanks
:cheers:
Edit: hmm...err... I don't know what to do with "if answer=IDYES then fullscreen... else windowed...". I can't use "#define ptc_win" else always window mode is used.
my code is the same to open the screen in window/fullscreen mode with "ptc_win" defined (ptc_open).
is it possible to simulate "define ptc_win" or another thing ?
thanks
-
Yes, that is a problem if you use the windows requester. as most versions of tinyptc need #define ptc_win, there is a version of tinyptc here somewhere that asks for fullscreen or windowed, I believe it is the one made by Rbraz.
Rbraz is around quite a bit, maybe he can point you the right way.. The latest one I use is with mmx support and it doesn't prompt for fullscreen/windowed.
-
I found this topic about tinyptc_ogl version : "Amiga Simulator" example.
http://dbfinteractive.com/index.php?topic=626.0
I already tested this "Amiga" intro but with tinyPtc
but I tried with uFmod and it doesnt work properly
-
This link should help you with Ufmod.. Ufmod (http://dbfinteractive.com/index.php?topic=542.0) if it doesn't work, let us know. :)
-
your tinyPTC version (libtinyptc.rar->shockwave_example) work fine with uFmod
but the music is not played properly with the sync gl version (or tinyptc_gl.bi).
amiga ufmod (http://cyberpingui.free.fr/amiga_ufmod.zip)
-
I could hear it, but it wasnt too good on the playback quality.
Wonder why that is.
-
exact, the playback quality is very bad (same thing with ptc.bi)
compare with tinyPTC version (http://cyberpingui.free.fr/vrstestwin.zip) only (thanks to ShockWave for these great effects ;) - Amiga rulez)
PS: what's the difference between tinyptc/ptc and standard GDI ? I coded some GDI only effets (http://cyberpingui.free.fr/oldies/intros.rar) in C (+ some OGL adaptations...) but I can't test on cpu <1 Ghz to see the speed difference.
-
The main difference is the lack of V sync. in standard tinyptc there is no screen sync which is the main reason why the new versions of tinyptc were developed. The idea was to give a nice steady refresh to make really nice oldschool demos possible. I checked the example and the music quality isn't great but I think at least some of that can be put down to ufmod, the replay quality is not as good as fmod or bass but then again it's a lot smaller..
-
ok
a friend has tested on a P4 3.4 Ghz windowed : it's toooo fast ! ;D
how to limit/set a framerate ?
-
I think that it defaults to your card settings for that resolution. Rbraz or Jim could change it to allow the application to control the refresh rate.
Jim, Rbraz are you reading by any chance?