|
Post by Tom Mulgrew on Mar 24, 2016 22:27:36 GMT -5
I've started porting the Basic4GL IDE over to the Qt widget library. You can download and play with a development release here. So far you can edit, run and debug programs. It doesn't support plugin DLLs or creating standalone executables, but that will come soon (plus a bunch of smaller things, like the help menu, options, text search etc). Besides the missing plugin DLL support it should (in theory) run anything that the current Basic4GL release can run
|
|
|
Post by matthew on Mar 25, 2016 6:00:19 GMT -5
Just tried it (I'm running Windows 10) and it's working fine here. :-)
|
|
|
Post by DJLinux on Mar 25, 2016 21:18:18 GMT -5
To bad tom does mot use open source compilers like GNU only BorLand and Microsoft. VisualStudio creates 32-bit apps set will not run on Wiondows XP SP3 :-( All my compiled apps and libs runs on all versions of Windows including Windows 10 32/64-bit and all version of x86 Linux 32/64.bit.
DJ
|
|
|
Post by Tom Mulgrew on Mar 26, 2016 1:17:01 GMT -5
I've tried it on a clean virtual machine, and found a couple more missing DLLs (msvc runtime ones). I'm pretty confident it should work now (maybe not on XP...).
|
|
|
Post by EmilHalim on Mar 26, 2016 10:26:25 GMT -5
works okay , win7
waiting for plugins.
well done , thank you Tom.
|
|
|
Post by PeterMaria on Mar 26, 2016 13:28:07 GMT -5
Hi Tom,
seems there is a small bug
move the mouse pointer over the left edge of the window, the circle disappears and comes later over the right side back and this will take some seconds!
glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho (0,windowwidth(),windowheight(),0,-1,1) glMatrixMode (GL_MODELVIEW) glDisable (GL_DEPTH_TEST) glEnable (GL_LINE_SMOOTH) glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
sub DrawCircle(cx#, cy#, r#, size#) glEnable(GL_BLEND) glLineWidth(size#) dim theta# = 2*3.1415926 dim c# = cosd(theta#) dim s# = sind(theta#) dim x# = r#, y# = 0 dim t#, i glBegin(GL_LINE_LOOP) for i=0 to 360 step 6 glVertex2f(x# + cx#, y# + cy#) t# = x# x# = c# * x# - s# * y# y# = s# * t# + c# * y# next glEnd() glDisable(GL_BLEND) end sub
sub FillCircle(cx#, cy#, r#) glEnable(GL_BLEND) glLineWidth(1.0) dim theta# = 2*3.1415926 dim c# = cosd(theta#) dim s# = sind(theta#) dim x# = r#, y# = 0 dim t#, i glBegin(GL_POLYGON) for i=0 to 360 step 6 glVertex2f(x# + cx#, y# + cy#) t# = x# x# = c# * x# - s# * y# y# = s# * t# + c# * y# next glEnd() glDisable(GL_BLEND) end sub
dim x#=300,y#=200,e#=0.05,dx#,dy#,tx#,ty# dim i,j
while scankeydown(27)=0 glClear(GL_COLOR_BUFFER_BIT) for j=0 to windowheight() step 40 for i=0 to windowwidth () step 40 glcolor4ub(255, 255, 255, 128) drawcircle(i, j, 20, 4) next next
tx# = Mouse_x()*windowwidth()-10 dx# = tx#-x# if abs(dx#) >1 then x# = x#+dx#*e# end if ty# = Mouse_y()*windowheight()-10 dy# = ty#-y# if abs(dy#) >1 then y# = y#+dy#*e# end if glcolor4ub(255,194,83,200) drawcircle(x#, y#, 40, 3) glcolor4ub(255,224,103,200) drawcircle(x#, y#, 30, 3) glcolor4ub(255,244,123,200) fillcircle(x#, y#, 20)
glcolor4ub(255,44,23,128) fillcircle(windowwidth()/2, windowheight()/2,100) glcolor4ub(23,44,255,128) fillcircle(windowwidth()/2, windowheight()/2-150,100) glcolor4ub(23,255,44,128) fillcircle(windowwidth()/2, windowheight()/2+150,100)
swapbuffers() waittimer(10) wend
|
|
|
Post by Tom Mulgrew on Mar 26, 2016 23:34:27 GMT -5
Wow, that was quick. It seems the WM_MOUSEMOVE event is returning negative values for X when you move the mouse off the screen. Not sure why it would be different in this version. I can only guess that the Qt event loop is affecting it in some way.
I'll fix it up. Cheers.
|
|
|
Post by PeterMaria on Mar 27, 2016 13:18:47 GMT -5
Hello, here's another example, called Happy Eastern. of course, Happy Eastern to all members.  glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho (0, 640, 480, 0, -1, 1) glMatrixMode (GL_MODELVIEW) glDisable (GL_DEPTH_TEST) glEnable (GL_LINE_SMOOTH) glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
sub Ellipse(x#, y#, r1#, r2#,width#) dim t# dim ra# = r1#/2, rb# = r2#/2 glPointSize(width#) glColor3ub (255,255,255) glBegin (GL_POINTS) for t#=0 to 360 glVertex2f(x#+cos(t#)*ra#, y#+sin(t#)*rb#) next glEnd() end sub
dim a#, x#=320, y#=240, r#=800, c#, lx#, ly#
while scankeydown(27)=0 glClear(GL_COLOR_BUFFER_BIT)
for a#=0 to 360 step 2 glcolor3ub(255, 255, 255) lx# = sin(a# + c#) * r# ly# = cos(a# + c#) * r# Ellipse(x#+lx#/8, y#+ly#/8, lx#/4, ly#/4, 1) next
c# = c#+.05 if c# >=360 then c# =-c#: endif swapbuffers() waittimer(10) wend end
|
|
|
Post by Tom Mulgrew on Mar 27, 2016 21:06:10 GMT -5
Re-implemented plugin DLL support, and a few misc fixes. Download Here
|
|
|
Post by PeterMaria on Mar 28, 2016 9:06:31 GMT -5
Hi, yes, mouse bug is gone. another checkup: textmode(TEXT_OVERLAID) dim fnt = loadtex("fonts/gl4font05.png") font(fnt) locate 15, 0 print( "SMOKY" ) glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho (0,windowwidth(),windowheight(),0,-1,1) glMatrixMode (GL_MODELVIEW) glDisable (GL_DEPTH_TEST) glEnable (GL_LINE_SMOOTH) glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) sub FillCircle(cx#, cy#, r#) glEnable(GL_BLEND) dim theta# = 2*3.1415926 dim c# = cosd(theta#) dim s# = sind(theta#) dim x# = r#, y# = 0 dim t#, i glBegin(GL_POLYGON) for i=0 to 360 step 6 glVertex2f(x# + cx#, y# + cy#) t# = x# x# = c# * x# - s# * y# y# = s# * t# + c# * y# next glEnd() glDisable(GL_BLEND) end sub Sub DrawCenter(x#, y#) dim sx#, sy# sx# = x#-40 sy# = y#-40 fillcircle(sx#, sy#, 50) End Sub dim i#, a#, x#, y# while scankeydown(27)=0 glclearcolor(0, 0, 0, 1) glClear(GL_COLOR_BUFFER_BIT) for i#=1 to 6.4 step .1 x# = sin(i#) * 100 + 200 y# = cos(i#) * 100 + 200 glcolor4ub(int(i#*128), int(i#*160), int(i#*200),128) DrawCenter(x#+300+sin(a#*i#)*70,y#+150+cos(a#*i#)*50) next a# = a# + .01 if a# >=360 then a# =-a#: endif drawtext() swapbuffers() waittimer(10) wend [/code] Attachments:fonts.zip (6.47 KB)
|
|
|
Post by EmilHalim on Mar 28, 2016 14:16:37 GMT -5
Hi Tom
Thanks you for your new release which supports Plugins.
but i found that , i was playing with decoderplugin and run play_video_with_new_layout , when close the program the sound still playing. this was not happend with original basic4Gl.
|
|
|
Post by PeterMaria on Mar 29, 2016 12:58:21 GMT -5
hello, last demo until the next release. thanks  TextMode(TEXT_BUFFERED) dim fnt = loadtex("png/gl4font04.png") font(fnt) locate 14,0 print "TIME MONSTER"
declare Sub Sprite(nr(), x, y, w, h, frame) declare Function Rand(min, max)
dim headx#=400, heady#=300 dim cells=1000, i, fx dim mo(6) = Loadimagestrip("png/evil.png")
dim px# (3000) dim py# (3000) dim radx# (3000) dim rady# (3000) dim angle#(3000) dim frequ#(3000) dim cRadi#(3000)
for i=0 to cells radx# (i) = Rand(-7, 7) rady# (i) = Rand(-4, 4) frequ#(i) = Rand(-9, 9) cRadi#(i) = Rand(16,30) next
while scankeydown(27)=0 for i=0 to cells if i=0 then px#(i)=headx#+sind(angle#(i))*radx#(i) py#(i)=heady#+cosd(angle#(i))*rady#(i) else px#(i)=px#(i-1)+cosd(angle#(i))*radx#(i) py#(i)=py#(i-1)+sind(angle#(i))*rady#(i) endif sprite(mo, px#(i)-100, py#(i)-70, 76,76, fx) angle#(i) = angle#(i) + frequ#(i) next fx = fx+1 if fx=7 then fx=0: endif drawtext() waittimer(40) ClearSprites() wend end
Sub Sprite(nr(), x, y, w, h, frame) NewSprite (nr) SprSetxCentre(0) SprSetyCentre(0) SprSetZOrder (1) SprSetSize (w,h) SprSetPos (x,y) SprSetFrame (frame) End Sub
Function Rand(min,max) Return rnd()% (max - min + 1) + min End Function
Attachments:monster.zip (14.94 KB)
|
|
|
Post by Tom Mulgrew on Apr 10, 2016 0:56:23 GMT -5
|
|