Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / The Matrix1Utils plugins collection

Author
Message
Don Malone
20
Years of Service
User Offline
Joined: 27th Apr 2003
Location: Birmingham, Alabama
Posted: 30th Dec 2007 17:13
I want to thank you for your work on these plug-ins.

I have downloaded your plug-ins and in the process of working on adding my own HTML help screen page into the DBP help system to better organize the help categories for my needs; I have really been impressed by what you have added to DBP.

Thanks again.

Don.

Making nothing for the forth straight year; or is it five years now?

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 3rd Jan 2008 11:55
IanM, is there a way to enable limb texture blending using the existing textures? I'm parsing a DBO file and texturing the limbs myself in order to share textures. It has a lightmap applied to stage 0, so I'm texturing the limb's stage 1, but to blend the textures on stage 1 and 0 I have to use a shader. I know that DBP can do it natively because if you load a DBO file it's done automatically, is there a way to expose this functionality?


Come see the WIP!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd Jan 2008 13:32
Quote: "IanM, is there a way to enable limb texture blending using the existing textures? I'm parsing a DBO file and texturing the limbs myself in order to share textures. It has a lightmap applied to stage 0, so I'm texturing the limb's stage 1, but to blend the textures on stage 1 and 0 I have to use a shader. I know that DBP can do it natively because if you load a DBO file it's done automatically, is there a way to expose this functionality?"


That would be awesome if you could. I am using a shader to do this in my projects currently.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 3rd Jan 2008 14:17
I'm using your shader LiT


Come see the WIP!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jan 2008 14:32
I could probably work something out - I'd need the DBO object that does this automatically though. Just zip it up and send it to my email address below and I'll take a look.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd Jan 2008 15:03
Yeah I agree with Cash something like SET LIMB BLEND MAPPING ON Object Number, Limb Number, Stage Index, Image Number, TexCoordMode, Blend Mode would make our DBPro coding better. In my opinion it is faster to use fixed function pipeline for now to achieve these quite simple visual effects. It would work same as the SET BLEND MAPPING ON but would give us the ability to set different blend modes for specific limbs.


ACER Aspire 5920G: Intel Core2Duo T7500 (2.20GHZ), 2GB RAM, NVIDIA GeForce 8600M GT 1280MB Total, DirectX10, DBPro 6.6b
Pixelator
16
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 6th Jan 2008 23:09
could your new commands possibly be used for db classic?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Jan 2008 00:02
There may be a very few of these commands that will work in DBC (via the CALL DLL functions/commands), but I wouldn't guarantee any of them to work correctly. DBC & DBPro use completely different systems of working.

Pixelator
16
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 7th Jan 2008 02:58
i mostly just want the memory banks thingy

Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 22nd Jan 2008 18:52
IanM,

Seems like a minor issue, relatively speaking, but could a unifying menu and hyperlinks to/from it be added to the help files? It's pretty much impossible for me to memorize which of the 20-something files has which command, and it gets very tiresome browsing through each html document trying to figure it out.

Great work writing/compiling all the plugins, by the way.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Jan 2008 19:22
Yeah, I have the same trouble too. Scraggle sent me some code that might help with that in the future.

MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 24th Jan 2008 06:39
IanM,

I am currently working on an Event handling plugin to work with your Util_20 plugin. Thanks for providing such USEFUL functionality.

While working on it though I have run into a bit of a snag. First of all, I am using VB.NET and managed code doesn't like to play nice with unmanaged code.

I am only using two of the functions so far between the DBPro test application and the plugin I am writing (one function in each). The function I am using in my DBPro code is "Get PTR to Next Function" and the function I am using in my plugin is "CallFunctionPtr" without any arguments other than the Long value derived from the first function.

The Event system works swimmingly so far, except for an "System.AccessViolationException: Attempted to read or write protected memory" error that occurs. I have used Try/Catch to bypass it just for testing, and when I do that it works fine until you try to exit the DBPro application. At that point it crashes.

I was wondering if you have any experience with VB.Net or even C# (since I can translate the code) and might have some suggestions as to how to handle this. The best that I can tell from my research into this problem is that it may have to do with a callback not being handled correctly, but since there isn't one exposed in the "CallFunctionPtr" command I am at a loss on how to handle this.

Any help would be appreciated since a good Event handler would be a boon to some other projects I am planning.

Here is the code from my DBPro test app:



As you can see it is pretty simple at this point and pretty self explanatory on the surface (intended that way).

Under the surface, the "DeclareDBPEventHandler" passes a key/value pair to a "System.Collections.Generic.Dictionary(Of TKey, TValue)" list so the appropriate function can be called when an Event is raised. Events that are raised go into a "System.Collections.Generic.Queue(Of T)". The "DBODoEvents" function then just pops each event call out of the cue and uses "CallFunctionPtr" to call the message handler that was defined.

Right now I have the code in place but commented out to handle the overloads to "CallFunctionPtr" so it can deal with the arguments. Once I have this working with just a generic call to the function I will uncomment the code.

If you want a copy of the source to help with the problem, just let me know. I wouldn't have gotten this far without your wonderful plugin.

Design documents?!? What design documents??? I thought we were just going to wing it!!!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Jan 2008 15:20
Quote: "I was wondering if you have any experience with VB.Net or even C#"

Almost none, and absolutely none with regard to calling external DLLs.

I would guess that the low-level stack handling I do within CallFunctionPtr is causing the crash and that the problem is caused by the .NET environment is using it's own stack and that this stack is fairly small (less than 80 bytes).

If this is the case then I don't have a solution for that without slowing the command down for everyone - it's not an issue that occurs with the DBPro stack.

If you want to send me a small example DLL and the code to go with it, I can take a look and see if I get any ideas.

MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 24th Jan 2008 21:04
Here is the code from my plugin. It is a VB.NET class library using VS.NET 2005 and .NET 2.0:



Here is the code for my current test project in DBPro:



Attached is a copy of my plugin as it currently stands with one small change:

For the purpose of this testing I am making two versions of the DBPDoEvents function. One call DBPDoEvents and one called DBPDoEventsMessage.

DBPDoEvents bypasses the exception when CallFunctionPtr is called. In this version it will seem to work correctly until the DBPro window is shut down, at which time it will crash.

DBPDoEventsMessage has a messagebox call that returns the exception when CallFunctionPtr is called.

You can change the appropriate line in the DBPro code to use either version. I hope this helps. I would prefer to make this plugin myself, however if it comes down to it and I am unable to do so for whatever reason I hope you will include this functionality in another Matrix1 plugin.

Design documents?!? What design documents??? I thought we were just going to wing it!!!

Attachments

Login to view attachments
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Jan 2008 23:56
Ok, just to confirm that I understand what your plug-in is trying to do:

- You register a name and an associated function pointer (DeclareDBPEventHandler)
- You queue up function calls by passing the assigned name and their parameters (RaiseDBPEvent)
- You execute them in sequence at a later point (DBPDoEvents)

If that's right, then it can be done as long as strings aren't used as parameters. Every other parameter type is simply a number - strings are a pointer to memory. If you assign a new value to the string after it has been queued then the string will point somewhere else in memory but the old pointer will be used by the DBPDoEvents. It's not likely that will cause a crash (although it could happen), but it's going to cause hard-to-find bugs, especially if that memory has been reused elsewhere.

TBH, I can't really see the utility of this - it seems to be pretty specific to something that you want to accomplish, but not of any real use to anyone else. So, you can try and convince me otherwise (I can be convinced - Diggsey did it with this very plug-in) ...

... or you can continue trying yourself, and start by switching the calling convention to cdecl instead of using stdcall

Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 25th Jan 2008 00:14
IanM

Over the past few months I have been very grateful for your collection of utilities which contains more functionality than I could ever need. There is, however, one more string function that I would really appreciate.

I have the need to be able to compare two strings, one of which contains wildcards (such as *) as in the following imaginary function:

Source$="FUNCTION"
Search$="FUN***ON"
Equality=SAME(Source$,Search$)

during which the variable 'Equality' would be assigned the value 1 in this instance. It is simple enough to create a user function that compares the strings character by character while disregarding the wildcards, but this is a little slow for my purpose since I shall sometimes have thousands of comparisons to make.
MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 25th Jan 2008 02:25 Edited at: 25th Jan 2008 03:28
You are right about the strings of course, and if I had thought about it I would have realized this. That is easily gotten around by using a slightly different method.

