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

Topics - Gary

#21
Bug Reports / Website errors
2011-Sep-04
Kitty

When viewing the online manual I am getting a lot of php debug/error messages

for example

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: Cannot modify header information - headers already sent by (output started at /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php:2622) in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/bad-behavior/bad-behavior/screener.inc.php on line 8

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2622

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /var/kunden/webs/glbasicabc/glbasic/forum/Sources/Load.php on line 2695

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /var/kunden/webs/glbasicabc/glbasic/forum/SSI.php on line 174

Have you turned on the setting on the server to give all PHP error messages or has something else gone wrong?

The actual manual itself still seems to be working fine
#22
Is there any commands that will give the screen size of an android device? I am thinking that I can read the screen size then set the screen up to full screen and use the available size so that apps look nice on every device with the single app
#23
I know there are many various specs of android devices but is there any standard button numbering system for which key is which?

I knocked up a quick program to output the button number pressed (Much like the built in util for the SDK but running on any device) which I have attached.

On my Xperia Play the following buttons have the following codes

up 205
down 203
left 200
right 208
x 17
[] no value returned
^ no value returned
O exit program
menu 221 and 47
back and home both quit
magnify glass no value returned
L no value returned
R No value returned
vol up no value returned
vol down no value returned
As you can see a lot of buttons dont return a value. Is there anyway that these could be read?

If you can, could you add your devices buttons to the list to confirm they all match up and if there are any other devices with extra buttons that return different values

Am just going to run the same program on the emulator and see what I get



