BASIC

Recent Posts

Pages: [1] 2 3 ... 10
1
GLBasic - en / Re: GLBasic line continuation?
« Last post by adaz on Today at 06:14 pm »
Yes, "_" does work in GLBasic too.

It doesn't work for me :( IDE 15.089
2
GLBasic - de / Re: Laufwerke
« Last post by Worebu on Yesterday at 07:17 pm »
Danke  =D, das funzt, Jedenfalls auf dem Handy. Mal sehen was mein Tab dazu sagt . Schönes WE noch.  :booze:
3
GLBasic - de / Re: Laufwerke
« Last post by D2O on Yesterday at 03:56 pm »
Hallo,

versuche mal das hier, (Code ist aus der Hilfe, etwas abgewandelt)

Code: GLBasic [Select]
WHILE TRUE

       
y = 0  
       
       
 ok = SETCURRENTDIR("/") //
 cur$ = GETCURRENTDIR$()
 num = GETFILELIST("*.*", files$[])
 num_dir  = INTEGER(num / 0x10000) // Hi-Word
 num_file = MOD(num, 0x10000)      // Lo-Word
 
 FOR i=0 TO BOUNDS(files$[], 0)-1 // BOUNDS(files$[], 0)-1 = num = num_dir+num_file
  PRINT files$[i], 0,y
                                y = y+20
 NEXT
       
       


        SHOWSCREEN
        MOUSEWAIT
       
        y = 0
       
 ok = SETCURRENTDIR("/sdcard") //
 cur$ = GETCURRENTDIR$()
 num = GETFILELIST("*.*", files$[])
 num_dir  = INTEGER(num / 0x10000) // Hi-Word
 num_file = MOD(num, 0x10000)      // Lo-Word
 
 FOR i=0 TO BOUNDS(files$[], 0)-1 // BOUNDS(files$[], 0)-1 = num = num_dir+num_file
  PRINT files$[i], 0,y
                                y = y+20
 NEXT
 
        SHOWSCREEN
        MOUSEWAIT
       
WEND

zuerst wird das Stammverzeichnis ausgelesen,
dann mach Touch berührung der enthaltene ordner "/sdcard".
vorausgesetzt sdcard gibt es ;)
Das siehst Du aber schon beim ersten auslesen.
4
GLBasic - de / Re: Laufwerke
« Last post by Schranz0r on Yesterday at 12:14 pm »
Da hast du an sich ja keine Laufwerke.
Wie man allerdings Zugriff von SD auf Internen Speicher und andersrum bekommt... keinen Plan.
 
5
GLBasic - de / Re: Laufwerke
« Last post by Worebu on Yesterday at 12:26 am »
Moin, ich hab da noch eine Frage. Werden unter Android die Laufwerke anders angesprochen wie unter Windows?
Ich bekomme nämlich nichts angezeigt.  :'(
6
Bug Reports / Re: SHOEBOX does not work on ANDROID
« Last post by spacefractal on 2018-Feb-22 »
that due glbasic try to copy all files from that subfolder to internal memory from APK.

glbasic calls copyAsset() in sldActivity.java for each file you access. But if folder does not exists, its might crash instead. CREATEDIR() make sure its exits, before glbasic calling copyAsset(). Its can been required for some issues.

If you do a DOESDIREXISTS(), its also calls recursiveCopy() in java instead. Howover recursiveCopy can take too long time for the app, and can crash. Mostly if its many many MB.

This is why shoebox is simply not recommend to been used on Android at all! Im sorry.

you should dropping them, and instead uses subfolders for each level instead (using the same name you used from shoebox). That is much much more effective for memory wise, and you would have much more direct access to them.

Due this im will not fix shoebox issue on Android, since its ineffective anyway (sorry Gernot, but if you can fix it, then it ok).

7
Bug Reports / Re: SHOEBOX does not work on ANDROID
« Last post by adaz on 2018-Feb-22 »
Hi spacefractal,
I don't understand one thing: it's OK to check if the folders are exist or not, but if not, why should I create them? My level files won't be accessible from a just created folder... And if the folder exists (with the files in it), I don't have to create it.
8
If you haven't set the headers at all, they can change because of webserver updates changing the default compression/encoding.
9
Code Snippets / Re: DRAWRECT using POLYVECTOR from a Image
« Last post by MrPlow on 2018-Feb-20 »
Here are my DRAWRECT replacements, is there an ideal way to to DRAWLINE using Polyvector?
I assume DRAWLINE is also broken on Android??


Code: GLBasic [Select]

FUNCTION NewStar: x#,y#,w,h,col
        // polyvector way of doing it:
       STARTPOLY -1
        POLYVECTOR x+(w/2), y, 0,0,col
        POLYVECTOR x, y+(h/2), 0,0,col
        POLYVECTOR x+(w/2), y+h, 0,0,col
        POLYVECTOR x+w, y+(h/2), 0,0,col
                ENDPOLY

ENDFUNCTION

FUNCTION NewRect: x#,y#,w,h,col
        // polyvector way of doing it:
       STARTPOLY -1
        POLYVECTOR x, y, 0,0,col
        POLYVECTOR x, y+h, 0,0,col
        POLYVECTOR x+w, y+h, 0,0,col
        POLYVECTOR x+w, y, 0,0,col
                ENDPOLY


ENDFUNCTION
 
10
Bug Reports / Re: SHOEBOX does not work on ANDROID
« Last post by spacefractal on 2018-Feb-20 »
so yes, its mightbeen a bug. but im will not fix it. sorry. Its a bigger issue here. Its just one of the strangers on Android.

But again, you should property use folders for each shoebox and do file access directly from those, if you used same filename for tiles etc.
Pages: [1] 2 3 ... 10