I see PeekMessage isn't documented...
MOVEFILE/MOVEDIR are needed :|
Quote
function copy: a$, b$
copyfile a$, b$
killfile a$
endfunction
Yes, it works.. but if you have a huge file/dir it may take long time
and may not be enough space
Pressing F1 on this command in the editor: GETLASTERROR$()
doesn't work. It won't go green in the editor either.
There is a link missing on the bottom of the help for GETLASTERROR$():
"See also NETGETLASTERROR$()"
And how do I start macros? Is it possible to pass the active gbas-file?s name and path to the macro?
ok, fixed the "won't go green" bug.
The manual text for me is:
Returns an error code followed by a short text describing the last error.
Following the defiend error codes:
0 success
3 file does not exist
4 wrong argument
5 string is too long
7 not enough memory
8 wrong dimension
9 out of dimesioned range (makes the program end)
20 no more data available
See also NETGETLASTERROR$()
Not for you?
Yes, what I meant is that the "See also"-link isn't a link, usually you can just click the link to get to the command.
What does PlatformInfo$("") return on an iPhone ?
see manual for platforminfo$() ?
The macros are described in the manual: GLBasic intern/tools. It should be pretty straightforward when you execute the first one, it shows you the environment variables set.
Platforminfo$ has :
"LINUX" = Linux operating system
"WIN32" = Windows Desktop (9x, NT, XP, 2003, ...)
"WINCE" = PocketPC
"GP2X" = GP2X
"MACOSX"= Mac OS X
Unfortunately the iPhone isn't detailed...
Quote from: Kitty Hello on 2009-Jul-21
The macros are described in the manual: GLBasic intern/tools. It should be pretty straightforward when you execute the first one, it shows you the environment variables set.
Yes I read that part but it says nothing about where to put those macro files or where/how to execute them. I have looked all over the tools menu and the buttons but there is nothing about macros?
Menu: Tools/Macro/Edit?
If it's not there, it's (again) a bug.
Yes, its not there :)
in the german version:
Top Menu:
Werkzeuge/Macros/bearbeiten/
It is not in the Popupmenu!
The GEN... commands don't feel intuitive, would it be better with FREESPRITE AND FREEFILE or something similar?
The description would be something like this:
Generate the next free index for a sprite or a file.
GLOBAL ball = FREESPRITE()
LOADSPRITE "ball.png", ball
DRAWSPRITE ball, 50, 50
I have realy been looking forward to this command :-)
The online documentation is a bit clearer with it :)
But yes, GENx does seem a bit of a strange name to give it...
for me NEWSPRITE creates a new sprite, not a handle :-)
GEN is generate like the OpenGL commands: glGenTexture...
I code based on identities indexed sequentially with sprites id's
So
Campfire=Emitter_Create()
EntityPlayerID=1
loadsprite "Player.png",EntityPlayerID
Much easier to remember than a number obviously.
This is what is neccesary for creating an entity infrastructure.
I've been using something like this:
ball_id = LoadSprite("ball.png")
DRAWSPRITE ball_id, 50, 50
FUNCTION LoadSprite: File$
STATIC id%
INC id, 1
LOADSPRITE File$, id
RETURN id
ENDFUNCTION
This new command will make it a lot smoother since sprites and anims share the index number.
Quote from: Moru on 2009-Jul-22
This new command will make it a lot smoother since sprites and anims share the index number.
I like it, i will use it with my PS for sure...it works the same exact way...calling an emitter auto indexes the next image for a new emitter...using the loadsprite index, and a name stores the index.
hence, ball=Emitter_CreateSystem("ball.png")
So, using it will compliment the SpriteZ API im working on.
Revamped to work with the IDE naming conventions:
FUNCTION LOADIMAGE: File$
STATIC id%
INC id, 1
LOADSPRITE File$, id
RETURN id
ENDFUNCTION
Edit: Im probably going to alter it to be global, instead of static, in order to pass the identity to the emitter, and visa versa.
Question about v7 and iPhone: Do we need a Mac to compile?
Quote from: Hatonastick on 2009-Jul-23
Question about v7 and iPhone: Do we need a Mac to compile?
I believe that you do have to have a Mac to compile for iPhone.
Yes, unfortunately. Someone told me it's possible to install OSX on an EEE-PC or an Acer Asprite One, though, which are very cheap.
I think about a software distribution service for iPhone as well, so you don't need one.
That's unfortunate. A pity Apple wouldn't play ball. Oh well, have to wait and see what the future holds.
Interesting idea Gernot, my only concern is it could be a lot of added work for you. Especially if (and I can't see why it wont) the iPhone side of GLB takes off. I'm continually impressed with the work you do on GLB mate.
Silly question, where is the V7 download? Is it the download on the front page? It states "Current version" but does that mean current stable version or bang upto date version?
Cheers. I don't bother reading the shoutbox, so I missed it. You'd think something as important as that would hit the NEWS first ;)
Hi,
This code works in 6.248
Dim grid%[24][24]
Local handle%, one%
Local mx, my, x, y
handle=OPENFILE(1,"GLBNew2.bdt",TRUE)
FOR y = 0 TO 21
FOR x = 0 TO 21
READBYTE handle,one
IF CHR$(one) = 6
mx = x
my = y
ENDIF
NEXT
NEXT
But gives the following Error in 7.057
CALLBYNAME "GLB_ON_QUIT" *** failed ***
Error:
No file
Regards,
johngood.
The error is only a warning and you need to read the help-file about the .app dir that is created when compiling. All datafiles, images, sound and other files you are using in your program needs to move into that directory, then your code should work.
Sorry! ;/
My understanding was that the .App directory was only for Mac related projects.
Regards,
johngood.
Quote from: Kitty Hello on 2009-Jul-22
GEN is generate like the OpenGL commands: glGenTexture...
Ahh i missed that new command set, I will rewrite my api using this GENSPRITE() structure.... :good: