Oxygen Basic
Programming => Problems & Solutions => Topic started by: Peter on August 27, 2011, 08:35:48 AM
-
Hi Charles,
I want to know whether it runs correct under Linux.
Press the Escape key and see what will happen.
Shuts your window correctly? Or have you an orphan on your screen?
indexbase 0
include "window.h"
SetWindow "color",256,256,w_2
SetFont 12,24,0,""
int x,y
While WinExit=0
iF Key(vk_escape) Then WinExit=1
For x=0 To 255
For y=0 To 255
'Pixel x,y,rgb x,y,128
Pixel x,y,RGB(0,128+127 * sin(x/8),0)
Next
Next
DoEvents
SwapBuffers
Wend
WinEnd
[attachment deleted by admin]
-
this can be the heaven.
indexbase 0
include "window.h"
SetWindow "Face",256,256,w_2
SetFont 12,24,0,""
int x,y
While WinExit=0
iF Key(vk_escape) Then WinExit=1
Circle 28,28,90,rgb 255,128,200
Circle 88,100, 10,rgb 0,0,255
Circle 168,100, 10,rgb 0,0,255
Line 88,150,168,150,2,rgb 255,0,0
DoEvents
SwapBuffers
Wend
WinEnd
-
More stuff:
indexbase 0
include "window.h"
SetWindow "2D Primitives",400,300,w_4
SetFont 10,20,100,""
Circle 110,100,30,RGB 252,183,54
Line 0,0,300,400,4,RGB 0,255,0
Line 0,400,400,0,8,RGB 255,255,0
Box 250,60,40,50,RGB 180,180,255
RoundBox 150,30,50,50,25,25,RGB 255,180,180
SetText "Some Elements",200,8,RGB 255,50,0
Pause
WinEnd
-
Found this in the Aurel Forum:
indexBase 0
include "window.h"
SetWindow "Bouncing Ball",600,400,w_2
SetFont 12,24,0,""
int n=40, p=20
While WinExit=0
cls RGB 220,220,230
Circle n,p,24,RGB 0,255,0
p=50+(100+50*SIN(n/24))
n +=1
iF n >=600 Then n=-12
SetText "GreenBall",40,20,rgb 242,39,0
DoEvents
SwapBuffers
WaitTime 60
Wend
WinEnd
-
This is my work place, there where I write much stuff for Oxygen Basic.
[attachment deleted by admin]
-
Hi Peter,
not enough vegetables in the diet? :D
My forthcoming Oxygen has stricter type checking on UDTs, and it caught an error on line 511 of windows.h where you are trying to pass a null pointer for a PointApi parameter
MoveToEx bHdc,x,y,0
this fixes the problem
MoveToEx bHdc,x,y,byval 0
I will boot into Linux now
Charles
-
But yes, I knew it, I forgot the correction! I am to hectic.
I have again 100 ideas and I do not know where I should begin.
Everthing is cool stuff for everybody on earth and hell.
We become profis!
And my cat thinks this here:
[attachment deleted by admin]
-
So you, Dan and your cat think hell is cool.
The progs all work fine in Wine/Linux, and terminate cleanly. I can run Oxygen directly from the Windows partition.
Charles
-
Thanks Charles,
good to know that it runs without problems.
now I can sleep well.
-
I can run Oxygen directly from the Windows partition.
That's convenient when Windows is your primary desktop.
P.S.
Has there been any progress on the Linux port of OxygenBasic?
-
Yes, gradually getting there. A few more structural changes have to go in first, and some supporting tools. Hence my interest in C.
Charles
-
and here, some new attacks under way
indexBase 0
include "window.h"
SetWindow "HappyBall",600,400,w_1
SetFont 12,24,0,""
int n=40, p=20, w1, w2
w1= LoadBmp "bmp/satis.bmp",128,128
w2= LoadBmp "bmp/bild.bmp",600,400
While WinExit=0
SetBmp w2,0,0,600,400,0
SetBmp w1,n,p,128,128,0
p=50+(100+100*sin(n/18))
n +=1
iF n >=600 Then n=-64
DoEvents
SwapBuffers
WaitTime 60
Wend
WinEnd
[attachment deleted by admin]
-
Yes, gradually getting there. A few more structural changes have to go in first, and some supporting tools. Hence my interest in C.
Charles
Please put me at the top of your list as a alpha Linux tester. I'm very interested in expanding SB with O2 on a 64 bit Linux platform.