The point is that an event system that lets you use custom events and handlers would be very useful. Currently things like BlueGUI use them... but all in all a system like this could cut way down on conditional statements. And as you see the needed commands to accomplish it within the code is cut way down, as is the complexity of the system. An event system is a good jumping off point for other useful code.

Yes, you could do most of that stuff with Pure DBP code and your Util_20 plugin, but it would take a lot more coding in DBP.

For reference look at these threads where people are wishing they had, or trying to make, an event system:

http://forum.thegamecreators.com/?m=forum_view&t=68142&b=1
http://forum.thegamecreators.com/?m=forum_view&t=30150&b=1

Or this thread where I guy made one using pure DBP and your plugin:
http://forum.thegamecreators.com/?m=forum_view&t=113948&b=6

Maybe it is just me that thinks this would be useful... but I doubt it. I know that when I first started using DB back around 2000 (when it was mainly just DBC) I tried to do it with only pure DB code. It didn't work out too well.

If I can't get this working with .NET I might have to bite the bullet and try to learn MFC to get it going. I would prefer to get it working in .NET if at all possible though. It would be easier for me to maintain and expand.

Quote: "... or you can continue trying yourself, and start by switching the calling convention to cdecl instead of using stdcall"


Yes, I had tried cdecl first but I got the error there and then tried stdcall afterwards.

I have this question up on a .NET forum as well in hopes of an answer, this is one of the replies:

Quote: "It certainly sounds like the kind of problem a corrupt stack could cause, however I'm not convinced it is down to the size of the .Net stack.
Raymond Chen has a good blog posting on the subject (like pretty much all his postings are...) and this error definitely fits the pattern.

Unless the DLL is doing something peculiar then stdcall should be the correct calling convention, however if he is manipulating the stack himself there isn't an awful lot you can do if he isn't following the rules 100%."


Hopefully I can get a working solution to this. Starting to go blind here. LOL

EDIT: I realized I never answered your question on whether you understood the function of my code... you had it correct.

EDIT: In response to your suggestion about strings, I changed the EventName parameter to accept a Long type instead. This cut out the crash bug when the DBP app closes. However the DBPDoEventsMessage function still gives the Access Violation. That can be bypassed but that is messy and could introduce hard to find bugs.

At least that is one problem solved.

EDIT: Upon further reflection, I think I am going to go with MFC after all. It will be a pain in the butt having to learn a new language, but I guess in the long run it will pay off. Your framework from your website is a good starting point, but I noticed one thing from the comments in "Commands.h":

Quote: "// All declarations will use the C linkage format. This stops all of those silly names
// you get when using C++ linkage, and makes it easy to call these functions from DBv1.
// You must note however, that because we are using C linkage, these function CANNOT be
// overloaded (if you don't know what that means, then it doesn't matter to you)."


I know what overloading is, and if I am not mistaken it will be necessary to properly do a RaiseEvent command that passes a variable number of arguments.

Would you be willing to share the header files (at the least) for Util_20 so I can get an idea of how you are handling this?

Design documents?!? What design documents??? I thought we were just going to wing it!!!
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 25th Jan 2008 08:51
Hey IanM, have you had a chance to take a look at limb texture blending?


Come see the WIP!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Jan 2008 14:33
Ok, in reverse order:

@Cash,
No, I'm ashamed to say that I haven't. I'm taking a look immediately after I post this message.

@MoomanFL,
The C linkage thing isn't really a great problem. If you stick to C++ linkage then two functions can have the same name in your cource code, but will have different mangled names in your DLL - they can be hard to differentiate between. So I generally use C linkage instead, but ONLY for functions that are being exported and exposed as commands/functions to DBPro.

If you still want to take advantage of overloaded functions for functions with C linkage (to make coding simpler), you can do so without affecting performance. With C++ you can create your different functions as inline functions, and get them to forward their work to the functions with C linkage.



I'll take a look at the rest of what you wrote after I'm done with Cash's request

@Coin,
The way you are using those asterisks doesn't match any of the standard wildcard matching systems I'm familiar with, so I'm afraid you're going to have to explain further or pick one I'm familiar with.

