.p, Battle Files 'n Milkshape 3D

  • Thread starter Thread starter Alhexx
  • Start date Start date
Status
Not open for further replies.
it tries to load a file when you boot the program, not giving me time to click it before it crashes.
 
I'll get working on the DLL tonight. I've been occupied with the Remake project recently  :wink:Raw data ... is raw data. Like, no format. Raw. Data without format. Data. Raw. Raw data. No format.

Ahem! Basically its a collection of data. You specify which 'format' you want it to be in - 1 byte per colour value, or whatever - and pass in a massive great block of the stuff.

BTW, what's the VB declaration of glTexImage2D? I don't know how VB handles the GL data types.
 
Alhexx: Are you sure? With the p-preview program, I had to open a file for it to give me error 16. but with the more recent versions for ultima (June-August) it give me error 16 when it starts.
 
darkness: I'm sure it doesn't open any file at startup, but I'll have to check the Init-Sequences of Ultima, perhaps it handles floats there...
I haven't been able to program that special edition for you, perhaps I'll do it today...Fice: Raw data, no format? I mean, when I've got to declare a variable, which variable-format (string, integer, floats, ...). I guess it should be hard to init a variable without format (well I could use that 'Variant' Type...)

glTexImage2D: I'll take a look at it. I'll post in 'bout one hour (perhaps earlier, perhaps later)

DLL: Thanx.

e-Mail: I had to change my mail address, b'cause usa.net wanted me to pay for the account. I think I'll change my address the next time...

- Alhexx
 
Fice: I've implemented your DLL into VB. I've tested the functions, but I'm always getting the return value 1 (iow: File not found...)
Here's an example how I give the Filename into the functions:"C:eye.bmp"


I've had a look at that source (I've got Borland Delphi 2 installed) and saw a constant called 'FICE_FREAKY_NUMBERS'     :wink: ?

I think I'll spend a lot of time on workin this DLL, but I'm sure, I'll find a way...

Oh, and here's the declaration of glTexImage2D:

glTexImage2D (target As glTextureTargetConstants, level as GLint, internalFormat as GLint, width As GLsizei, height As GLsizei, border As GLint, format As glTIFormatConstants, Type As glPixelTypeConstants, pixels As GLvoid)

- Alhexx

- edit -
Here's how I declared the GetBMPPointer function:

Declare Function GetBMPPointer Lib "Ficetex.dll" (FName As String, Width As Integer, Height As Integer, DataPointer As GLvoid) As Integer

- edit 2 -
I think I know why the files can't be found (Fice: "VB is Crap").

VB handles Strings between two "s. example:
"VB is Crap"

Delphi (and many others) use 's. example:
'VB is crap'

- edit 3 -
I was just browsing the net, searchin' for VB-Delphi tuts and I found sth. like a PChar function that converts Strings to PChars. Could u implement such a function into that DLL: I've tried to implement it and run, but a file called 'cappa.pas' (or sth. like that) was not found...

[This message has been edited by Alhexx (edited August 02, 2001).]
 
Well, VB does handle strings differently - but the symbol it uses in the source code has nothing to do with that!My DLL expects you to pass it a null terminated string. I know VB *can* do that because all the Windows API functions that use strings expect null terminated strings. So, however a Windows function that uses a string is declared  in VB - that's how you have to pass in your string to *my* DLL.

uh, yeah, the FICE_FREAKY_NUMBERS result was for when you passed in a dodgy number. Except the final version of my DLL never accepted numbers, just filenames, so not needed  :D

However you're right in that the *standard* way VB handles strings *isn't* the same as most programming languages (it defaults to Wide [unicode] strings, most languages use ANSI.)
 
I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! I'm stupid!!! Hehe, forget 'bout this string-pchar-problem...
I've forgotten sth. in my declaration:

Declare Function GetBMPPointer Lib "Ficetex.dll" (ByVal FName As String, Width As Integer, Height As Integer, DataPointer As GLvoid) As Integer

Now I'm not gettings 1 anymore.

- Alhexx
 
Incidentally, I'm forced to learn VB since it's part of my course.
Originally posted by Alhexx
Declare Function GetBMPPointer Lib "Ficetex.dll" (ByVal FName As String, Width As Integer, Height As Integer, DataPointer As GLvoid) As Integer
Honestly, I don't like the way VB defaults to pass by reference.
In fact, I'm not happy with a lot of limitations in VB.

Sorry if it offends anyone though.
 
That's slightly unusual, but not the main problem.The REAL problem is that when you pass a VB string by value, it doesn't just pass it by value. It also converts it to another format!

Specifically, a PChar (null-terminated single byte string), which is the standard.

