Recent Posts

Pages: [1] 2 3 ... 10
1
Code Snippets / Re: Load data from memory
« Last post by bigsofty on Today at 08:35 PM »
Interesting, thanks Gernot  :good:
2
GLBasic - en / Re: Android Build Issues
« Last post by MrPlow on Today at 03:38 PM »
SF,

I know your busy but some file issues on android builds i need to fix...

Can you advise where to put Android.xcl file to prevent overrites?

Also is just deleting jni folder required before a rebuild with newer files?
Or do i need to remove another folder too?

Thks
3
Code Snippets / Re: Load data from memory
« Last post by Qedo on Today at 09:59 AM »
Thanks Gernot for this very very interesting secret.  :good:
I will try to apply it to my custom shoebox where I save and reload some files.
4
Code Snippets / Load data from memory
« Last post by Kitty Hello on Yesterday at 07:37 AM »
I tell you a secret. GLBasic can load data from a memory buffer, as if it was a file. With the attached code, you can use the contents of a string to "read" it as a file. This should work for about everything. Sprites, sounds, binary files, ...

Code: (glbasic) [Select]



LOCAL mem$ = "Hello World"
LOCAL memlen = LEN(mem$)

LOCAL file$ = MemMakeFile$(mem$)

LOCAL text$
OPENFILE(1, file$, TRUE)
READSTR 1, text$, 64
CLOSEFILE 1
STDOUT text$ + "\n"
KEYWAIT

FUNCTION foo:
ENDFUNCTION

INLINE
extern "C" {int sprintf(char *str, const char *format, ...); }
ENDINLINE


FUNCTION MemMakeFile$: BYREF data$, nofBytes = -1
IF nofBytes < 0 THEN nofBytes = LEN(data$)
LOCAL url$
LOCAL hx$ = RIGHT$("0000000000000000" + HEX$(nofBytes), 8)
INLINE
void* address = &data_Str[0];
char buffer[64];
sprintf(buffer, "%x", address);

url_Str = CGStr("mem://") + hx_Str + CGStr(".") + CGStr(buffer);
ENDINLINE


RETURN url$
ENDFUNCTION
5
GLBasic - en / Re: Android Build Issues
« Last post by MrPlow on 2021-Oct-06 »
Thanks SF,
In terms of the src file changes that affect the Android builds - are the android templates src files version controlled so that older files or rollbacks can be obtained if required?

Can advance notice be made on the updates so I dont suddenly build any broken versions :)

I do normally test the apps - but things like controller setups etc. wouldnt be tested each time.
6
GLBasic - de / Re: Fehlermeldung bei DIM
« Last post by Worebu on 2021-Oct-01 »
ah, ok.Danke
7
GLBasic - en / Re: Access to Buffer Data ?
« Last post by Schranz0r on 2021-Sep-30 »
I ordered a Strato HiDrive account and will set up a Git repository. So we can use Git to act together. But, I failed to clone it. Maybe my work-configuration messes with the private account... I'll have to see.

Oh nice, hopefully you get it running.
Let us know :)
8
GLBasic - en / Re: Access to Buffer Data ?
« Last post by Kitty Hello on 2021-Sep-30 »
I ordered a Strato HiDrive account and will set up a Git repository. So we can use Git to act together. But, I failed to clone it. Maybe my work-configuration messes with the private account... I'll have to see.
9
GLBasic - en / Re: Access to Buffer Data ?
« Last post by Schranz0r on 2021-Sep-30 »
There is a way to link it static.
No clue how, maybe we can just use the source?
Sure, why not use it as default :)

SoLoud C-API:

Quote
Using the "C" API
The glue file soloud_c.cpp can be found under the "src/c_api" directory.

You can either link to the generated DLL, which exposes the "C" API, or you can include SoLoud C++ sources (or static library) to your project along with the soloud_c.cpp file.

In your C sources, include soloud_c.h header file.
10
GLBasic - en / Re: Access to Buffer Data ?
« Last post by Kitty Hello on 2021-Sep-30 »
Is it? Maybe we should include it as the default sound engine, then?
Pages: [1] 2 3 ... 10