These are the matching engines I am familiar with:
- Unix Shell
- Simple regular expressions
- Extended regular expressions
- Perl regular expressions

Picking one of those would be best, but the further down the list you go the larger the DLL will be and the long it will take to put together.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Jan 2008 20:27
Rather than put an edit into the middle of all of the above, I'm posting again to answer with more detail.

@MoomanFL,
The standard method of passing an unknown number of arguments to a C function is to have at least one parameter, and use '...' as the final parameter. Then you use the varargs macros/functions to access the unknown parameters.

The problem you have is that for vargargs to work you need to have some way of determining when you have the parameters - this is something you don't have.

What I did instead of this was to write code that copied the potential parameters from their current position on the stack to a newly prepared are on the stack, then call the function pointer and finally, clean up the stack. Now at this point, I don't know how many parameters were pushed onto the stack, so I simply choose a number of bytes high enough to copy all of the parameters - that's 80 bytes (10 x 8 bytes, where the 8 bytes is the size of the largest DBPro variable type). As long as the called function has its parameters set up correctly, and the size of all parameters doesn't exceed 80 bytes, it all hangs together.

All of the above was written in assembly because it's difficult to get the level of control needed to do this right.

Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 25th Jan 2008 20:54
IanM

Thanks for the reply. I used asterisks only as an example of what I need; having now looked at what Windows uses for wildcards in, say, its file search utility I think that I ought to have used the ? character instead in my example. The actual character is, however, irrelevant to me; all I need to do is determine whether strings such as "FUNCTION" and "FUN???ON" match each other - ie, nothing more involved than True or False.

I regret that I am a mere and simple programmer in Basic and wouldn't dare venture to suggest one particular matching engine.
MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 25th Jan 2008 22:38 Edited at: 25th Jan 2008 23:30
Coin,

Here is an example program with a function in DBP code that will do what you want:



Hope this helps you.

EDIT: After posting that code, I decided to do an example of another method using some functions from the Ian's plugin. This actually might be a little faster, but I haven't tested them.

Here is the text from the comments that explains how it works:

This works by replacement. It looks for the * character and erases it. It then erases the corresponding positioned character in the other string then when all of the *'s have been replaced it compares the results for a match.

Fu***ion Function
Fu**ion Fuction
Fu*ion Fution
Fuion Fuion = Match



Design documents?!? What design documents??? I thought we were just going to wing it!!!
Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 26th Jan 2008 01:23
MoomanFL

Thanks for your suggestions. I have already written code that can compare strings of equal length character by character while ignoring the wildcards, but I was interested in your replacement method. I have now found by experiment that my code is able to list 497 matches from a comparison of 60298 words in 1584 milliseconds which is about fast enough for my needs. I might have to re-think it if my "dictionary" substantially increases in size, however.

Thanks again.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jan 2008 01:39
Remove$ using position and size everso slightly faster than the equivalent Replace$ function for removing characters from a string.
The searching versions of Remove$ are the same speed as Replace$.

I would probably rewrite the loop to remove the extra Instr function call:


MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 26th Jan 2008 07:05 Edited at: 26th Jan 2008 07:19
Quote: "The problem you have is that for vargargs to work you need to have some way of determining when you have the parameters - this is something you don't have.

What I did instead of this was to write code..."


You're right. That is a BIG problem for me since the only way I could accomplish what I want then is to learn C++ and Assembly to a high degree before I could even THINK about writing this.

My only hope then is that you can be convinced to add this functionality yourself. You have my code from above that outlines the way I was implementing this so far.

