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 - AndyH

#1
Quote from: Kitty Hello on 2011-Jul-28
There's 2 problems with this:
I would need the apple libs to compile and link
I would need a compiler for windows that can compile and link
Also I need a program to code-sign it.

It's pretty hard and I fear it will break with future version, as Apple is famous for this.
Yes, compiling for iOS is a true pain. That's why I so want to push the WebOS devices. The OS is awesome, programming for them is awesome, the support is awesome.

Reading around why Apple have done this now, it's clear they are really worried about the competition, so to make an educated guess I don't think it likely that they'd restrict it again.

Didn't you originally get an iOS build running from Windows when you first did the iOS module?
#2
Yes, it's frighteningly expensive.  I almost bought a Mac Mini to save on the cost and at the last minute the Wife said why not get the Macbook so I didn't put up any objections.  In fact, just like in the Road Runner cartoons, there was a cloud shaped Andy where I was just standing as I made my way over to the sales desk ;)

On the other hand because Apple like everyone to upgrade every year there are loads of people flogging perfectly good kit on ebay at a more reasonable price.
#3
Quote from: Crivens on 2011-Jul-27
Yeah, mine is pretty underused. Must use it more.

I've pretty much moved over to my Macbook now... only because I can run Windows 7 via Parallels at the same time and everything is fully integrated down to sharing the My Documents so it's like having a hybrid of OSX or Windows 7.
#4
I don't know a lot about the Flash packager or the process other than some snippets I've read, but the guy I was talking to about this  was insistent that you can do everything on the Windows side now.  I know you'd need the Apple developer account to submit to the store (obviously) but I wasn't certain if you could get something on your iOS device just for testing without signing up.

It certainly opens up an interesting prospect for Windows developers and for GLBASIC, even if you still have to fork out for the $99 dev account.
#5
I want to eliminate calling a set-up routine.  I was hoping to use the default values as a constructor, so when I create an instance of the type it will be loaded with some meaningful information.
#6
Just wondering how many Retro Remake forum regulars are here now?  I've seen one or two new names here in GLB land that I recognise ;)

Sign in..

Andy H (Ovine)
#7
That is fixed now, but I have this function in my type:

TYPE ....
blah = GENSPRITE()
ENDTYPE

This is causing GLB to crash when it runs.
#8
The ability to assign a default value to a type works for functions when it is in the main (first) GBAS file, but if you declare in an additional file you get an error.

Try this code:
Code (glbasic) Select
TYPE TEST
t = RGB(255,255,255)
ENDTYPE


First in the main file, it will compile, then add a second file to your GLB project and move it in there.  I get this error (on V7 RC2):

Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.029 SN:4cca05d9 - 3D, NET
"second file.gbas"(7) error : command not inside function or sub
#9
Just spotted RC2 at the top of the forums DOH!  In this version it works.  Ignore me ;)
#10
This code gives an error in V7 (works in earlier versions):

Code (glbasic) Select
FUNCTION QSIN: x

    WHILE x>360.0;  DEC x, 360.0; WEND
    WHILE x<0;      INC x, 360.0; WEND
    IF x>180.0 THEN x = 180.0-x

    x = x/57.296
    x = 1.2732 * x -0.4053 * x * ABS(x)

x = 0.225*(x*ABS(x)-x)+x
RETURN x
ENDFUNCTION


FUNCTION QCOS: x
RETURN QSIN(x+90)
ENDFUNCTION


INLINE
float qInvSqrt(float x){
   float xhalf = 0.5f * x;
   int i = *(int*)&x; // store floating-point bits in integer
   i = 0x5f3759d5 - (i >> 1); // initial guess for Newton's method
   x = *(float*)&i; // convert new bits into float
   x = x*(1.5f - xhalf*x*x); // One round of Newton's method
   return x;
}
ENDINLINE


FUNCTION QSQR: y
INLINE
return 1.0f / qInvSqrt(y);
ENDINLINE
ENDFUNCTION



_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.023 SN:4cca05d9 - 3D, NET
Wordcount:14 commands
compiling:
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `float __GLBASIC__::qInvSqrt(float)':
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:135: error: a function-definition is not allowed here before '{' token
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:154: error: a function-definition is not allowed here before '{' token
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:158: error: a function-definition is not allowed here before '{' token
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: At global scope:
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:170: error: expected `}' at end of input
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 1.6 sec. Time: 21:25
Build: 0 succeeded.
*** 1 FAILED ***
#11
I'm in with the "for" camp to add some basic OOP to GLB.   I really do not understand why some are reluctant to use it if it were there, but as you can see in the above code snippets it wouldn't change anything for those that didn't want to use it.  You would just create functions and types as you do now, but for those who want to, we could put functions (or methods) in the type structures too to make a more self contained object.  This would make both camps happy.
#12
OK for me now.
#13
will do.
#14
My game won't run when in Debug mode since I updated GLB to the build 6.184.  In release mode it works - just not in debug mode.

In Debug mode it will just exit without an error.  I've tracked it down to this line ...

IF SPLITSTR( strLine$, st$[], ",") = 7

which has the following in strLine$:

20,FIRE BUTTON INCREASES SPEED,FEUER-KNOPF BESCHLEUNIGT,APPUYEZ LE BOUTON FEU POUR AUGMENTER LA RAPIDITE,JOYSTICKKNAPPEN ÖKAR HASTIGHETEN,jmnoj` ncm) sbekhwhb`er qjnpnqr|,SKYTE KNAPPEN GJØR DET RASKERE

st$[] contains 7 elements (0 to 6) from the previous loop (this is in a loop that has run so far for 19 iterations each with different data in the strLine$ variable).


It was working in the previous build in Debug and Release mode.
#15
Fantastic, thanks Gernot.  I think there might be a glitch with inline code though?

C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp: In function `float __GLBASIC__::qInvSqrt(float)':
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp:917: error: `RETURN' was not declared in this scope
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp:917: error: expected `;' before "x"
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp: In function `DGInt __GLBASIC__::QSQR(DGInt)':
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp:932: error: `RETURN' was not declared in this scope
C:\DOCUME~1\AndyH\LOCALS~1\Temp\glbasic\gpc_temp3.cpp:932: error: expected `;' before numeric constant
*** FATAL ERROR - Please post this output in the forum

this points to....

/* ---- INLINE ---- */
float qInvSqrt(float x){
   float xhalf = 0.5f * x;
   int i = *(int*)&x; // store floating-point bits in integer
   i = 0x5f3759d5 - (i >> 1); // initial guess for Newton's method
   x = *(float*)&i; // convert new bits into float
   x = x*(1.5f - xhalf*x*x); // One round of Newton's method
   RETURN x;
}

/* ---- ENDINLINE ---- */
// ------------------------ //


And the GLBasic code is:

INLINE
float qInvSqrt(float x){
   float xhalf = 0.5f * x;
   int i = *(int*)&x; // store floating-point bits in integer
   i = 0x5f3759d5 - (i >> 1); // initial guess for Newton's method
   x = *(float*)&i; // convert new bits into float
   x = x*(1.5f - xhalf*x*x); // One round of Newton's method
   RETURN x;
}
ENDINLINE

float x is defined as the parameter passed.