Total Newbie question
BlitzMax Forums/BlitzMax Beginners Area/Total Newbie question
| ||
(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 |
| ||
5) test_Handle=Null (I think) |
| ||
(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. |
| ||
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? |
| ||
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 |
| ||
Thanks! so SetHandle I need now. now, whats this about the setting of colormask; which command is that? |
| ||
oh, dont i need Function SetImageHandle( image:TImage,x#,y# ) instead of simply sethandle()?? |
| ||
oops, yes, that's the one. |
| ||
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 |
| ||
This was answered in the very first post. Use. TEST_Handle=Null |
| ||
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) |
| ||
It's *highly* recommended to not use integer object handles so the Release command would be redundant. |
| ||
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. |
| ||
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. |
| ||
its as simple as handle = null ??? no RELEASE anywhere? if not, what is the command there for in the first place (sorry, confused) |
| ||
(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. |
| ||
Thanks, flameduck |