The only thing that I can say to your "I don't see the point" argument is that others here evidently do. I understand that you most likely come from a C/C++ background where things are handled with function pointers and messages. Many like me though come from a simpler background (VB, VB.NET, C#, etc.) where things are handled by events. This is a basic language. Powerful, yes... but still it is supposed to be simple.

One of the things I was going to implement was Event Banks... basically a set of separate Message Queues that could be turned on and off. This would allow the user to separate events by function. For example, one event handles Pre-Render, One Post Render, etc. This lets you control what class of functions can run just by switching the Event Bank on or off. Don't want Input events to fire and be handled during a cut scene? Just put all code that raises input events into a Separate Event Bank let it run when you need it, and switch it off during a cutscene. Event Banks could be handled by the "DBPDoEvents" command by giving it a number parameter.

I am sure I haven't even thought of all the ways a system like this could be utilized. And, tricks with your "Call Function Ptr" command not withstanding, the concept is easy to implement... I almost had it in .NET but just couldn't do finish it with the way you were forced to implement your functionality in the necessary command.

Events just make the whole coding experience more intuitive for someone coming from a non-C/C++ background. Hopefully, you will at least seriously consider the idea of putting this functionality in there. If not, I may just add a little bit more to my plugin and release it. It won't have all the features I was hoping for, but it would be better than nothing. I would just have to put a caveat on it though because I am bypassing that Access Violation error.

Ok... now that I am done my shameless begging, let me say that I in NO WAY intended this as a criticism of you. Your plugins are freakin amazing and you have done the DBP community a huge service by making them. I think I can say for us all that coding for DBP just would be much poorer without your contribution. Thank you.

EDIT: BTW... that was a good suggestion on optimizing my StringMatch routine. I don't know how I overlooked that one.

Design documents?!? What design documents??? I thought we were just going to wing it!!!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jan 2008 13:03
Ok, I'll take a more serious look at it.

One thing did strike me almost immediately when I took a look at Diggsey's code - he allows up to 3 arguments of 3 different types, and at that point got to over 100 functions to handle it. I'd need to do the same, and to be honest, I really can't see me writing that amount of code, so the first thing I'll be doing is looking for shortcuts

I'm working on Cash's request first though - written myself a nice little utility that dumps a DBO file out into a text format (currently excluding mesh/bone/animation data - they take up too much room). As it's basically cobbled together from the code that Mike included in the free DGDK release, I'll probably post the code when I'm done into the DGDK forum.

MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 27th Jan 2008 02:49 Edited at: 27th Jan 2008 12:03
Quote: "Ok, I'll take a more serious look at it."


Thanks Ian. Thats all I can ask for.

On the other hand I have run across some information on using unsafe code blocks in C# and I have ported my code over. I am exploring how that might work with this problem since you can work directly with pointers in unsafe C#.

Here is some information I ran across that seems like it could apply to your method of getting the arguements.

Quote: "stackalloc

The keyword "stackalloc" commands the .net runtime to allocate a certain amount of memory on the stack. It requires two things to do so, the type (value types only) and the number of variables you?re allocating the stack for. For example if you want to allocate enough memory to store 4 floats, you can write the following:

float *ptrFloat = stackalloc float [4];

Or to allocate enough memory to store 50 shorts:

short *ptrShort = stackalloc short [50];

stackalloc simply allocates memory, it doesn?t initialize it to any value. The advantage of stackalloc is the ultra-high performance, and it?s up to you to initialize the memory locations that were allocated.

A very useful place of stackalloc could be creating an array directly in the stack. While C# had made using arrays very simple and easy, it still suffers from the disadvantage that these arrays are actually objects instantiated from System.Array and they are stored on the heap with all of the overhead that involves."


Of course I could be totally mistaken on this since this is new territory for me. What is your opinion?

EDIT: As a side note I tried to get your Framework to compile a plugin using VS.NET 2005. I am pretty sure I did something wrong, but darned if I know what it was. The code I added was:

In Commands.h


In Commands.cpp


I have the DirextX SDK and have added the Include and Lib directories to the project. I have manually added this string table entry since it wasn't being added automatically (don't even know if it was supposed to be):



It compiles just fine and I move the dll to the "plugins-user" directory. When I try to run a test program though it says that it can't find the "TestCPP" command I made. EDIT: No worries though, I got Dev-C++ and a different template... it is working. Now to start the learning curve.

As a further side note... you mention in the readme for the Framework that there was a paper by Lee that we are supposed to read. Maybe you could elaborate on what paper, and where to find it... I couldn't determine what you meant.

Design documents?!? What design documents??? I thought we were just going to wing it!!!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jan 2008 14:18
It's getting a little off-topic for this thread, but I'll answer this one.

Your code is incorrect. You have declared an exported function TestCPP in your header with C linkage that returns a DWORD. Then you have defined an exported function TestCPP in your code with C++ linkage that returns an int. The compiler, quite correctly, treats these as completely different functions.