The real question is: If VB is going to support this type (which it needs to, for the Windows API), which is different to IT'S own String type, why the **** doesn't it make it a separate datatype? It's hardly intuitive that passing Strings by value actually converts them to a whole different data format...

Actually, that's one problem. The MAIN reason I don't like VB is that it isn't fully OO. And that just kills it dead as far as I'm concerned. No objects=crap.

However VB7 is supposed to add full OO. Then there's just all the other problems to sort out...
 
Fice: Good News & Bad News.Bad News first:
I can't get your DLL running correctly. I've found a source code that handles textures (also reads out BMPs and converts them into textures).
When I try to use Get***Pointer command, I'm having probs with the DataPointer Variable. The glTexImage2D tells me, it wants a variable (but I give him a variable...)
The Get***Data commands don't work very fine under VB - it mostly crashes when reading out the Data. I've also been able to commit a BSoD.  :D

Good News: Like I said, I've found a source, that reads out BMP and TGAs. I think with this source, I'll be able to read out TEX files myself (I've programmed a function that reads out 8-Bit BMPs). I'm going to have a look at the TEX format. I guess these TEX files are 8-Bit, too. So they've got to have a palette, too, right? I've had a look at your source, and I'm going to try reading out the TEX files tomorrow. But perhaps I'll need your help... (as always...)(Am I already annoying you?)

- Alhexx
 
Well, you've got my code to look at. Don't know whats going on with VB; lack of pointer support is really bad when it comes to things like this....I'll certainly give you any help you need - except I'm away on holiday for the next week, so no net access. After that, sure.
 
Visual Basic is evil. It's breaking every single programming rule in existance (well, many of them) and when working in it is is very very hard to think of it as something else than a toy. Just do yourself a favor and stay away from the crap...(At least now you have my opinion...not that it was asked for...)
 
Fice: I think I understand at least a bit of your code, so I'll try around a bit...oh, and have fun on holiday!  :)dagsverre: Yes, yes, I know...VB is crap...and u'r right. Like I mentioned before, I'm going to learn another language like C++ (Visual C++ 6, b'cause I#ve got the MS Visual Studio 6 Package). But I'll need a book to learn it. I've started programming in QBasic, then I changed to VB 4. I teached myself how to program. Then, finally, 'bout 3 months ago, I've bought a book 'bout VB6...that's why I'm able to program sth. like Ultima in VB. I've also got Borland Delphi 2 (AFAIK Version 5 is already available ?)

But C++ is much more complicated and I don't think that a few downloaded tuts will do this job.

So: VB IS crap...but it's EASY...  :wink:

- Alhexx
 
Depends on what you want to do. If you don't need a windows interface for the program I think it shouldn't take that much time to learn the basics. Problem is that you probably do...I'd say go for Delphi. It's not as powerful as C++ but it goes a long way and is almost as user-friendly as VB. There's not all that much new between Delphi 2 and Delphi 6 (6 was just released), but I know you can pick up free demos of the newer versions from magazine cover CDs and the like. There's also a trial over at borland.com, it's the same program but it might be time limited (not sure, just know that you can create programs with it).

Of course, since you have already started programming in VB I guess you should stay there until you start on a new program...
 
Well, when it comes to choosing what you want to program in, sometimes it's a matter of preference. Actually if you learn a "proper" programming language, you will find a lot of cross referencing among them. VB however is a little odd. In all its simplicity, it also limits you from doing lots of stuff.
 
Wow!! Good work every1!!OK. I'm going to the shop.
When I get back I will begin some-sort-of-a-private-project. What I mean is I'm going to begin to make those 3dmodels look better!! Anyone catching up?  :wink:
As soon as I do something i'll post it up, ok?
Now pleeeeeeeeeeeeeeasee somebody ecplain me what is going on in the FF7Remake project? I don't know if I should begin my project or not, cause If someone is aready doing this I don't wanna do it, OK?
 
Fice: Need your help, once again!I hope you read this before beeing on holidays.

Good News: I've been able to program a function that reads out TEX files. It worx pretty fine, but I'm having one question to these multiple textures:

When I use multiple textures, do I have to end my current GL_TRIANGLES before changing to another texture?

example:

glbindtexture ... Tex1
glbegin GL_TRIANGLES
.
. Triangles with Tex1
.
glEnd

glbindtexture ... Tex2
glbegin GL_TRIANGLES
.
. Triangles with Tex2
.
glEnd

I know some of the commands listed above aren't correct, but that's not the problem.

If I try to change the texture within one of these GL_TRIANGLE blocks, the textures aren't changed. But if I change em like listed above, it worx.

- Alhexx
 
Status
Not open for further replies.
Back
Top