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.


Messages - François Vanzeveren

Pages: [1] 2 3
1
GLBasic - en / GWC Zero
« on: 2016-Mar-12 »
Hello

I am wondering whether it is possible to use GLBasic to build a game for the open console GWC Zero?

Possibly via the Linux plateform support?

Regards

François

2
THanks to okee and MrTAToad...

By the way, what do you think about the code structure put in place in my project? Do you have suggestions to improve the structure? I tried by a complete code refactoring of SimOniZ to reach a kind of game "template" easily maintainable and reusable for other projects.

Thanks!

3
I think it would be worth giving all your GFX variables a unique number
I'd say that would solve your problem.
P.S the semi colon ?  is that a habit from pascal programming ?
didn't even know GLB could take them :)

The semi-colon, an old habit of the C time :)

4
GOOD! You are right!

Code: GLBasic [Select]
GLOBAL b = 3;

SUB test2:
b = 2 ;
PRINT a, 250, 300 ;
ENDSUB
 

In the main file, b equals 2

Weird!!!!

5
Quote
Defined in the main file globals are accessible anywhere, but defined in a source file they can only be accessed in that file.
I just did a test but I'm using GLB v 8.0 and a global declared in an included file is available to the main file.
So I think if you declare a global in any file it's global across all
but if you declare as local (outside a function or sub) it's just available withing that file

I made the test

Main file:
Code: GLBasic [Select]
GLOBAL a;

a = 1;

GOSUB test2 ;

PRINT a, 100, 100;

PRINT b, 200, 100;

SHOWSCREEN;

MOUSEWAIT;
 

Source file test2.gbas
Code: GLBasic [Select]
GLOBAL b;

SUB test2:
b = 2 ;
ENDSUB
 

Code: GLBasic [Select]

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.6.973 SN:126b5585 - 3D, NET
"test.gbas"(17) error : variable is not explicitly defined : b

 

I conclude that b is "global" only within test2.gbas...

6
Defining
Code: GLBasic [Select]
 LOCAL GFX_FONT15%      = 1 ;

returns

Code: GLBasic [Select]

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.6.973 SN:126b5585 - 3D, NET
"credits.gbas"(17) error : command not inside function or sub
 

I use GLB 8 too

If I write
Code: GLBasic [Select]
// grafix components
GLOBAL GFX_BACK%        = 1 ;   // Bouton "Back"
GLOBAL GFX_FONT15%      = 0 ;
 

Then it is the green button that shows the bug, not the yello  :S

7
Hi,

Defined in the main file globals are accessible anywhere, but defined in a source file they can only be accessed in that file.

Furthermore, everytime I call the main routine of a source file, I loadanim the grafix components, overriding the previous anim with the same id.

Finally, why  does the green button (GFX_GREEN% = 0) not show the same bug?

8
How did you load the second demo? You should use "File > Project > Open"

9
GLBasic - en / Graphic bug I can't understand!
« on: 2010-Jul-28 »
Dear all,

I need your help to explain me the bug I found.

The attached file is the source of the game I wrote "SimOniZ".
THe attached version has no problem... after I discovered a workaround for the bug.

In the source files, I declares global constants for the sprite ids of the grafix components.
e.g. in the play.gbas file
Code: GLBasic [Select]
// grafix components
GLOBAL GFX_GREEN%       = 0 ;  // Green button
GLOBAL GFX_YELLOW%      = 1 ;
GLOBAL GFX_BLUE%        = 2 ;
GLOBAL GFX_RED% = 3 ;
GLOBAL GFX_PAUSE%       = 4 ; // Pause button
GLOBAL GFX_STATUS%      = 5 ;
GLOBAL GFX_FONT15%      = 100 ;
 

To reproduce the bug, open the project and edit the credits.gbas file
Code: GLBasic [Select]
//-----------------------------------------------------------------------------
// C O N S T A N T S
//-----------------------------------------------------------------------------

// menu states
GLOBAL MS_NONE%         = 0;
GLOBAL MS_BACK%         = 1 ;

// grafix components
GLOBAL GFX_BACK%        = 0 ;   // Bouton "Back"
GLOBAL GFX_FONT15%      = 100 ;

Replace the line
Code: GLBasic [Select]
 GLOBAL GFX_FONT15%     = 100 ;
by
Code: GLBasic [Select]
 GLOBAL GFX_FONT15%     = 1 ;

This change generates the following problem:
* in the play screen, the yellow button is not displayed
* in the pause screen, the abort button is not displayed

Doing the same change in the highscores.gbas does not cause the bug!

I am completely lost.

Thanks for the time you will spent to explain me what is going wrong!

François

[attachment deleted by admin]

10
I was incorrect about GLOBALS : Defined in the main file and they are accessible anywhere, but defined a source file and they can only be accessed in that file.

I'll try it. That would be great to make code cleaner and easier to read!

Thank you!

11
Hello,

Is it possible to define variables local to a source file, i.e. only accessible by functions defined in the same source file?

