Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - 9940

Pages: [1] 2
1
Userlibs [ *.gbal] / gbal v2 ?
« on: 2009-Oct-01 »
Can you provide a new(and more secure) version of gbal which can be used for releasing to the public the highly portable glbasic libs ?

2
Bug Reports / Wiz - INI files
« on: 2009-Sep-10 »
This code doesn't create the ini file on gp2x wiz !  :help:

INIOPEN "file.ini"
INIPUT "a","b","c"
INIOPEN ""

3
IDE/Syntax / Request for "loading" screen
« on: 2009-Aug-22 »
Should be nice if we can modify (translate) the default "Loading..." message before our app start

[attachment deleted by admin]

4
GLBasic - en / X_PUTSHADER issue
« on: 2009-Aug-06 »
Code: (glbasic) [Select]
uniform vec3 Color;
void main (void)
{
   gl_FragColor = vec4(Color, 1.0);
}

Code: (glbasic) [Select]
X_SETSHADER 1
X_PUTSHADER "Color", XXXX
X_DRAWOBJ 0, 0

What I should put instead of XXXX since X_PUSHADER only supports floats?

5
GLBasic - en / inline call to rename()
« on: 2009-Jul-28 »
I wish to call rename() because glbasic don't have anything to rename or move files/dirs.
But I get an error. Someone know how can I implement it correctly ?

Code: (glbasic) [Select]
INLINE
     }
     extern int rename(const char *_old, const char *_new);
     namespace __GLBASIC__
     {
ENDINLINE

FUNCTION inline_Rename: old$, new$
     INLINE
          rename(old_Str.c_str(), new_Str.c_str());
     ENDINLINE
ENDFUNCTION

gpc_temp1.o:gpc_temp1.cpp:(.text+0x248): undefined reference to `rename(char const*, char const*)'


6
Announcements / GLBasic colors set
« on: 2009-Jul-21 »
Grey

[attachment deleted by admin]

7
GLBasic - en / SUB or FUNCTION ?
« on: 2009-Jul-20 »
Which is better ?
Code: (glbasic) [Select]
WHILE TRUE
    DrawSomething()
    SHOWSCREEN
WEND
Code: (glbasic) [Select]
WHILE TRUE
    GOSUB DrawSomething
    SHOWSCREEN
WEND

I'm talking about performance

8
Bug Reports / X_DRAWAXES on WiZ
« on: 2009-Jul-19 »
X_DRAWAXES doesn't seem work on gp2x wiz

Code: (glbasic) [Select]
WHILE TRUE
 X_MAKE3D 1, 1000, 45
 X_CAMERA 0, 0, -30,   0 ,0 ,0
 X_DRAWAXES 0, 0, 0
 SHOWSCREEN
WEND

X_OBJ... works well

9
Bug Reports / BYREF + TYPE in FUNCTION
« on: 2009-Jul-19 »
How can i get this code works ?

Code: (glbasic) [Select]
TYPE CMAP
NAME$
BACKGROUND
MAP[20][15]
ENDTYPE

FUNCTION MAP_LOAD: filename$, BYREF pMAP AS CMAP
pMAP.NAME$ = "A"
ENDFUNCTION


compiling:
In file included from C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_tempg.cpp:2:
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: `Anything' has not been declared
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: ISO C++ forbids declaration of `pMAP' with no type
In file included from C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp0.cpp:1:
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: `Anything' has not been declared
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: ISO C++ forbids declaration of `pMAP' with no type
In file included from C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp1.cpp:1:
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: `Anything' has not been declared
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp.h:8: error: ISO C++ forbids declaration of `pMAP' with no type
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp1.cpp:5: error: `Anything' has not been declared
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp1.cpp:6: error: ISO C++ forbids declaration of `pMAP' with no type
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp1.cpp: In function `DGInt __GLBASIC__::MAP_LOAD(__GLBASIC__::DGStr, int)':
C:\DOCUME~1\User\IMPOST~1\Temp\glbasic\gpc_temp1.cpp:8: error: request for member `NAME_Str' in `pMAP', which is of non-class type `int'

10
IDE/Syntax / MAKEDIR()
« on: 2009-Jul-15 »
There isn't a command to make a directory  :S

11
Bug Reports / gp2x wiz END bug
« on: 2009-Jul-15 »
If you write a simple program for your wiz (firmware 1.1.0) like this...

Code: (glbasic) [Select]
END

... and you run it more than one times, second time (without turning off your Wiz in the meantime) exiting the program again
will freeze your system and your only option is to turn off the Wiz !   
:help:

EDIT:
Other non glbasic games haven't this problem

12
I have battery charged but this code still drawing 0 on the screen (firmware 1.1.0) :S

Code: (glbasic) [Select]
WHILE TRUE
     PRINT PLATFORMINFO$("BATTERY"), 5, 5
     SHOWCREEN
WEND

13
IDE/Syntax / New glbasic icon ?
« on: 2009-Jul-11 »
Very fool argument =D

GLbasic need a new icon with more res.



14
Userlibs [ *.gbal] / gbal conversion hint
« on: 2009-Jul-06 »
Quote
Please, if a library can be released as GBAS, do so then, GBAL relies on the fact that the user can never alter it, that is, to add to its features, correct mistakes... so if the GBAL author is not available then the end user is screwed...

A gbal file is a normal gbas file with some garbage.
It can be rewritten:

0) Open the gbal file.
1) Take all cleary parts.
2) Add the gbal to a new glbasic blank project and compile it.
3) Open YourDrive:\Documents and Settings\YourName\Local Settings\glbasic\
WARNING: in v7 the gbal files are hidden and they get deleted after been compiled
4) Find the c++ conversion of the gbal
5) Now you have enough code to translate the gbal

