Menu

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.

Show posts Menu

Messages - Qedo

#361
Hi
attached my work ( thanks to the community of GLBasic) about resize font.
If interesting i will send source and istruction.
Ciao
Qedo

http://web.tiscali.it/edoardobianchi/STUFF/font/Animation_Font.app.zip
#362
Great.
I'd try to understand the code
When the next beta release?
Thank you
Ciao
#363
this simple program work correctly in GlBasic 10.283 and creates a sprite hole, while don't work in Glbasic 11.414  (see the picture)
Any idea?
Ciao


id% = GENSPRITE()
// Create virtual screen
CREATESCREEN 1,id%,32,32

USESCREEN 1
DRAWRECT 0,0,31,31,RGB(255,255,255) // white background os the sprite
DRAWRECT 4,4,24,24,RGB(255,0,128)  // transparent hole in the sprite

USESCREEN -1
DRAWRECT 100,100,70,70,RGB(255,0,0)  // draw the red background

DRAWSPRITE id%,120,120  // draw the sprite

SHOWSCREEN
MOUSEWAIT
#364
Hi kanonet,
on my computer CPUs Intel i7-2630QM GPU 540M in both cases with qSIN(i) the times are the same: 440ms +/-10.
There is no true difference.
ciao
qedo
#365
Hi kanonet,
on my computer in both cases the times are the same: 80ms
ciao
qedo
#366

@kanonet
Code (glbasic) Select

How did you do your calculations, starting with Gernots one again, or just adding to our last version?

I started by Gernot  and your code and in detail i have substituted the original numeric value in this way:
// 65535 = (2^16)-1
// 182.04166666666666666666666666667 = 65535/360
// 0.00012206791406720535999456453271949 =   0.02222144652331750907567718514381/182.04166666666666666666666666667
// 0.000000003725515635463640657766991220193 = 0.00012346049003081125437778164739108/(182.04166666666666666666666666667^2)

And instead How did you do your calculations?
As you have deleted a multiplication?
Good
Ciao



#367
My version QQSIN2.
Perhaps not the most precise but faster, almost 50%.
I enclose an application of.
Ciao

FUNCTION QQSIN2: x  // by Qedo
LOCAL xx%
xx=x* 182.04166666666666666666666666667
xx=bAND(xx , 65535)
   IF xx < 32767
      x = ( 0.00012206791406720535999456453271949 - 0.0000000037255156354636406577669912201935 * xx)* xx
      RETURN ( 0.775 + 0.225 * x ) * x
   ENDIF
   xx= 32767 - xx
   x = ( 0.00012206791406720535999456453271949 + 0.0000000037255156354636406577669912201935 * xx) * xx
   RETURN ( 0.775 - 0.225 * x ) * x
ENDFUNCTION

[attachment deleted by admin]
#368
Hi,
I'm writing a program for runners on Android. Someone's how to use GPS module?
Thank you
Ciao
#369
Insert the  attached box2d files in the pogram's folder
Ciao


[attachment deleted by admin]
#370
I attach an example with sprites that I hope will be useful
Ciao

[attachment deleted by admin]
#371
Thank you for your helps.
Here the 2 methods, static and dymanic array, and benchmark


      INLINE
         int height4d_C = array4dLen_C; //27
         int depth4d_C = array4dLen_C * array4dLen_C; //729
         int time4d_C = array4dLen_C * array4dLen_C * array4dLen_C; //19683
         const int array4dLen_C=27;
         const int array1dLen_C=array4dLen_C * array4dLen_C * array4dLen_C * array4dLen_C;
         
         // Fill STATIC STACK 1d array simulating 4d         
         static int array1d_C[array1dLen_C];
         for (tc = 0; tc < array4dLen_C; tc++)
            for (zc = 0; zc < array4dLen_C; zc++)
               for (yc = 0; yc < array4dLen_C; yc++)
                  for (xc = 0; xc < array4dLen_C; xc++)
                     array1d_C[xc + yc * height4d_C + zc * depth4d_C + tc * time4d_C] = i;

         // Fill DYNAMIC HEAP 1d array simulating 4d
         int *array4dd_C;
         array4dd_C = new int[array4dLen_C * array4dLen_C * array4dLen_C * array4dLen_C];
         for (tc = 0; tc < array4dLen_C; tc++)
            for (zc = 0; zc < array4dLen_C; zc++)
               for (yc = 0; yc < array4dLen_C; yc++)
                  for (xc = 0; xc < array4dLen_C; xc++)
                     array4dd_C[xc + yc * height4d_C + zc * depth4d_C + tc * time4d_C] = i;
         delete[] array4dd_C;
      ENDINLINE
      
Time comparation for 531441 int array
STATIC STACK ARRAY= 0,6 seconds
DYNAMIC HEAP ARRAY= 1,8 seconds

Ciao
#372
Thank you hardyx
now work!!!  =D
Ciao

      INLINE
         int tc, zc, yc;
         const int array3dLen_C=81;
         static int array3d_C[array3dLen_C][array3dLen_C][array3dLen_C];
         for (tc = 0; tc < array3dLen_C; tc++)
            for (zc = 0; zc < array3dLen_C; zc++)
               for (yc = 0; yc < array3dLen_C; yc++)
                   array3d_C[yc][zc][tc] = i;
      ENDINLINE
#373
GLBasic - en / array index
2012-Feb-12
hello all.
where is the mistake?
with  array3dLen_C = 80 all OK. With upper indices there is the error:
EXCEPTION_STACK_OVERFLOW.

ciao

INLINE
      int tc, zc, yc;
      int array3dLen_C=80;
      int array3d_C[array3dLen_C][array3dLen_C][array3dLen_C];
      for (tc = 0; tc < array3dLen_C; tc++)
         for (zc = 0; zc < array3dLen_C; zc++)
            for (yc = 0; yc < array3dLen_C; yc++)
                array3d_C[yc][zc][tc] = i;
ENDINLINE
#374
Try:

CONSTANT MaxDims=3
TYPE Point
     Loc[]
ENDTYPE
LOCAL P1 AS Point
REDIM P1.Loc[MaxDims]
FOR i = 0 TO MaxDims-1
      IF P1.Loc=0 THEN P1.Loc=10
NEXT

Ciao
#375
It may seem obvious but it is true. Many thanks for informations and availability
Ciao