Recent posts

#1
GLBasic - en / Re: HTML5 improvements
Last post by Paul Smith - Today at 11:46
I assume GLBASIC uses the SDL2 library when compiling to HTML5.

I've been messing with music formats in browsers and it looks like firefox is the least compatible, anyways I was trying to understand if using the SDL2 mixer to play MOD/S3m would work better.

As I know very little about C/C++ importing into GLBasic, I was hoping someone could give me any pointers.

I can see GLBasic adds the path to the .h files location for HTML.
would it be used like
INLINE
#include "SDL.h"
#include "SDL_mixer.h"
ENDINLINE

or would it be import / require.

#require "SDL.h"
#require "SDL_mixer.h"

IMPORT "C" int SDL_Init(int flags)
IMPORT "C" void SDL_Quit()
IMPORT "C" int Mix_OpenAudio(int frequency, unsigned short format, int channels, int chunksize)
IMPORT "C" void Mix_CloseAudio()
IMPORT "C" void Mix_FreeMusic(void* music)
IMPORT "C" void* Mix_LoadMUS(const char* file)
IMPORT "C" int Mix_PlayMusic(void* music, int loops)

If anyone can help, I would be grateful.

 



 
#2
Announcements / Re: ALIEN TEXT EDITOR
Last post by MrPlow - 2024-Oct-08
Thanks for the feedback - still working on it and
will post soon :)
#3
Announcements / Re: ALIEN TEXT EDITOR
Last post by erico - 2024-Oct-07
Add some wireframe and it can do Escape from NY and show some Nostromus layouts :)
Green and dark green are common text editor colors on the trs80-color, even on a color TV :D

PS: the reply here is set to a very short time, I'm getting time out claims when posting...it must be those genuine girls in my location :D :D :D
#4
Announcements / Re: Happy Birthday, GLBasic!
Last post by erico - 2024-Oct-07
What? The party never ended, it is going strong than ever!
Here I have been doing a design for a Vector drawing program, very simple one, hoping to get this to "save" as 8bit basic code to run on the likes of TRS80 color and MSX. Those basics have the DRAW command, so in sum, I wanna make a "frontend" for that :)
PS:forum icons are still acting weird.


#5
GLBasic - en / Re: HTML5 improvements
Last post by Qedo - 2024-Oct-05
for my app (server-client) I will change (sigh) to Js and node.js

I have a hope, I will try the latest updates  of html5 from git
#6
GLBasic - en / Re: HTML5 improvements
Last post by Qedo - 2024-Oct-05
for me impassable road nothing works.  Thanks anyway
#7
GLBasic - en / Re: HTML5 improvements
Last post by Paul Smith - 2024-Oct-05
I can't seem to use strings. This won't compile 
}, url$);  or {, url_Str);
The version I was supposed to show was  }); that just opens a new tab. It does compile but just a blank page.

This code does work and will open the correct page, strange thing is the // shows as comments after the https: but compiles fine.

INLINE
        EM_ASM({
       window.open('https://www.glbasic.com', '_blank');
    });
   ENDINLINE

Hope this helps
#8
GLBasic - en / Re: HTML5 improvements
Last post by Qedo - 2024-Oct-05
Paul, but can you compile these 2 examples in html5?
stop compiling because;

"fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated."
#9
GLBasic - en / Re: HTML5 improvements
Last post by Kitty Hello - 2024-Oct-02
it's url_Str. The $ is replaced by _Str in C++.
#10
Announcements / ALIEN TEXT EDITOR
Last post by MrPlow - 2024-Oct-01
Hi
I am trying to create a retro ALIEN style MOTHER text editor...
I plan to add others to it...
War Games and others...

Just for fun for now :)

Currently my editor mode is a mainly char replace - and fills a page with spaces so that it allows user to place text anywhere without a new to tab or space to the cell location.

Just trying to think of good uses - I think a level designer and film script editor might work well in this way...
??!

Once I have a half-demo I will upload...