Author Topic: HelloLinux  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
HelloLinux
« 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?

Code: [Select]
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]
« Last Edit: August 27, 2011, 08:43:09 AM by peter »

Peter

  • Guest
Re: HelloLinux
« Reply #1 on: August 27, 2011, 08:44:11 AM »
this can be the heaven.
Code: [Select]
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

Peter

  • Guest
Re: HelloLinux
« Reply #2 on: August 27, 2011, 09:39:21 AM »
More stuff:

Code: [Select]
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

Peter

  • Guest
Re: HelloLinux
« Reply #3 on: August 27, 2011, 09:55:42 AM »
Found this in the Aurel Forum:
Code: [Select]
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

Peter

  • Guest
Re: HelloLinux
« Reply #4 on: August 27, 2011, 10:02:31 AM »
This is my work place, there where I write much stuff for Oxygen Basic.

[attachment deleted by admin]

Charles Pegge

  • Guest
Re: HelloLinux
« Reply #5 on: August 27, 2011, 10:56:48 AM »

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




Peter

  • Guest
Re: HelloLinux
« Reply #6 on: August 27, 2011, 11:21:03 AM »
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]

Charles Pegge

  • Guest
Re: HelloLinux
« Reply #7 on: August 27, 2011, 11:48:06 AM »
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

Peter

  • Guest
Re: HelloLinux
« Reply #8 on: August 27, 2011, 12:32:10 PM »
Thanks Charles,

good to know that it runs without problems.
now I can sleep well.

JRS

  • Guest
Re: HelloLinux
« Reply #9 on: August 27, 2011, 05:19:51 PM »
Quote
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?


« Last Edit: August 27, 2011, 05:23:02 PM by JRS »

Charles Pegge

  • Guest
Re: HelloLinux
« Reply #10 on: August 27, 2011, 07:12:12 PM »

Yes, gradually getting there. A few more structural changes have to go in first, and some supporting tools. Hence my interest in C.

Charles

Peter

  • Guest
Re: HelloLinux
« Reply #11 on: August 28, 2011, 09:40:25 AM »
and here, some new attacks under way

Code: [Select]
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]

JRS

  • Guest
Re: HelloLinux
« Reply #12 on: August 28, 2011, 09:37:18 PM »

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.