Recent posts

#1
GLBasic - en / Re: HTML5 improvements
Last post by Paul Smith - Today at 17:59
Thanks dreamerman, I did search the forum and only found info from the 3rd part topic. I'm sure this forum plays tricks on me. :D  I'll read the treads and hopefully come up with a solution.
#2
GLBasic - en / Re: HTML5 improvements
Last post by dreamerman - Today at 17:36
As fast answer I can tell you that there are few examples how to use SDL2 code in GLB, you can check those posts:
https://www.glbasic.com/forum/index.php?topic=11401.msg100530#msg100530
https://www.glbasic.com/forum/index.php?topic=11313.msg100666#msg100666
look for attached files, by my self I'm using SDL2 code directly from Inline, don't know if that would work for HTML5, maybe that Import function will be needed.
#3
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.

 



 
#4
Announcements / Re: ALIEN TEXT EDITOR
Last post by MrPlow - 2024-Oct-08
Thanks for the feedback - still working on it and
will post soon :)
#5
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
#6
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.


#7
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
#8
GLBasic - en / Re: HTML5 improvements
Last post by Qedo - 2024-Oct-05
for me impassable road nothing works.  Thanks anyway
#9
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
#10
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."