Remove the EXPORT from your function in Commands.cpp and correct the return type and it'll work.

draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 30th Jan 2008 02:39
maybe im missing something, but i cant get the console commands to work, it keeps giving me a syntax error. I have the keywords in the right folder, and the dlls all installed, but it doesnt work...
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 30th Jan 2008 11:13 Edited at: 30th Jan 2008 11:14
IanM,

I love the TCP/UDP Functions! I struggled for weeks attempting to develop iCon (a DB Network Lib accessing Winsock DLL directly). I'm also considering the use of the Function Pointer Commands in my DarkMachine: A DarkBASIC Syntax Scripting Engine.

This Library boosts DBPro power 10 fold. IMHO it should become standard distrution w/ DBPro. Truly appreciate this awesome Utility Library.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Jan 2008 14:32 Edited at: 30th Jan 2008 14:36
And I appreciate you saying so. Thanks.

I'm not sure about making it a part of the official distro. At the moment, I have full control over what I work on, when, and when I ship - If I lost that, it could end up being just another job to me, and where's the fun in that?

I might ask Steve if we could do something for the newsletter at some point to raise the profile of these plug-ins a bit though.

@draknir_,
Did you unzip the files correctly to the right places?
Check that when you unzipped the files you didn't disable the 'maintain directory structure' tick box if you are using winzip.

You need to ensure that the DLL's are in the Compilerplugins-user folder, the ini files are in EditorKeywords folder and that the html files are in the Help folder and below.

Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 30th Jan 2008 20:38 Edited at: 30th Jan 2008 20:41
In case it's of interest to anyone else, here's an index file with descriptions for the command sets I made. Drop it in your Help folder and edit main.htm to link to it and you should be able to work with the commands a lot easier.

