Forum Replies Created
-
AuthorPosts
-
For the GCC issue I would try commentings out the line in question (e:/Monkey2/modules/monkey/native/bbstd.h:23) like so:
// #define __forceinline inline __attribute__((always_inline))
It is pretty odd that this is a warning not an error and I would not expect a monkey2 failure.
I suspect the version of mingwm, are you using 6.2.0 as specified here:
http://monkeycoder.co.nz/monkey2-files/
Monkey2 already has a “mega” library dependency that takes longer to compile than all other modules put together (assimp) so I don’t think it is great idea to add libcurl which I assume would fall into same category.
IMHO core monkey2 needs to be lighter and faster and with it’s new support for win32 long types I think a wininet module written in pure monkey2 for web requests would fit the bill.
In the same vein, removing assimp to the external module manager leaving .gltf and possibly a new .b3d pure monkey2 3d model loader in core would make monkey2 a lot smaller and faster to compile.
Mojo3D is not ready for beginners, i think also use of monkey2/ root to dump conceptual / incomprehensible / advanced mojo3d files is a bit unrepresentative of the tech.
If you have time you could deviate from studying source code of a 2D banana or two and edit and view the .mojo3d files.
Perhaps you can design entire game worlds in them but more likely you will advance by studying the source files in /modules/mojo3d/tests which could arguable be moved to root directory status
Allah? If you are arabic perhaps you could use arabic charset for your user name, IMHO I don’t think it translates well to english.
Nice one Adam!
There is likely some useful information being logged to the Android console aka logcat.
Either launch your test builds from Android Studio or run adb logcat from command line to view.
Changed original links to new domain name.
Am looking forward to a 2018 version of these docs possibly published here https://readthedocs.org/
Python syntax errors may be ugly and hostile but their docs have always been nice.
Last year windows platform used angle DirectX stub solution.
This year monkey2 defaults to pure OpenGL for performance improvement.
Info here http://monkeycoder.co.nz/forums/topic/new-opengl-driving/
Hey Andy, I have pinned latest version of steamstub for BlitzMax to my mojolabs BlitzMax Discord channel:
You need to get the source vertices via their index:
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205#Import "<std>"#Import "<mojo3d>"Using std..Using mojo..Using mojo3d..Global AppName:String = "My 3D Game"' TODO: Return array of tri models??' Single tri...Function ModelFromTriangle:Model (in_model:Model, index:UInt)Local mesh:Mesh = in_model.MeshLocal tri_model:Model = New Modeltri_model.Material = New PbrMaterial (Color.Red)tri_model.Material.CullMode = CullMode.NoneAssert (index + 2 < mesh.NumIndices , "index too high") ' Think that's right...Local indices:=mesh.GetIndices()Local tri_verts:Vertex3f [] = New Vertex3f [3]' mesh-local co-ords...tri_verts [0] = mesh.GetVertex (indices[index + 0])tri_verts [1] = mesh.GetVertex (indices[index + 1])tri_verts [2] = mesh.GetVertex (indices[index + 2])Local tri_indices:UInt [] = New UInt [3]tri_indices [0] = 0tri_indices [1] = 1tri_indices [2] = 2Local tri_mesh:Mesh = New Mesh (tri_verts, tri_indices)' tri_mesh.AddMesh (tri_mesh)tri_mesh.UpdateNormals ()tri_mesh.UpdateTangents ()tri_model.Mesh = tri_meshReturn tri_modelEndClass Game Extends WindowConst SHIFT_BOOST:Float = 5.0Field camera_boost:Float = 1.0' Basic 3D scene requirements...Field scene:SceneField camera:CameraField light:Light' Test cube...Field cube:ModelMethod New (title:String, width:Int, height:Int, flags:WindowFlags)Super.New (title, width, height, flags)scene = Scene.GetCurrent () ' Important!camera = New Camera' Camera settings...camera.Near = 0.1' Camera position...camera.Move (0, 0, -2)'camera.Viewport = Window.Rectlight = New Lightlight.Move (-10, 10, -10)' cube = Model.CreateBox (New Boxf (-0.5, -0.5, -0.5, 0.5, 0.5, 0.5), 1, 1, 1, New PbrMaterial (Color.Aluminum))' cube.Rotate (0, 45, 0)' This is... beautiful!cube = Model.CreateSphere (0.5, 32, 32, New PbrMaterial (Color.Aluminum))Local ticks:Int = Millisecs ()For Local loop:UInt = 0 Until cube.Mesh.NumIndices Step 3Print loopLocal test:Model = ModelFromTriangle (cube, loop)' test.Move (loop*0.125, 0, 1)test.Move (0, 0, 1)Next' Hide original!cube.Visible = FalsePrint Millisecs () - ticksEndMethod UpdateGame:Void ()EndMethod OnRender (canvas:Canvas) OverrideProcessInput ()UpdateGame ()cube.Rotate (0.0, 1.0, 0.0)' Tell app to draw frame when ready...RequestRender ()' Render scene to canvas (passed to OnRender by mojo), from camera...scene.Render (canvas)canvas.DrawText ("VP:" + camera.Viewport, 20, 20)EndMethod ProcessInput:Void ()If Keyboard.KeyHit (Key.Space) Then light.CastsShadow = Not light.CastsShadowIf Keyboard.KeyDown (Key.LeftShift)camera_boost = SHIFT_BOOSTElsecamera_boost = 1.0EndifIf Keyboard.KeyHit (Key.Escape) Then App.Terminate ()If Keyboard.KeyDown (Key.A)camera.Move (0.0, 0.0, 0.1 * camera_boost)EndifIf Keyboard.KeyDown (Key.Z)camera.Move (0.0, 0.0, -0.1 * camera_boost)EndifIf Keyboard.KeyDown (Key.Left)camera.Rotate (0.0, 1.0, 0.0)EndifIf Keyboard.KeyDown (Key.Right)camera.Rotate (0.0, -1.0, 0.0)EndifIf Keyboard.KeyDown (Key.Up)camera.Rotate (1.0, 0.0, 0.0, True)EndifIf Keyboard.KeyDown (Key.Down)camera.Rotate (-1.0, 0.0, 0.0, true)EndifEndEndFunction Main ()' Windowed mode...' Local width:Int = 640' Local height:Int = 480' Local flags:WindowFlags = WindowFlags.Center' Full-screen mode (comment out above)...Local width:Int = 1024Local height:Int = 768Local flags:WindowFlags = WindowFlags.Center'FullscreenNew AppInstanceNew Game (AppName, width, height, flags)App.Run ()EndFixed some issues with my super smooth scrolling involving moving texture coordinate from outside to inside the gutters. Now adding some drawing primitives with same large gutter attribute.
Monkey123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690#Import "<std>"#Import "<mojo>"#Import "<mojox>"#Import "<mojolabs>"#Import "modular.theme.json"Using std..Using mojo..Using mojox..Alias DRect:Rect<Double>Const MinZoom:Double=0.5Const MinWidth:=32Const MinHeight:=24Const DefaultWindowFlags:WindowFlags=WindowFlags.HighDPI|WindowFlags.ResizableAlias JsonFields:StringMap<JsonValue>Struct PrefsField skin:="asset::modular.theme.json"Field top:Int=35Field bottom:int=120Field left:int=250Field right:Int=250Field menuwidth:Int=200Field toolswidth:Int=480Field scale:Double=1.0Field frame:Recti=New Recti(100,100,1720,1280)Field fullscreen:BoolMethod Invalid:Bool()Return frame.Width < MinWidth Or frame.Height<MinHeightEndFunction JsonRect:JsonObject(rect:Recti)Local json:=New JsonObject()json["top"]=New JsonNumber(rect.Top)json["bottom"]=New JsonNumber(rect.Bottom)json["left"]=New JsonNumber(rect.Left)json["right"]=New JsonNumber(rect.Right)Return jsonEndFunction RectJson:Recti(obj:JsonFields)Local x0:=obj["left"].ToNumber()Local y0:=obj["top"].ToNumber()Local x1:=obj["right"].ToNumber()Local y1:=obj["bottom"].ToNumber()Return New Recti(x0,y0,x1,y1)EndMethod ToJson:JsonObject()Local json:=New JsonObject()json["skin"]=New JsonString(skin)json["top"]=New JsonNumber(top)json["bottom"]=New JsonNumber(bottom)json["left"]=New JsonNumber(left)json["right"]=New JsonNumber(right)json["menuwidth"]=New JsonNumber(menuwidth)json["toolswidth"]=New JsonNumber(toolswidth)json["scale"]=New JsonNumber(scale)json["frame"]=JsonRect(frame)json["fullscreen"]=New JsonBool(fullscreen)Return jsonEndMethod FromJson:Prefs(json:JsonObject)skin=json["skin"].ToString()top=json["top"].ToNumber()bottom=json["bottom"].ToNumber()left=json["left"].ToNumber()right=json["right"].ToNumber()menuwidth=json["menuwidth"].ToNumber()toolswidth=json["toolswidth"].ToNumber()scale=json["scale"].ToNumber()If json.Contains("fullscreen")fullscreen=json["fullscreen"].ToBool()EndifIf json.Contains("frame")frame=RectJson(json["frame"].ToObject())EndifReturn SelfEndEndFunction AlphaRing:Image()Local d:=512Local r:=32Local pix:=New Pixmap(d,d,PixelFormat.A8)For Local y:=0 Until dFor Local x:=0 Until dLocal dx:=x-d/2Local dy:=y-d/2Local rr:Double=(dx*dx+dy*dy)-r*rLocal a:=0If rr<0a=255Elseif rr<512a=11.2*Sqrt(512-rr)EndifLocal p:=pix.PixelPtr(x,y)p[0]=aNextNextLocal texture:=New Texture(pix,TextureFlags.FilterMipmap)Return New Image(texture)EndAlias XY:Vec2<Double>Alias Quad:RectfAlias Radius:DoubleClass ShapeMethod Plot(xy:XY,r:Radius)EndEndClass TubeConst MaxCount:=64Field verts:=New Float[MaxCount*4]Field uv:=New Float[MaxCount*4]Field indices:=New Int[MaxCount*6]Field pos:XYField pos1:XYField gutter:DoubleField thick:DoubleField count:IntMethod New()For Local i:=0 Until MaxCountindices[i*6+0]=i*2+0indices[i*6+1]=i*2+2indices[i*6+2]=i*2+1indices[i*6+3]=i*2+1indices[i*6+4]=i*2+2indices[i*6+5]=i*2+3NextEndMethod start(xy:XY,width:Double)pos=xythick=widthgutter=0.25count=1EndMethod move(xy:XY)Local dir:=(xy-pos).Normalize()If count=1uv[0]=0.0+gutteruv[1]=0.0+gutteruv[2]=0.0+gutteruv[3]=1.0-gutterverts[0]=pos.X+(dir.Y-dir.X)*thickverts[1]=pos.Y-(dir.X+dir.Y)*thickverts[2]=pos.X-(dir.Y+dir.X)*thickverts[3]=pos.Y+(dir.X-dir.Y)*thickuv[4]=0.5uv[5]=0.0+gutteruv[6]=0.5uv[7]=1.0-gutterverts[4]=pos.X+dir.Y*thickverts[5]=pos.Y-dir.X*thickverts[6]=pos.X-dir.Y*thickverts[7]=pos.Y+dir.X*thickcount=2Endifuv[count*4+0]=0.5uv[count*4+1]=0.0+gutteruv[count*4+2]=0.5uv[count*4+3]=1.0-gutterverts[count*4+0]=xy.X+dir.Y*thickverts[count*4+1]=xy.Y-dir.X*thickverts[count*4+2]=xy.X-dir.Y*thickverts[count*4+3]=xy.Y+dir.X*thickpos1=pospos=xycount+=1EndMethod finish(canvas:Canvas,circle:Image)Local dir:=(pos-pos1).Normalize()verts[count*4+0]=pos.X+(dir.Y+dir.X)*thickverts[count*4+1]=pos.Y-(dir.X-dir.Y)*thickverts[count*4+2]=pos.X-(dir.Y-dir.X)*thickverts[count*4+3]=pos.Y+(dir.X+dir.Y)*thickuv[count*4+0]=1.0-gutteruv[count*4+1]=0.0+gutteruv[count*4+2]=1.0-gutteruv[count*4+3]=1.0-gutterLocal order:=3Local primCount:=count*2Local verts0:=Varptr verts[0]Local uv0:=Varptr uv[0]Local indices0:=Varptr indices[0]canvas.DrawPrimitives(order,primCount,verts0,8,uv0,8,Null,4,circle,indices0)EndEndClass ContextField circle:=AlphaRing()Field vrect3:=New Recti(256-64,256,256+64,256)Field hrect3:=New Recti(256,256-64,256,256+64)Field target:CanvasField tube:TubeMethod BeginPaint(canvas:Canvas)target=canvastarget.BlendMode=BlendMode.Alphatarget.Translate(0,0)tube=New TubeEndMethod VLin(quad:Quad)target.DrawRect(quad,circle,vrect3)EndMethod HLin(quad:Quad)target.DrawRect(quad,circle,hrect3)EndMethod Origin(xy:XY)target.Translate(xy.X,xy.Y)EndMethod Zoom(z:Float)target.Scale(z,z)EndMethod Plot(xy:XY,r:Radius)Local quad:=New Quad(xy.X-r,xy.y-r,xy.X+r,xy.y+r)target.DrawRect(quad,circle)EndMethod Line(p0:XY,p1:XY,r0:Radius)tube.start(p0,r0)tube.move(p1)tube.finish(target,circle)EndMethod Draw(shape:Shape)EndMethod EndPaint()target=NullEndEndGlobal prefs:=New Prefs()Global PrefsPath:=(AppPath()+".prefs")Class Grid Extends ViewField bg:=Color.SilverField fg:=Color.GreyField shape:=New ShapeField context:=New ContextField org:XYField vel:XYField grid:=32Field zoom:=2.5Method New()shape.Plot(New XY(0,0),10)EndMethod OnUpdate()org+=velvel*=0.972EndField mouseXY:Vec2iMethod OnMouseEvent( event:MouseEvent ) OverrideLocal xy:=event.LocationIf event.Type=EventType.MouseWheelzoom+=event.Wheel.y/16.0ReturnEndifIf event.Type=EventType.MouseDownvel*=0mouseXY=xyEndifIf event.Type=EventType.MouseUpEndifIf event.Type=EventType.MouseMove And event.ButtonLocal delta:=xy-mouseXYvel=vel*0.5+deltaEndifmouseXY=xyEndMethod OnKeyEvent( event:KeyEvent ) OverrideLocal mask:=event.ModifiersIf mask&Modifier.Control And event.Type=EventType.KeyDown' Select event.Key' EndEndifSuper.OnKeyEvent(event)EndMethod OnRender(canvas:Canvas) OverrideOnUpdate()context.BeginPaint(canvas)Local w:=canvas.Viewport.WidthLocal h:=canvas.Viewport.Heightcanvas.Clear(bg)canvas.Color=fgLocal thick:=Abs(zoom)Local g:=grid*thickLocal wide:Int=1+w/gLocal hi:Int=1+h/gLocal oy:=((org.Y Mod g)-g)Mod gLocal ox:=((org.X Mod g)-g)Mod gLocal iy:Int=math.Floor(-org.y/g)For Local y:=oy To h Step gLocal th:=thick * ((iy&3) ? 1 Else 2)Local rect:=New Rectf(0,y-th,w,y+th)' canvas.DrawRect(rect)' canvas.DrawRect(rect,circle,hrect2)context.HLin(rect)iy+=1NextLocal ix:Int=math.Floor(-org.x/g)For Local x:=ox To w Step gLocal th:=thick * ((ix&3) ? 1 Else 2)Local rect:=New Rectf(x-th,0,x+th,h)' canvas.DrawRect(rect)' canvas.DrawRect(rect,circle,vrect2)context.VLin(rect)ix+=1Nextcontext.Origin(org)context.Zoom(zoom)context.Plot(New XY(50,50),20)context.Line(New XY(150,150),New XY(250,200),10)' for each layercontext.Draw(shape)context.EndPaint()RequestRender()EndEndClass ModularWindow Extends WindowField docks:DockingViewField topView:DockingViewField bottomView:TabViewField leftView:ViewField rightView:TabViewField content:TabViewField menubar:MenuBarField toolbar:GridViewField commandline:TextFieldField scale:DoubleField frame:RectiMethod New()Super.New("Modular",prefs.frame,DefaultWindowFlags)Fullscreen=prefs.fullscreenSetTheme(prefs.skin)AddDocks()SetZoom(prefs.scale)EndFunction Reset()libc.rename(PrefsPath,PrefsPath+".old")libc.remove(PrefsPath)App.Terminate()EndMethod Save()prefs.top=topView.Heightprefs.bottom=bottomView.Heightprefs.left=leftView.Widthprefs.right=rightView.Widthprefs.menuwidth=menubar.Widthprefs.scale=scaleprefs.frame=frameprefs.fullscreen=FullscreenLocal obj:=prefs.ToJson()Local str:=obj.ToJson()SaveString(str,PrefsPath)EndMethod OnWindowEvent( event:WindowEvent ) OverrideSelect event.TypeCase EventType.WindowCloseSave()Case EventType.WindowMovedIf Not Fullscreen And Not Maximized And Not Minimizedframe=FrameEndifCase EventType.WindowResizedIf Not Fullscreen And Not Maximized And Not MinimizedPrint "Size"frame=FrameSetZoom(scale)EndifEndSuper.OnWindowEvent(event)End' triggersMethod Cut()EndMethod Copy()EndMethod Paste()EndMethod Create()EndMethod Open()EndMethod Close()Save()EndMethod Quit()Save()App.Terminate()EndMethod ToggleFullscreen()If Not Fullscreen frame=FrameFullscreen=Not FullscreenEndMethod ToggleMaximized()If Not FullscreenIf MaximizedRestore()ElseMaximize()EndifEndifEndMethod SetZoom(zoom:Double)scale=Max(zoom,MinZoom)prefs.scale=scaleApp.Theme.Scale=New Vec2f( scale,scale )EndMethod CreateCommandLine:TextField()Return New TextField(">",8192)EndMethod AddDocks()menubar=CreateMenu()toolbar=CreateTools()topView=New DockingViewcommandline=CreateCommandLine()topView.ContentView=commandlinetopView.AddView(menubar,"left",prefs.menuwidth,true)topView.AddView(toolbar,"right",prefs.toolswidth,True)bottomView=CreateTabs()leftView=CreateFileTree()content=CreateTabs()rightView=CreateTabs()docks=New DockingViewdocks.AddView(topView,"top",prefs.top, True)docks.AddView(bottomView,"bottom",prefs.bottom,True)docks.AddView(leftView,"left",prefs.left,True)docks.AddView(rightView,"right",prefs.right,True)docks.ContentView=contentLocal grid:=New Grid()Local sceneTree:=CreateTree()AddTab(rightView,"Scene",sceneTree)AddTab(bottomView,"Help",New HtmlView())AddTab(content,"Grid",grid)ContentView=docksdocks.ContentView.MakeKeyView()EndFunction DirectoryTree( path:String,parent:TreeView.Node )For Local f:=Eachin LoadDir( path )Local p:=path+"/"+fLocal node:=New TreeView.Node( f,parent )If GetFileType( p )=FileType.Directory DirectoryTree( p,node )NextEndMethod CreateTools:GridView()Local bar:=New GridView(8,2)bar.AddView(New Button("Grab"),0,0)bar.AddView(New Button("Select"),0,0)bar.AddView(New Button("Plot"),1,0)bar.AddView(New Button("Edit"),2,0)Return barEndMethod CreateMenu:MenuBar()Local fileMenu:=New Menu( "File" )Local recentFiles:=New Menu( "Recent Files..." )Local editMenu:=New Menu( "Edit" )AddAction(editMenu,"Cut",Key.X,Modifier.Control).Triggered=CutAddAction(editMenu,"Copy",Key.C,Modifier.Control).Triggered=CopyAddAction(editMenu,"Paste",Key.V,Modifier.Control).Triggered=PasteLocal viewMenu:=New Menu( "View" )AddAction(fileMenu,"New",Key.N,Modifier.Control).Triggered=CreateAddAction(fileMenu,"Open",Key.O,Modifier.Control).Triggered=OpenAddAction(fileMenu,"Close",Key.W,Modifier.Control).Triggered=CloseAddAction(fileMenu,"Quit",Key.Q,Modifier.Alt).Triggered=QuitAddAction(viewMenu,"Fullscreen",Key.F11).Triggered=ToggleFullscreenAddAction(viewMenu,"Maximized",Key.F12).Triggered=ToggleMaximizedAddAction(viewMenu,"Zoom In",Key.Equals,Modifier.Control).Triggered=ZoomInAddAction(viewMenu,"Zoom Out",Key.Minus,Modifier.Control).Triggered=ZoomOutLocal helpMenu:=New Menu( "Help" )AddAction(helpMenu,"Reset to Factory Defaults").Triggered=ResetLocal menuBar:=New MenuBarmenuBar.AddMenu( fileMenu )menuBar.AddMenu( editMenu )menuBar.AddMenu( viewMenu )menuBar.AddMenu( helpMenu )Return menuBarEndFunction AddAction:Action(menu:Menu,name:String,hotkey:Key=Key.None,modifiers:Modifier=Modifier.None)Local action:=New Action(name)action.HotKey=hotkeyaction.HotKeyModifiers=modifiersmenu.AddAction(action)Return actionEndMethod AddTab(tabView:TabView, title:String, content:View)tabView.AddTab( title,content )tabView.CurrentIndex=0EndMethod CreateTabs:TabView()Local tabView:=New TabView( TabViewFlags.ClosableTabs|TabViewFlags.DraggableTabs )tabView.RightClicked=Lambda()Local menu:=New Menumenu.AddAction( "Action 1" )menu.AddAction( "Action 2" )menu.AddAction( "Action 3" )menu.Open()EndtabView.CloseClicked=Lambda( index:Int )tabView.RemoveTab( index )If tabView.CurrentView Or Not tabView.NumTabs ReturnIf index=tabView.NumTabs index-=1tabView.CurrentIndex=indexEndReturn tabViewEndMethod CreateTree:TreeView()Local treeView:=New TreeViewtreeView.NodeClicked+=Lambda( node:TreeView.Node )Alert( "Node clicked: node.Text=~q"+node.Text+"~q" )EndtreeView.NodeExpanded+=Lambda( node:TreeView.Node )' Alert( "Node expanded: node.Text=~q"+node.Text+"~q" )EndtreeView.NodeCollapsed+=Lambda( node:TreeView.Node )' Alert( "Node collapsed: node.Text=~q"+node.Text+"~q" )EndtreeView.RootNode.Text="Origin"' DirectoryTree( dir,treeView.RootNode )Return treeViewEndMethod CreateFileTree:TreeView()Local treeView:=New TreeViewtreeView.NodeClicked+=Lambda( node:TreeView.Node )Alert( "Node clicked: node.Text=~q"+node.Text+"~q" )EndtreeView.NodeExpanded+=Lambda( node:TreeView.Node )' Alert( "Node expanded: node.Text=~q"+node.Text+"~q" )EndtreeView.NodeCollapsed+=Lambda( node:TreeView.Node )' Alert( "Node collapsed: node.Text=~q"+node.Text+"~q" )EndtreeView.RootNode.Text=CurrentDir()DirectoryTree( CurrentDir(),treeView.RootNode )Return treeViewEndMethod AddUI()Local list:=New ListViewlist.AddItem( "listview" )list.ItemClicked+=Lambda( item:ListView.Item )Local index:=list.IndexOfItem( item )Print "Item "+index+" clicked"EndContentView=listEndMethod SetTheme(path:String)App.Theme.Load( path )EndMethod ZoomIn()SetZoom(prefs.scale+0.0625)EndMethod ZoomOut()SetZoom(prefs.scale-0.0625)EndEndFunction Main()' mojolabs.EnableHighDPI()New AppInstanceLocal filePrefs:=JsonObject.Load(PrefsPath)If filePrefsprefs.FromJson(filePrefs)If prefs.Invalid()ModularWindow.Reset()Print "Invalid Prefs - invoked Factory Reset"ReturnEndifEndifNew ModularWindowApp.Run()EndI managed to find docs for LoadDir function in std.filesystem docs using the Docs tree in Ted2Go.
I was unable to get google to find the same page using “monkey2 function contents of directory” search query -from cursory glance the monkey2 online docs don’t look search engine friendly.
As opposed to what? The behavior is correct and reflects how casting to signed and unsigned data types works with all computer languages where a byte is defined as an 8 bit binary value.
Some reasons to not publish monkey2 on steam at this time in no particular order:
– steam is not a thing on embedded platforms such as pi
– required windows toolchains are either freetarded or license crippled hence difficult to support
– poor user experience for atypical zero knowledge steam user
– blitzmax game developers rock
– publishing banana showcase may be better first stepNope – due to a number of factors the original monkey2 on Steam plan got shelved. There is a usable Steamworks module that I am happy to share with anyone serious about publishing on Steam.
An updated steamstub for BlitzMax did happen a while back for the likes of Counter Strike 2D and 3030 Death War Redux both of which seem to be doing pretty good.
-
AuthorPosts