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.


Topics - Neurox

Pages: [1] 2
1
GLBasic - en / Problem with scroll image
« on: 2012-May-21 »
I've problem with scroll image on iPhone   :rant:
On windows the program run very well.
I'm crazy out, If I touch the image without draging, image not scrolling but change position.

The image "mappa2.png" is here http://www.borzini.it/mappa2.png

Code: (glbasic) [Select]
// --------------------------------- //
// Project: TestScroll
// Start: Friday, May 18, 2012
// IDE Version: 10.283

TYPE TIPOMAPPA
   mmx
   mmy
   mmaxx
   mmaxy
ENDTYPE

SETCURRENTDIR("Media") // go to media files

GLOBAL Mappa AS TIPOMAPPA
GLOBAL GNoldx, GNoffx
GLOBAL GNoldy, GNoffy
GLOBAL GAmappa%[],GAmappa2%[]
GLOBAL mx,my,b1,b2
LOCAL LBciclo


DIM GAmappa[0]
DIM GAmappa2[320*480]

LBciclo = TRUE

SYSTEMPOINTER TRUE

CaricaMappa("mappa2.png",1024,1024)
AggiornaMappa(100,100,TRUE)

LOCAL LNi

WHILE LBciclo
   DisegnaMappa()
   SHOWSCREEN
   SETACTIVEMOUSE 0
      GNoldy = my
  GNoldx = mx
   MOUSESTATE mx,my,b1,b2
   IF b1 = TRUE
      ControllaOffset(mx,my)
      GNoldy = my
  GNoldx = mx
      AggiornaMappa(GNoffx,GNoffy)
   ELSE
      GNoldy = my
  GNoldx = mx
  GNoffx = 0
  GNoffy = 0
   ENDIF
WEND

FUNCTION ControllaOffset: FNx, FNy
IF FNx > GNoldx
GNoffx = FNx - GNoldx
ELSE
GNoffx = -1*(GNoldx - FNx)
ENDIF

IF FNy > GNoldy
GNoffy = FNy - GNoldy
ELSE
GNoffy = -1*(GNoldy - FNy)
ENDIF
ENDFUNCTION

FUNCTION DisegnaMappa:
   DRAWSPRITE 100,0,0
   PRINT "X:"+mx+" d:"+GNoldx+" f:"+GNoffx,0,0
   PRINT "Y:"+my+" d:"+GNoldy+" f:"+GNoffy,160,0
   PRINT "MappaX:"+ Mappa.mmx +" MappaY:"+ Mappa.mmy ,0,20   
ENDFUNCTION

FUNCTION AggiornaMappa: FNx,FNy,FNforce = FALSE
LOCAL LNi,LNii,LNx,LNy,LNoffx,LNoffy
LOCAL LNspr%,LNw,LNh
IF ABS(FNx) < 2 AND ABS(FNy) < 2 AND FNforce = FALSE
ELSE
   IF FNx > 0
      INC Mappa.mmx, FNx
      IF Mappa.mmx > 1023 THEN Mappa.mmx = 1023
   ELSE
      IF FNx < 0
         DEC Mappa.mmx, ABS(FNx)
         IF Mappa.mmx < 0 THEN Mappa.mmx = 0
      ENDIF
   ENDIF

   IF FNy > 0
      INC Mappa.mmy, FNy
      IF Mappa.mmy > 1023 THEN Mappa.mmy = 1023
   ELSE
      IF FNy < 0
         DEC Mappa.mmy, ABS(FNy)
         IF Mappa.mmy < 0 THEN Mappa.mmy = 0
      ENDIF
   ENDIF

   IF Mappa.mmx > 703 THEN Mappa.mmx = 703 //1023 - 320
   IF Mappa.mmy > 543 THEN Mappa.mmy = 543 //1023 - 480
   IF Mappa.mmx < 0 THEN Mappa.mmx = 0
   IF Mappa.mmy < 0 THEN Mappa.mmy = 0


   //
   LNoffx = Mappa.mmx
   LNoffy = Mappa.mmy

   LNi = 0
   FOR LNy = LNoffy TO (LNoffy + 479)
      FOR LNx = LNoffx TO (LNoffx + 319)
         GAmappa2[LNi] = GAmappa[LNx+LNy*1024] //copio la parte della mappa
         INC LNi,1
      NEXT
   NEXT

   
   LNspr=100; LNw=320; LNh = 480
   IF MEM2SPRITE(GAmappa2[],LNspr,LNw,LNh) = TRUE
   ELSE
      DEBUG "errore aggiorna mappa"
   ENDIF
ENDIF

ENDFUNCTION

FUNCTION CaricaMappa: FSmappa$,FNx%,FNy%
   IF LOADSPRITEMEM(FSmappa$,FNx,FNy,GAmappa[]) = TRUE
      Mappa.mmx = 0
      Mappa.mmy = 0
      Mappa.mmaxx = FNx
      Mappa.mmaxy = FNy
   ELSE
      DEBUG "errore carica mappa"
      //Errore
   ENDIF
ENDFUNCTION

2
GLBasic - en / Sometimes they come back
« on: 2012-Apr-29 »
Yes...Sometimes they come back,
In my App I would include :
AirPrint support
iCloud support

I've tried many times to include AirPrint but nothing to do  :giveup:
 
any ideas ?
  :nw:

3
GLBasic - en / Problem with NETWEBGET
« on: 2012-Mar-31 »
Hi,
I've a strange error with NetWebGet.
I've create a system to send "high score" to my website.
Code: (glbasic) [Select]
LSdati$=NETWEBGET$("www.borzini.it",LScomand$, 80,1024,5000)
If I execute the code from my computer Mac or VirtualBox/WindowsXP it's run very well but
if I execute from iPhone (iOS 5.1) or iPod (iOS4) return to me this error:
error 57 "socket is not connected"

Any idea ?

thanks,
Paolo

4
FAQ / Dragging the screen
« on: 2011-Dec-28 »
Is there a example for drag up or down the finger to scroll some screens on iPhone?
Thanks


5
GLBasic - en / NETWEBEND on iOS
« on: 2011-Oct-14 »
Hi,
I've a strange error with NETWEBEND function.

Code: (glbasic) [Select]
NETWEBEND "file://"+Cartella$+"test.html"
and this is a debug result under iPhone :
Code: (glbasic) [Select]
exiting with url file://private/var/mobile/Applications/594A6FC3-CC13-4855-B9F4-D5BB60C8597B/testprint.app/Media/test.html
Ignore the bad exec that will come now ;)

but under windows xp the app run the browser.

Bye bye,
Neurox

6
GLBasic - en / AirPrint, the story continue...
« on: 2011-Oct-08 »
Hello everyone,
I'm still here to talk about AirPrint.
I've groped for hours to print from GLBasic through AirPrint.
But I'm like a ship stranded on the beach :(
Is anyone willing to help me?  :giveup:
I need a function that prints via AirPrint text and/or images.
I know that this is not part of our group filosofy but I are willing to pay $ 50 for the help.

Paolo

7
Network / Airprint support - Possible ?
« on: 2011-Jul-21 »
AirPrint (or/and ePrint) support would be really useful with iPhone/iPad in GLBasic developping.

Gernot ?  :whistle:

8
GLBasic - en / iPhone printing
« on: 2011-Jul-19 »
Someone managed to find a solution to print directly from iPhone?
Maybe a printer wifi?   :|

Paolo/Neurox66

9
GLBasic - en / INI file error under iPhone
« on: 2011-Mar-04 »
I've a trouble with ini file under iPhone.
With a GLBasic 8.200 version are all ok.
But with a new version (9.26) give me a error when i write/reading ini file.
this is a source code I'm using :

Code: (glbasic) [Select]
GLOBAL GLsavepath$
GLsavepath$ = PLATFORMINFO$("DOCUMENTS")
KILLFILE GLsavepath$+"/qualeautore.ini"
INIOPEN GLsavepath$+"/qualeautore.ini"
INIPUT "Libri", "tempo", 10
INIPUT "Libri", "errori", 5
INIPUT "Libri", "indovina",15
INIPUT "Libri", "lingua",1
INIOPEN ""

10
GLBasic - en / GETMOUSECOUNT and MULTITOUCH
« on: 2011-Jan-22 »
Hello,
Today I was trying to write a program that uses multitouch up to 10 fingers.
The program is simple. The strange thing is that when I go to press more than five fingers the counters of the array are zero.  :(
Any suggestions?
Code: (glbasic) [Select]

TYPE BP_TipoMouse
   LNx  = 0 //Coordinata X
   LNy  = 0 //Coordinata X
   LNb1 = 0 //Pulsante sinistro
   LNb2 = 0 //Pulsante destro
ENDTYPE
LOCAL LNx,LNy,LNb1,LNb2,LNi,LNmaxmouse
LOCAL LAmouse[] AS BP_TipoMouse
DIM LAmouse[11]
SYSTEMPOINTER TRUE
   WHILE TRUE
      LNmaxmouse = GETMOUSECOUNT()-1   
      IF LNmaxmouse > 10 THEN LNmaxmouse = 10
      FOR LNi= LNmaxmouse TO 0 STEP -1
         SETACTIVEMOUSE LNi           
         MOUSESTATE LNx,LNy,LNb1,LNb2
         IF LNb1=0
            LAmouse[LNi].LNb1=0
            LAmouse[LNi].LNx=0
            LAmouse[LNi].LNy=0
         ELSEIF LNb1=1
            LAmouse[LNi].LNx=LNx
            LAmouse[LNi].LNy=LNy
            LAmouse[LNi].LNb1=1
         ENDIF
      NEXT

      //Per controllo/for check
      FOR LNi = 0 TO 10
         PRINT "Mouse:"+LNi+" - "+LAmouse[LNi].LNb1+" - "+LAmouse[LNi].LNx+" - "+LAmouse[LNi].LNy ,0,0+(LNi*20)
      NEXT
      SHOWSCREEN
   WEND





11
Perhaps my post is OT,
my app was rejected from Apple because in certain case is crashed :-(
Now I've debugged and the app running ok,
but the question is :
have I to do the path of "provisioning" again or is there an easier way?


12
I'm going crazy out.  :S
My last application for iPhone use a file for configuration.
Open the file for reading record, function well
but when I going to save o append record the GETLASTERROR$() return this:
0003 no such file. This is impossible because before the save/append I made a
control to file exist. And obviously the file exist!   :(
Someone can give me a solution?

Thank in advance

Paolo/Neurox

13
FAQ / iPhone programming
« on: 2010-Nov-06 »
I know that much has been written on this subject, but not too exhaustive...
I'm crazy out with iPhone developing with GLBasic.

I state that I've:
iMac with 4Gbyte of RAM, Snow Leopard
XCode 3.2.4 with iOS 4.1 SDK
I've all two Developer certificate required.
I've compiled the HelloWord written in C under XCode and no made problem.
It's running well under  my iPod...
But if I go to compiling  a GLBasic program, XCode made a few errors and alert!
Are possible have a guide step by step to configure and compiling under XCode of GLBasic programs?

Neurox/Paolo

14
IDE/Syntax / FreeDos
« on: 2009-Feb-08 »
Ok it's not an ide feature,  :|
but ...
..is it possible (in a future) compiling program  for FreeDos (or other Dos system) with
GLBasic ?  =D

Neurox

15
Announcements / GP2X_NAT2008
« on: 2008-Dec-19 »
Hi,
I've finished my last creation for GP2X console : GP2X_NAT2008 !

The software help you to make your Christmas Tree.
Decorate your own Christmas Tree using ornaments, lights and texts.

Another demonstration to GLBasic powerful !

The software is only for F200 version and I've tested with Firmaware 4.0!

Bye bye,
Paolo / Neurox

Pages: [1] 2