(Ninja disclaimer: This is just a quick hack I made to make life easier, don't go crying to IanM or me if it blows your PC up, etc etc.)

Attachments

Login to view attachments
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd Feb 2008 18:40
Hmm, I was quite frustrated that DATAFILE command set does not have a command to save BANKS to a file. Quite strange if you ask me. WRITE DATAFILE BANK file_num,bank_num would be very nice. Thanks.


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 6.6b
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2008 00:03
... but not frustrated enough to write your own huh?

Until I add save/load bank as extra commands, use these:


These will be 100% compatible with any commands I do add to do this.

There are probably dozens of commands that I could add - but considering there are 561 commands in these plug-ins, without counting the variations available for each command, it's not surprising I miss a few

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Feb 2008 04:50 Edited at: 4th Feb 2008 04:57
dbGetLimbTransparency in Matrix1Util 12 is supposed to return a value but the string table does not show this:



There is also an extra command for APPEND LIMB in the string table that is a duplicate which does not return a value.



Also in Matrix1Util 21 there is an extra parameter 'Zone' which should is the return parameter and should not be in the parameter list.



http://3dfolio.com
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2008 08:12
Quote: "dbGetLimbTransparency"

Yes, that's an error.

Quote: "extra command for APPEND LIMB"

That's correct.

Quote: "Matrix1Util 21 there is an extra parameter 'Zone'"

Not sure what you think is the problem there, but they are missing the return parameter.

The error will all be fixed in the next release

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Feb 2008 09:32 Edited at: 4th Feb 2008 09:36
I wrote a routine to scan my hard drive for all *.dbo files and store the result in a seperate file. I was suprised at how much quicker it runs if the DBP window is minimised - it takes about 15 minutes to perform the scan with the DBP window open and about 20 seconds if it is minimised!

The upshot being, I used your Window manipulation plugin (util 13) to grab the handle of the DBP window and minimise it, then restore it when the scan is complete.

However, I have a second window which I created using BlueGUI which shows the progress of the scan and having that open doesn't hinder the performance. So, I would like to be able to keep it open without the user having to click it in the taskbar after the DBP window has been minimised.

I tried various methods but none of them seem to work. I tried:
SET ACTIVE WINDOW blueGUIhandle
RESTORE WINDOW blueGUIhandle
and
BRINGTOFRONT blueGUIhandle ( A blueGUI command )

Will any of your commands bring a window to the front when the main DBP window is minimised? If not, do you know of a way to do it? I'm sure it must be possible because I can click the taskbar to open the progress window but I would prefer it if I didn't have to.

Thanks



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2008 15:10
Quote: "grab the handle of the DBP window and minimise it, then restore it"

HIDE WINDOW/SHOW WINDOW?

Does the Blue window also hide when you hide the main window? Have you tried creating it as a topmost window?

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Feb 2008 16:17
SHOW WINDOW only works for the main DBP window.

Yes, the Blue window also hides when you hide the main window and yes, I did create the blue window topmost, although it doesn't seem to make any difference.

So, I suppose that there is no command hidden in utils plugin that can help then?



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Feb 2008 21:33
Tell you what - send me some source code (I have Blue, so just blank the id's) and a description of what you want to happen that doesn't now and I'll take a look. If I don't currently have what you need, I'll see what I can do to add it.

draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 4th Feb 2008 22:57 Edited at: 4th Feb 2008 22:58
Quote: "@draknir_,
Did you unzip the files correctly to the right places?
Check that when you unzipped the files you didn't disable the 'maintain directory structure' tick box if you are using winzip."


I sorted it out, i didnt realize the command was for a windows console box and it wasnt showing ontop of my fullscreen exclusive proggy

as for the rest, an ace plugin, i see lots of uses for all those extra commands
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 6th Feb 2008 02:47
I have made a new thread for my window shrinking problem because it was getting off topic.

I'd appreciate any help you can offer.
Thanks



Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Feb 2008 14:27
Ian,
Would there be any chance that you could enhance the SPLIT STRING commands to include support for multi character delimiters?

The following code returns the same result for each loop:


Obviously the delimter string only looks at the first character and ignores the rest. Would it be possible to extend that, so that the second loop would return the results:

abc
123*def

Thank for listening



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Feb 2008 15:04
The existing SPLIT STRING command is effectively a 'split by delimiter' where you specify a list of delimiters. I'll look into providing a 'split by word' equivalent - most of the infrastructure is already there.

An interim alternative for you would be to do a REPLACE ALL$ on the string to change your word into a character you don't use in the source string (eg chr$(1)), and then to split using that as a delimiter.

eg.
split string replace all$(s$, "**", chr$(1)), chr$(1)

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Feb 2008 19:00
Thanks Ian ... that's a handy work-around that I hadn't considered



Mule
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location:
Posted: 20th Feb 2008 09:39
IanM,

Hiya

I currently have Matrix1Utilities installed with the Styx plugin. As such I have disabled utility 16 so it will not conflict with styx. Frankly, I prefer the way some of your string plugins work over the styx ones like "Compare" and of course your Fast Version commands.

Can you please release a version of the Matrix 16 Utility that renames your Trim$ command so it will not conflict with styx.

Regards
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Feb 2008 10:42
A better solution would be to get rid of Styx and leave Ian's far superior plugins alone



IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Feb 2008 14:41
I couldn't possibly comment

While I'm posting, I might as well tell you all that there will be a new release this month - mostly various small fixes, but also including a realloc function for Diggsey, much finer control over multi-texturing for Cash & LiT, alternate help files courtesy of Scraggle.

Hopefully I'll also include a straight port of my array plug-in into the set to get it where it belongs too.

wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 21st Feb 2008 15:52
Just to let you know I use the hell out of your plug in.

Could you rename the individual help files to include a more descriptive title? You currently name them Matrix1Util_04 etc.. Maybe you could change it to Matrix1Util_04_Memory.
I have renamed them myself, but I'm pretty sure with every update, I will have to rename them again.

I am constantly reading through the help files, to figure out how to add these awesome functions to my programs. I even use your serial plugin for a Remote Operated Vehicle, I'm building.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Feb 2008 21:05
You'll be able to use the alternate help files that'll be provided - they contain an automatically generated index page of all of the plug-ins, making it easy to determine which one to search.

Quote: "I even use your serial plugin"

Not that I'm aware of - I've never written any code for DBPro to access any external I/O ports. Someone else's perhaps?

Login to post a reply

Server time is: 2024-04-24 14:54:47
Your offset time is: 2024-04-24 14:54:47