About Monkey 2 › Forums › General Discussion › Gear3D on BlitzMax NG
This topic contains 3 replies, has 1 voice, and was last updated by Yue 3 weeks, 5 days ago.
-
AuthorPosts
-
February 3, 2019 at 6:18 am #16037
Yue
ParticipantI’ve managed to load the Gear3D freeware into BlitzMax NG. I guess this is a new learning process as I retake my Gear3D engine project. The interesting thing is that BlitzMax NG offers certain new things in relation to the native BlitzMax and that sounds very attractive to me. Well, it’s light for my computer system. So here begins my new adventure to learn more about Object Oriented programming. ?
Translated with http://www.DeepL.com/Translator
February 3, 2019 at 11:05 pm #16039
Yue
ParticipantMonkey
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849'********************************************************'# Module : Gear3D for Windows #'# Url : http://www.iris3dgames.ga #'# Programmer : Yue Rexie #'# Compiler : BlitzMax NG - http://www.blitzMax.org #'# #'#*******************************************************SuperStrictModule iris3dgames.gear3dModuleInfo "Name :Gear3D For Windows"ModuleInfo "Versión : 0.0"ModuleInfo "Copyright: LGPL. Iris3D Games"ModuleInfo "URL: http://www.iris3dgames.ga"Import pub.win32Local lib:Byte Ptr = LoadLibraryW("Gear3D.dll")Global InitG3D:Byte Ptr(alto%,ancho%) "win32"Global SetAppTitle:Byte Ptr(titulo$z) "win32"Global RenderStage:Byte Ptr() "win32"Global FlipStage:Byte Ptr() "win32"If lib% ThenInitG3D% = GetProcAddress(lib,"_InitG3D")SetAppTitle% = GetProcAddress(lib,"_SetAppTitle")RenderStage% = GetProcAddress(lib,"_RenderStage")FlipStage% = GetProcAddress(lib,"_FlipStage")ElseRuntimeError("Invalid Load lib!")End If' Includes.Include "Types\TG3D.bmx"The tests carried out at the moment, seem to show good results when creating a 3d module for windows with BlitzMax NG.
The most pleasant thing is to understand certain things such as encapsulation among other things focused on object-oriented programming.
Monkey
12345678910111213141516Framework iris3dgames.gear3dImport brl.basicSetAppTitle("Gear3D")TG3D.Start()RepeatRenderStage()FlipStage()Forever?
February 6, 2019 at 4:33 am #16053
Yue
ParticipantMonkey
123456789101112131415161718Framework iris3dgames.gear3dImport brl.basic'TApp.SetFullScreen()TApp.SetTitle("Gear3D | v.0.1 | Alpha")Local App:TApp = TApp.InitG3D(800,600)RepeatApp.ClsScreen()App.RenderStage()App.DrawText(20,20,"Hello World!")App.DrawText(20,40,App.GetBtnX("WM_CLOSE"))App.DrawText(20,60,App.GetFps())App.FlipStage()Until App.GetKeyHit(1) Or App.GetBtnX("WM_CLOSE")This is really crazy, when you don’t understand something I have to use brute force to understand it. And the FindWindowA command was the nightmare. But I already have a way to exit the application using the keys or when it is recognized that the X button on the title bar has been pressed.
February 6, 2019 at 9:07 pm #16056
Yue
ParticipantThis is usually fun when you already have a vague idea of what you want to do, and you have the necessary knowledge to try to carry out a project.
Today’s tests are successful, I can dump the module commands for BlitzMax NG to program in Lua Script, just add a small modification to each command, a letter at the beginning of each. For example.
Monkey
1234TApp.SetTitle("Game") // Module on BlitzMax NG.TApp.sSetTitle("Game") // Lua Script. -
AuthorPosts
You must be logged in to reply to this topic.