Example
with ALWAYSONTOP(TRUE) (by unknown)

Take the cleary parts of the gbal
Code: (glbasic) [Select]
INLINE
}
  extern "C" int __stdcall SetWindowPos(void*,d);
namespace __GLBASIC__
{
ENDIN
FUNCTION ALWAYSONTOP: VALUE
//implemented pos and size for resolutions ;) -Hemlos
IF =FALSE THEN RETURN
LOCAL sx,sy,WinA
Y,InsertAfter Flagh
=-1; =18
GETSCREENSIZE //detect , YOU MUST HAV HWND()
0,0,sx+6,sy+33 d1D;
ENDFUNCTION
This is a bit useless.

Take the c++ conversion. (YourDrive:\Documents and Settings\YourName\Local Settings\glbasic\)
Code: (glbasic) [Select]
#include "gpc_temp.h"
namespace __GLBASIC__{

/* ---- INLINE ---- */
}
  extern "C" int __stdcall SetWindowPos(void*, int, int, int, int, int, int);
namespace __GLBASIC__
{

/* ---- ENDINLINE ---- */
// ------------------------ //
DGInt ALWAYSONTOP(DGInt VALUE)
{
   __PPRegisterFunction
//implemented pos and size for all resolutions ;) -Hemlos.
if (VALUE==FALSE )
return 0; // RETURN f. SUB
REGISTER_VAR_DEF(DGInt, sx, 0);
REGISTER_VAR_DEF(DGInt, sy, 0);
REGISTER_VAR_DEF(DGInt, WinPosX, 0);
REGISTER_VAR_DEF(DGInt, WinPosY, 0);
REGISTER_VAR_DEF(DGInt, InsertAfter, 0);
REGISTER_VAR_DEF(DGInt, InsertFlag, 0);
InsertAfter=-1;
InsertFlag=18;
GETSCREENSIZE( sx,sy);
//detect window size, YOU MUST HAVE THIS!.

/* ---- INLINE ---- */
SetWindowPos(GLBASIC_HWND(),InsertAfter,0,0,sx+6,sy+33,InsertFlag);

/* ---- ENDINLINE ---- */
return 0;
}
} // namespace

This is useful.

Let's translate to GLBasic
Code: (glbasic) [Select]
INLINE
}
  extern "C" int __stdcall SetWindowPos(void*, int, int, int, int, int, int);
namespace __GLBASIC__
{
ENDINLINE

FUNCTION ALWAYSONTOP: VALUE
//implemented pos and size for all resolutions ;) -Hemlos.
IF VALUE==FALSE THEN RETURN
LOCAL sx,sy,WinPosX,WinPosY,InsertAfter,InsertFlag
InsertAfter=-1
InsertFlag=18
GETSCREENSIZE sx,sy
//detect window size, YOU MUST HAVE THIS!.
INLINE
SetWindowPos(GLBASIC_HWND(),InsertAfter,0,0,sx+6,sy+33,InsertFlag);
ENDINLINE
ENDFUNCTION

15
IDE/Syntax / Extend header files
« on: 2009-Jul-05 »
In the header files you can't assign variables out of a function or a sub.
But may be useful if you can declare global variables (like costants).

main.gbas
Code: (glbasic) [Select]
PRINT VERSION$, 100, 100
SHOWSCREEN
MOUSEWAIT

include1.gbas
Code: (glbasic) [Select]
GLOBAL VERSION$ = "1.000" //error : command not inside function or sub

Pages: [1] 2