Author Topic: some newbie questions  (Read 6433 times)

0 Members and 1 Guest are viewing this topic.

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
some newbie questions
« 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

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: some newbie questions
« Reply #1 on: February 15, 2007 »
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.

Code: [Select]
#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:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: some newbie questions
« Reply #2 on: February 15, 2007 »
For windowed mode, you'll need to use:
Code: [Select]
#Define ptc_win

Welcome to the forums,
Clyde.
« Last Edit: February 15, 2007 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: some newbie questions
« Reply #3 on: February 15, 2007 »
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
« Last Edit: February 15, 2007 by bbear »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: some newbie questions
« Reply #4 on: February 15, 2007 »
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:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: some newbie questions
« Reply #5 on: February 15, 2007 »
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
« Last Edit: February 15, 2007 by bbear »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: some newbie questions
« Reply #6 on: February 15, 2007 »
This link should help you with Ufmod.. Ufmod if it doesn't work, let us know.  :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: some newbie questions
« Reply #7 on: February 15, 2007 »
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

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: some newbie questions
« Reply #8 on: February 16, 2007 »
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:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: some newbie questions
« Reply #9 on: February 16, 2007 »
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.
« Last Edit: February 16, 2007 by bbear »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: some newbie questions
« Reply #10 on: February 16, 2007 »
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:

Offline bbear

  • C= 64
  • **
  • Posts: 87
  • Karma: 4
    • View Profile
    • Legacy
Re: some newbie questions
« Reply #11 on: February 16, 2007 »
ok
a friend has tested on a P4 3.4 Ghz windowed : it's toooo fast ! ;D
how to limit/set a framerate ?

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: some newbie questions
« Reply #12 on: February 16, 2007 »
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: