Total Newbie question

BlitzMax Forums/BlitzMax Beginners Area/Total Newbie question

Newbie(Posted 2007) [#1]
(1) - How do I change the Mouse pointer image in BlitzMax?
(2) - does someone have a function that returns the current framerate?
(3) how can i perform a fullscreen fade to/from black on an image
(4) does max support anything but .ogg and .wav? such as MP3?
(5) I do this when i LOAD an image:
Global TEST_Handle:TImage = LoadImage( "incbin::TESTIMAGE.png" ); How do I use RELEASE to FREE that image again? I have STRICT enabled so I keep getting error messages if I just do RELEASE TEST_Handle ??
I use .png


H&K(Posted 2007) [#2]
5) test_Handle=Null (I think)


Amon(Posted 2007) [#3]
(1) - How do I change the Mouse pointer image in BlitzMax?



Step 1) Draw an image in your favourite art package to replace the mouse curser in BMax.

Step 2) Load your image in to BMax with 'LoadImage'. Set the mask colour of you're not using alpha.

Step 3) Use HideMouse to hide the mouse

Step 4) Draw the Image at the Mousex() & MouseY() locations. E.G Drawimage MyCurser, MouseX(), MouseY(), 0

(4) does max support anything but .ogg and .wav? such as MP3?


Max supports nearly all forms of Audio when used with FMOD or BASS.


Newbie(Posted 2007) [#4]
if i use hidemouse() dont i need to use showmouse() before leaving the program with END? how do i define a hotspot in a custom image?


Perturbatio(Posted 2007) [#5]
if i use hidemouse() dont i need to use showmouse() before leaving the program with END?


No, only if you want to show the mouse again while your program is running, it will automatically return at the end.

how do i define a hotspot in a custom image?

SetHandle


Newbie(Posted 2007) [#6]
Thanks! so SetHandle I need now. now, whats this about the setting of colormask; which command is that?


Newbie(Posted 2007) [#7]
oh, dont i need Function SetImageHandle( image:TImage,x#,y# ) instead of simply sethandle()??


Perturbatio(Posted 2007) [#8]
oops, yes, that's the one.


Newbie(Posted 2007) [#9]
I do this when i LOAD an image:
Global TEST_Handle:TImage = LoadImage( "incbin::TESTIMAGE.png" ); How do I use RELEASE to FREE that image again? I have STRICT enabled so I keep getting error messages if I just do RELEASE TEST_Handle ??
I use .png


JazzieB(Posted 2007) [#10]
This was answered in the very first post. Use.

TEST_Handle=Null


Newbie(Posted 2007) [#11]
I know. but nothing after that?

its as simple as handle = null ??? no RELEASE anywhere? if not, what is the command there for in the first place (sorry, confused)


tonyg(Posted 2007) [#12]
It's *highly* recommended to not use integer object handles so the Release command would be redundant.


Tom Darby(Posted 2007) [#13]
Yep--if you avoid using integer object handles, all you need to do is set all references to an object to null and the garbage collector will remove that object automagically.


smilertoo(Posted 2007) [#14]
Newbie: you need to play with the language, you'll never learn a thing always coming here first and asking for it all to be done for you.


Yan(Posted 2007) [#15]

its as simple as handle = null ??? no RELEASE anywhere? if not, what is the command there for in the first place (sorry, confused)
I suggest you have a read of the docs, specifically 'BlitzMax Tutorials and Articles>BlitzMax Memory management'.


FlameDuck(Posted 2007) [#16]
(1) - How do I change the Mouse pointer image in BlitzMax?
You draw an image at the current pointer coordinates.

(2) - does someone have a function that returns the current framerate?
Yes.

(3) how can i perform a fullscreen fade to/from black on an image
Use SetAlpha and draw a Black Rectangle over it. Look in OldSkool2.bmx for an example of this.

(4) does max support anything but .ogg and .wav? such as MP3?
No. You need a commercial (and expensive!) license in order to use MP3.

How do I use RELEASE to FREE that image again?
You don't. BlitzMAX does this for you, when it determines that you no longer need it, or at least have no way of referencing it.


Newbie(Posted 2007) [#17]
Thanks, flameduck