• Welcome to Dark Bit Factory & Gravity.
 

some newbie questions

Started by bbear, February 14, 2007

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bbear

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

Jim

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
Challenge Trophies Won:

Clyde

#2
For windowed mode, you'll need to use:

#Define ptc_win


Welcome to the forums,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

bbear

#3
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

Shockwave

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.
Shockwave ^ Codigos
Challenge Trophies Won:

bbear

#5
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

Shockwave

This link should help you with Ufmod.. Ufmod if it doesn't work, let us know.  :)
Shockwave ^ Codigos
Challenge Trophies Won:

bbear

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

Clyde

I could hear it, but it wasnt too good on the playback quality.
Wonder why that is.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

bbear

#9
exact, the playback quality is very bad (same thing with ptc.bi)
compare with tinyPTC version 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 in C (+ some OGL adaptations...) but I can't test on cpu <1 Ghz to see the speed difference.

Shockwave

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..
Shockwave ^ Codigos
Challenge Trophies Won:

bbear

ok
a friend has tested on a P4 3.4 Ghz windowed : it's toooo fast ! ;D
how to limit/set a framerate ?

Shockwave

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?
Shockwave ^ Codigos
Challenge Trophies Won: