GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Apr-03

Title: Quick bit of help
Post by: MrTAToad on 2011-Apr-03
Could someone with a PowerPC and Intel Mac, compile the following program and tell me what the executable size (ie the complete directory size) :

Code (glbasic) Select
// ---------------------------------
// Project: Plasma
// Start: Wednesday, March 11, 2009
// IDE Version: 6.184

TYPE tCosTable
value
ENDTYPE

TYPE tColour
value%
ENDTYPE

TYPE TPlasma
cosTable[] AS tCosTable
colourTable[] AS tColour
screenWidth%;screenHeight%
wave%
stp%

FUNCTION Initialise_Plasma%:
LOCAL loop%
LOCAL cTable AS tCosTable
LOCAL cColour AS tColour

DIM self.cosTable[0]
DIM self.colourTable[0]

GETSCREENSIZE self.screenWidth%,self.screenHeight%

//  Create COS table
FOR loop%=0 TO self.screenWidth%*2
cTable.value=SIN(360.0*loop%/320.0)*32+32
DIMPUSH self.cosTable[],cTable
NEXT

FOR loop%=0 TO 255
cColour.value%=RGB(loop%,loop%,0)
DIMPUSH self.colourTable[],cColour
NEXT

self.wave%=0
self.stp%=14
ENDFUNCTION

FUNCTION Update_Plasma%:
LOCAL x%,y%
LOCAL pos1,pos2

INC self.wave%,3
IF self.wave%>320
self.wave%=0
ENDIF

FOR y%=0 TO self.screenHeight%-1 STEP self.stp%
        pos1 = self.cosTable[y%+self.wave%].value

FOR x% = 0 TO self.screenWidth%-1 STEP self.stp%
pos2 = (self.cosTable[x%+self.wave%].value + self.cosTable[x%+%].value
+ pos1)
STARTPOLY -1
POLYVECTOR x%+self.stp%,y%,0,0,
self.colourTable[self.cosTable[pos2].value].value
POLYVECTOR x%,y%,0,0,
self.colourTable[self.cosTable[pos2].value].value
POLYVECTOR x%,y%+self.stp%,0,0,
self.colourTable[self.cosTable[pos2].value].value
POLYVECTOR x%+self.stp%,y%+self.stp%,0,0,
self.colourTable[self.cosTable[pos2].value].value
        ENDPOLY
        NEXT
   NEXT
ENDFUNCTION
ENDTYPE

LOCAL plasma AS TPlasma

plasma.Initialise_Plasma()
WHILE KEY(1)=0
plasma.Update_Plasma()
SHOWSCREEN
WEND


If you could let me know the sizes for Release and Debug modes, that would be handy.
Title: Re: Quick bit of help
Post by: Ian Price on 2011-Apr-03
Do you mean compile ON the various Macs?

Surely the filesize will be the same as copiled for Mac on a pc? Won't it?
Title: Re: Quick bit of help
Post by: MrTAToad on 2011-Apr-03
Yes, I was thinking of the iPhone for some reason :)

Never mind people - I've remembered that I've got 9.033 and thus can do it myself :)

It must be getting late here... :bed:
Title: Re: Quick bit of help
Post by: Ian Price on 2011-Apr-03
Nighty night :P