Author Topic: .p, Battle Files 'n Milkshape 3D  (Read 75859 times)

Anonymous

  • Guest
.p, Battle Files 'n Milkshape 3D
« Reply #175 on: 2001-07-31 02:40:00 »
my hypothesis: floats just dont seem to work on my comp.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #176 on: 2001-07-31 12:01:00 »
darkness: Damnit, I'm stupid! I've copied the wrong code!!! This one:

glColor3s ColorR(PolyP1(n%) + value3 * 2) * 128, ColorG(PolyP1(n%) + value3 * 2) * 128, ColorB(PolyP1(n%) + value3 * 2) * 128

This one *should* work, b'cause it uses shorts, no floats...

BTW: Try downloading Ultima and run this one...

- Alhexx

- edit -
And if this doesn't work, try making an CLng() function on every color...understand me?

example:
glColor3s CLng(ColorR(PolyP1(n%) + value3 * 2) * 128)

I guess that could make the expression too complex, too, but try it...

[This message has been edited by Alhexx (edited July 31, 2001).]

[This message has been edited by Alhexx (edited July 31, 2001).]


Anonymous

  • Guest
.p, Battle Files 'n Milkshape 3D
« Reply #177 on: 2001-07-31 22:47:00 »
the expression isnt too complex anymore, the colors are just a little messed

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #178 on: 2001-08-01 00:48:00 »
Have u downloaded Ultima beta 12 and tried? Colors messed up, too?

The 'F**k Error 16 Mode' of Ultima worx quite fine on my comp; no mixed up colors...

- Alhexx


Anonymous

  • Guest
.p, Battle Files 'n Milkshape 3D
« Reply #179 on: 2001-08-01 16:47:00 »
it tries to load a file when you boot the program, not giving me time to click it before it crashes.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #180 on: 2001-08-01 14:31:00 »
Loads file at boot? Heh?   :-?
I haven't implemented a 'load file at boot' function or sth like that..

I'll have a look at my source and I'll compile a special version 4 you.

What's your mail, so I can send it to u?

- Alhexx

- edit -

Fice: How 'bout this DLL?

Fice: What format has that 'raw data' got to be? A Sting? An OpenGL Type?

[This message has been edited by Alhexx (edited August 01, 2001).]


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
.p, Battle Files 'n Milkshape 3D
« Reply #181 on: 2001-08-01 22:03:00 »
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.


Anonymous

  • Guest
.p, Battle Files 'n Milkshape 3D
« Reply #182 on: 2001-08-01 22:35:00 »

Anonymous

  • Guest
.p, Battle Files 'n Milkshape 3D
« Reply #183 on: 2001-08-01 22:49:00 »
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.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
.p, Battle Files 'n Milkshape 3D
« Reply #184 on: 2001-08-01 23:59:00 »
Alhexx: DLL coded. I've emailed it to you just now.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #185 on: 2001-08-02 15:31:00 »
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


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #186 on: 2001-08-02 17:11:00 »
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).]


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
.p, Battle Files 'n Milkshape 3D
« Reply #187 on: 2001-08-02 18:49:00 »
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.)


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #188 on: 2001-08-02 19:08:00 »
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


The SaiNt

  • *
  • Posts: 1300
    • View Profile
.p, Battle Files 'n Milkshape 3D
« Reply #189 on: 2001-08-02 19:39:00 »
Incidentally, I'm forced to learn VB since it's part of my course.

Quote
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.


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
.p, Battle Files 'n Milkshape 3D
« Reply #190 on: 2001-08-02 21:58:00 »
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...


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #191 on: 2001-08-03 23:44:00 »
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


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
.p, Battle Files 'n Milkshape 3D
« Reply #192 on: 2001-08-04 00:49:00 »
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.


dagsverre

  • *
  • Posts: 323
    • View Profile
    • http://ffsf.cjb.net
.p, Battle Files 'n Milkshape 3D
« Reply #193 on: 2001-08-04 00:58:00 »
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...)


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #194 on: 2001-08-04 14:27:00 »
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


dagsverre

  • *
  • Posts: 323
    • View Profile
    • http://ffsf.cjb.net
.p, Battle Files 'n Milkshape 3D
« Reply #195 on: 2001-08-04 14:49:00 »
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...


The SaiNt

  • *
  • Posts: 1300
    • View Profile
.p, Battle Files 'n Milkshape 3D
« Reply #196 on: 2001-08-04 17:27:00 »
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.

Ged

  • *
  • Posts: 452
    • View Profile
    • http://acn.waw.pl/vanyel
.p, Battle Files 'n Milkshape 3D
« Reply #197 on: 2001-08-05 15:14:00 »
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?


Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
.p, Battle Files 'n Milkshape 3D
« Reply #198 on: 2001-08-05 21:46:00 »
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


The SaiNt

  • *
  • Posts: 1300
    • View Profile
.p, Battle Files 'n Milkshape 3D
« Reply #199 on: 2001-08-05 22:00:00 »
Too late.
Fice is already on holiday.