Jump to content

Paul

Members
  • Posts

    83
  • Joined

  • Last visited

Everything posted by Paul

  1. Paul

    Any headers?

    True you can't return typed structures from procedures, but you can return the pointer though there is no type safety then. Procedure.i GetThingMatrix (*athing.TThing , atry.l) Protected result.TVec16 leGetThingMatrix(*athing, atry, result) ProcedureReturn result EndProcedure I really have no intention myself of using Leadwerks with PureBasic, as you can see PureBasic is too limited when dealing with 3rd party libraries. I'm doing this if anyone else wants to use PureBasic, though there really doesn't appear to be much interest.
  2. Paul

    Any headers?

    Never mind turns out PureBasic doesn't use them. I forgot to prefix the #. Which version of the manual you have? 4.40 returns them fine. Sorry? A procedure is PureBasic's version of a function.
  3. Paul

    Any headers?

    Another thing PureBasic doesn't have a line continuation symbol, so things like the multi-line arguments of Vec6, Vec9 and Vec16 have to be all on one line.
  4. Paul

    Any headers?

    Basically to get it working I've added these macros and functions. To make Initialize and Terminate consistent with the rest of the Leadwerks functions they are too prefixed with Le. Procedure lePrint(string.s) Static con=#False If con=#False con=OpenConsole() EndIf If con PrintN(string) EndIf EndProcedure Procedure ExitFunc(lib.i,f.s) lePrint("ERROR: unable to find DLL function: "+f) CloseLibrary(lib) lePrint("PRESS ENTER TO EXIT.") Input() EndProcedure Global le_lib.i=#Null Macro DoubleQuote " EndMacro Macro _leInitFunc(a) Global Le#a#.LE#a=GetFunction(le_lib,DoubleQuote#a#DoubleQuote) If Le#a=#Null ExitFunc(le_lib,DoubleQuote#a#DoubleQuote) ProcedureReturn 0 EndIf EndMacro Macro _leInitAllFuncs() _leInitFunc(RegisterAbstractPath); _leInitFunc(AbstractPath); _leInitFunc(Graphics); ... and so on... EndMacro Macro _leInitialize(le_dll) le_lib=OpenLibrary(#PB_Any,le_dll) If le_lib _leInitAllFuncs() Else lePrint(le_dll+" can't be loaded.") EndIf EndMacro Procedure.l LeInitialize(allowenginedebug.l=1) Protected dllfilename.s If allowenginedebug=1 CompilerIf #PB_Compiler_Debugger=1 dllfilename="engine.debug.dll" CompilerElse dllfilename="engine.dll" CompilerEndIf Else If allowenginedebug=2 dllfilename="engine.debug.dll" Else dllfilename="engine.dll" EndIf EndIf _leInitialize(dllfilename) ProcedureReturn (#Null<>le_lib) EndProcedure Procedure LeTerminate() LeEndRender() CloseLibrary(le_lib) le_lib=#Null EndProcedure If you do want the commands with their original names (no Le in front). I've made a list of macros that follow like this: Macro RegisterAbstractPath : LeRegisterAbstractPath : EndMacro Macro AbstractPath : LeAbstractPath : EndMacro Macro Graphics : LeGraphics : EndMacro ... However the must appear after the LeInitialize() function.
  5. Paul

    Vegetation API?

    But everything Framework does can be done manually right?
  6. Paul

    Any headers?

    Ok, I've done abit of work on the generated header. It works like the c header using macros to load the functions, a better way would be making a proper PureBasic lib (which I wont attempt just yet). I have managed to get a simpe example working If Initialize() SetAppTitle("Hello World (window title)") Graphics(640,480) CreateWorld() Repeat DrawText("Hello World!",32,32) UpdateWorld() Flip() Until keyHit(27) Or AppTerminate() Terminate() EndIf However I've had to use alot of macro trickery to replace some of PureBasic's own commands as there seems to be no way to exclude libraries. Also some constants are ignored by PureBasic because they conflict with its own of the same name, thats why I'm using 27 instead of #KEY_ESCAPE.
  7. Paul

    Any headers?

    Do any headers exist for PureBasic? If not I could try to make some if any one is interested.
  8. Paul

    Vegetation API?

    Does LoadScene process the vegetation or is setting up Framework required?
  9. Thanks. It worked after afew tries, does the editor read from a cache or something? It didn't seem to notice the shader file at first.
  10. Is there a way to make vegetation layers via code? For example terrain can be created and modified with the terrain commands, do any vegetation commands exist? I could only find SetVegetationShadowMode().
  11. Some of the tree and grass vegetation from the European Nature pack has black polygons
  12. Paul

    Easy language

    For( Define( Int, i ), 1, 10 ) Looks like LISP and C had a ******* child.
  13. '=' assigns the variable a value.If they choose this preprocessor mess to program in they should never be allowed to program.
  14. 'Call()' to call a function? 'Define()' to make a variable? Who in their right mind would use this abomination?
  15. Just the smoothness and the darkish color looked out of place, then again I didn't have any post processing FX.
  16. How would I hide the edge of the terrain and the water plane from the player? When I add the water plane it gives the effect the terrain is surrounded by water when land would be more suitable, however I still need lakes.
  17. I'm trying to go for a FPS with an open area kind of style, my biggest problem is with forest_grass which I think is from the textures pack. The terrain is 1024x1024 1m.
  18. One problem is the scaling, too low and the texture looks unnaturally smooth in the distance, too high and its pixelated at close range.
  19. Is this being shown in the leadwerks engine? Did you get L3DT or Leadwerks editor to place the textures? I usually make something in L3DT, export the heightmap to Leadwerks editor and use the terrain paint settings to automatically place the textures. I end up with some stripey or splotchy mess, and the textures don't blend in well together.
  20. Can anyone suggest terrain editing software and textures? Currently I'm using L3DT standard but having difficulty making the terrain how I want it. I also need some suggestions on textures, I'm using the ones that came with the leadwerks engine and the texture pack but on my terrain they look an eyesore; I can't get my terrain to look natural like the ones in the Gallery.
  21. Blitzmax doesn't actually use the dll, the modules contain the engine. From what I understand the engine.dll was created in Blitzmax.
  22. More than likely Debug mode is catching problem that is going unnoticed in Release mode.
  23. Nice. Did you do all the models too?
×
×
  • Create New...