[attachment deleted by admin]
#24
I am trying to get one of the sample programs to compile to check out my android set up but I am getting the following error

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.7.917 SN: 6f77911 - 3D, NET
Wordcount:64 commands
compile+link:
BUILDSRIPT
Buildfile: C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\build.xml
    [setup] Android SDK Tools Revision 10
    [setup] Project Target: Android 2.2
    [setup] API level: 8
    [setup]
    [setup] ------------------
    [setup] Resolving library dependencies:
    [setup] No library dependencies.
    [setup]
    [setup] ------------------
    [setup]
    [setup]
    [setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:
     [echo] Creating output directories if needed...

-aidl:
     [echo] Compiling aidl files into Java classes...

-renderscript:
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:
     [echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

compile:
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 2 source files to C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\bin\classes
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
    [javac] C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android\gen\com\yourcompany\3dcollision\R.java:8: ';' expected
    [javac] package com.yourcompany.3dcollision;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
C:\GLBasic_v10\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:384: Compile failed; see the compiler error output for details.

Total time: 1 second
Android=C:\Users\Gary\Documents\GLBasic\Samples\3D\3DCollision\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 7.3 sec. Time: 12:41
Build: 1 succeeded.


Any ideas what it could be?

Cheers
Gary
#25
THought I would share this link I was passed. Could be useful if you want to make some standard looking iPhone GUI graphics

http://www.designerstoolbox.com/designresources/iphone/

Gary
#26
I am thinking about doing a simple football kit design app and wondered if there is a a way you can change a colour of a sprite on the fly?

For instance I have a shirt and shorts graphic that have 2 defined default colours (255,0,255 and 0,255,0) can I change it to say 210,30,77 and 1,1,1 for the shirt and on the shorts graphic make the 255,0,255 to say 255,228,0 and then draw it? Obviously the final program would have many kits and many predefined colors but for now im just stuck on doing the one.

The only way I can see to do it is a bit complex and uses sprite2mem, is there an easier way?

Cheers
Gary
#27
Not sure if anyone still uses Binary Coded Decimal but I needed to write a BCD to Decimal conversion for my project and thought I would share the code with anyone that might need it

Code (glbasic) Select
FUNCTION bcdbin32:inval

LOCAL weight_lut[]
LOCAL weight, retval, i
DIMDATA weight_lut[], 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000

retval = 0

FOR i=0 TO 7
weight = weight_lut[i]
WHILE (bAND(inval,15))
retval = retval + weight
inval = inval - 1
WEND
inval = ASR(inval, 4)
NEXT

RETURN retval

ENDFUNCTION


Now I fully expect someone to point out there is a built in function that I have missed lol

Hope its useful for someone

Gary
#28
First sorry for the large attachments on this thread

I am trying to do an animated spinning coin and have it working fine on my dev pc but when I move it to another computer I get very bad graphic tearing as per the attached screen shots.

The animation is a 32 frame 187 x 189 spinning coin which I am using via

LOADANIM "coinspin.png",200,187,189

and drawing via

ROTOZOOMANIM 200,coin.frame%,coin.x,coin.y,coin.angle,coin.scale

As you can see from the screen shots the corruption is quite bad and doesnt just seem to be the graphic being cut in the wrong place. the scaling seems to be out as well

Has anyone come across anything like this before and if so how do you fix it?

Thanks
Gary

[attachment deleted by admin]
#29
Just wondering if anyone else has installed IOS5 beta on an iPhone 3gs? If you are thinking of doing it then dont. I have done it and most apps I have tried that use some sort of net connection and/or gps are failing to work properly. I have missing lables on folders on springboard, when I go to app store and install something I press install and it changes to a small green rectangle which also needs pressing. I have done full restore 3 times now and its still as bad as the first time. Heres hoping a new beta is out soon :(
#30
Off Topic / Android store
2011-Jun-10
Having just got access to an Android phone I took my first look at the google store and was amazed by the dross and duplicates on there. For example, one dev team has a Snes emulator on there, one is called panda snes, one is called zebra snes and so on. The same program is on there 10 times with a different animal. And in the app description there are so many in appropriate keywords to ensure their app appears no matter what you search for.

People have a dig at Apple for their practices and blocking certain apps but if google were to take the same stance there would be 70% of the apps removed and the store would be much easier to use in my opinion.

Mind you, I did love the dev set up for android, into phone settings, set dev mode on, copy apk to sd card and install, job done. No licence, signing and certificate rubbish just to run a test program
#31
Is there any way of forcing GLB to finish writing an ini file before it quits? I have noticed that on occasions when I quit a program that just happens to be writing to the ini file while quitting it corrupts it and is then recreated when the program is loaded next time zeroing everything stored
#32
Is there any way (GLBasic or an inline C routine) of forcing the focus back to the running GLBasic program?

I am running in full screen and I call a shell command at start up which loads and closes correctly but at this point focus is not handed back to the GLBasic program (I have the AUTOPAUSE turned off so it does still run and displays on the screen but keyboard inputs are not accepted until the screen is touched)

Thanks
Gary
#33
Apologies in advance for taking this a little off topic further on.

I have a program that uses the serial port for comms with another board and have found that unless I initialise the comms port with another program first GLB does not seem to be opening it up correctly (Im using Gernots Serial wrapper). So I have constructed a small program in VB that just opens the port.

Code (glbasic) Select
Module Module1

    Sub Main()
        SendSerialData("hello")
    End Sub
    Sub SendSerialData(ByVal data As String)
        ' Send strings to a serial port.
        Try
            Using com1 As IO.Ports.SerialPort =
                My.Computer.Ports.OpenSerialPort("COM1")
                com1.WriteLine(data)
            End Using
        Catch e As System.IO.IOException
            Console.WriteLine("port not open", e)
        End Try
    End Sub

End Module


which opens the port if it is present or gives a port not open message in the console if it is not present.

My problem is when I call the command with SHELLCMD using the following code

Code (glbasic) Select
GLOBAL commsflag,rv

commsflag = SHELLCMD("opencom4.exe",TRUE,TRUE,rv)

DEBUG commsflag+"\n"
DEBUG rv+"\n"


commsflag is always set to 1 indicating the program exited ok (I presume) and rv is always 0. Are there any VB gurus who could tell me how to get the console program to return a value indicating the status of the port that rv can then read? Or is there a way I can get GLB to detect there has been text in the opened console window and use that as an indication of the error?

I have already worked out another way round the problem but its messy and involves cycling the serial ports, sending data and looking for a response. If I cant get a quick fix to the above I will use this method

Thanks
Gary
#34
Bug Reports / threads on IOS
2011-May-16
Using the current beta is there an issue running threads on IOS?

I tried to compile my project using threads and got a codesign error in xcode, rewrote the code that is in the thread to be part of the updatescreen routine and it works and compiles fine and runs on my iPhone
#35
Would it be possible to have the debugger automatically give a message when a filename is not found if debug mode is turned on?
#36
Would there be any chance of the IDE showing some sort of link to what IF/WHILE each ENDIF/WEND relates back to?

I know by doing proper indentation you should be able to spot any errors but when you have a few nested loops it can get messy.

Im thinking something along the lines of a dotted line being drawn on the IDE background that connects the 2 commands much like ultra edit does. Nothing complex just a quick visual indication
#37
not sure if I am the only one who does this but thought I would make the suggestion in case others do it as well

When I open GLBasic and get the Project Wizard screen up I find myself double clicking on the recent project in the list I want to open and sitting for a few seconds waiting for it to open up (i.e. I dont click the OK to open it). Does anyone else make this mistake? and if so would it be possible to add double clicking on a project to open it as well as click then OK?

#38
any ideas why I get this error when I try to compile in xcode?
Code (glbasic) Select
CodeSign /Users/gary_leeds/Library/Developer/Xcode/DerivedData/iPhone-bqozunwsxwuvboatwsmtogxnzdqr/Build/Products/Debug-iphoneos/iPhone.app
    cd /Users/gary_leeds/Desktop/XCode
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
    /usr/bin/codesign -f -s "iPhone Developer: Gary Pearson (GJ7V7PTEA2)" --resource-rules=/Users/gary_leeds/Library/Developer/Xcode/DerivedData/iPhone-bqozunwsxwuvboatwsmtogxnzdqr/Build/Products/Debug-iphoneos/iPhone.app/ResourceRules.plist --entitlements /Users/gary_leeds/Library/Developer/Xcode/DerivedData/iPhone-bqozunwsxwuvboatwsmtogxnzdqr/Build/Intermediates/iPhone.build/Debug-iphoneos/iPhone.build/iPhone.xcent /Users/gary_leeds/Library/Developer/Xcode/DerivedData/iPhone-bqozunwsxwuvboatwsmtogxnzdqr/Build/Products/Debug-iphoneos/iPhone.app

/Users/gary_leeds/Library/Developer/Xcode/DerivedData/iPhone-bqozunwsxwuvboatwsmtogxnzdqr/Build/Products/Debug-iphoneos/iPhone.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1


thanks
Gary
#39
Is there a simple way to take a 1024x768 sprite, rotate it by 90 degrees and resize to 320 x 480 (or 640 x 960)?

rotozoomsprite will only let you resize as a percentage of the original and the aspect is not the same for both x and y.

Is the only way to do it is to draw the rotated sprite to a back buffer screen, take that sprite and use zoomsprite to resize it down to the correct size?

thanks
Gary
#40
If I was to take screen shots from commercial PC games and use them in an iPhone app could I get done for copyright theft? My idea would not be ripping off the actual game concept of the original but just using the screenies in a quiz type format

Cheers
Gary