Thank you.

François

12
Hello all,

the issue regarding the update is solved. When I run GLBasic as administrator, GLBasic update works.

I am now running version 8.036

But the compilation for GP2X-WIZ still fails because g++.exe crashes.

Compilation for GP2X F100/F200 and win32 works fine
Code: GLBasic [Select]

_______________________________________
*** Configuration: GP2X ***
precompiling:
GPC - GLBasic Precompiler V.6.973 SN:126b5585 - 2D, WIN32
Wordcount:0 commands
compile+link:
Q:\Compiler\platform\GP2X\Lib\libGLBasicGP2X.a(gf_sockets.o): In function `netGetLocalIPs(int*, char const*)':
gf_sockets.cpp:(.text+0xaa4): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Q:\Compiler\platform\GP2X\Lib\libGLBasicGP2X.a(gf_sockets.o): In function `netAddress(char const*, unsigned short)':
gf_sockets.cpp:(.text+0xd1c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
success
Adding mmuhack.o to project: C:\Users\fvanzeveren\Documents\GLBasic\test\test.app
_______________________________________

_______________________________________
*** Configuration: GP2X-WIZ ***
precompiling:
GPC - GLBasic Precompiler V.6.973 SN:126b5585 - 2D, WIN32
Wordcount:0 commands
compile+link:
     17 [main] g++ 3392 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
7911582 [main] g++ 3392 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
14128210 [main] g++ 3392 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
22196366 [main] g++ 3392 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
g++: fork: Resource temporarily unavailable
*** FATAL ERROR - Please post this output in the forum
_______________________________________

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.6.973 SN:126b5585 - 2D, WIN32
Wordcount:0 commands
compiling:

linking:
success
_______________________________________
*** Finished ***
Elapsed: 51.0 sec. Time: 11:59
Build: 2 succeeded.
*** 1 FAILED ***
 

QUESTION: is it normal that when compiling, GLBasic create a new local hard drive (Q:)? When double clicking on the hard drive Q: icon, it opens the installation directory of GLBasic.

Here is what I found in the system events viewers
Code: GLBasic [Select]
Nom de l’application défaillante g++.exe, version : 0.0.0.0, horodatage : 0x48545258
Nom du module défaillant : cygwin1.dll, version : 1005.25.0.0, horodatage : 0x48515e73
Code d’exception : 0xc0000005
Décalage d’erreur : 0x00016265
ID du processus défaillant : 0x15d8
Heure de début de l’application défaillante : 0x01cb28bb5bde4c2b
Chemin d’accès de l’application défaillante : Q:\Compiler\platform\WIZ\Bin\g++.exe
Chemin d’accès du module défaillant: Q:\Compiler\platform\WIZ\Bin\cygwin1.dll
ID de rapport : 9996bded-94ae-11df-a51b-506313fd0a76
 

Regards

François

13
Hello, I found nothing special in the System Viewer. But maybe i missed it. Is there anything special I should be looking for?

With regard to the fresh installation, I already did it numerous times without success.

Finally, the only other developpement tool I have is Runtime Revolution.

I have Windows 7 64bits Home Edition in French and I install GLBasic in English.

I am getting mad! :rant:

BTW: thank you for the time spent to help me  :good:

14
I installed version 8.006 and got the same issue as described in the first post.

Also, on my Windows 7 64bits, when I asked to update GLBasic, it detects a new version. When I confirm to do the update, GLBasic just quits and the GLBAsic Update Manager Window never opens. It is therefore impossible for me to update to the lastest version. And this problem occured with GLBasic 7 and 8.

Regards

François

15
Hello

I am running GLBasic under Windows 7 64bits Home Edition. When trying to compile a game for GP2X-WIZ, g++.exe crashes and I get a dialog box warning me that g++.exe has stopped working.

When I run GLBasic under a virtualized windows XP on the same machine, everything works fine.

Regards

Here is the output
Code: GLBasic [Select]
_______________________________________
*** Configuration: GP2X-WIZ ***
precompiling:
GPC - GLBasic Precompiler V.6.922 SN:126b5585 - 3D, NET
Wordcount:678 commands
compile+link:
     34 [main] g++ 4884 child_info::sync: wait failed, pid 3900, Win32 error 1812
   2290 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 10, exit code 0x1000000, errno 11
     30 [main] ? (-6364) Q:\Compiler\platform\WIZ\Bin\g++.exe: *** fatal error - cygheap base mismatch detected - 0x15C88E0/0x16588E0.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
37581188 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
50328506 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
     30 [main] ? (6420) Q:\Compiler\platform\WIZ\Bin\g++.exe: *** fatal error - cygheap base mismatch detected - 0x15C88E0/0x14F88E0.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
74842880 [main] g++ 4884 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0xC0000005, errno 11
g++: fork: Resource temporarily unavailable
*** FATAL ERROR - Please post this output in the forum
_______________________________________
 

Pages: [1] 2 3