Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Ultima SDK

Ultima SDK Support for the Ultima SDK.

Reply
 
Thread Tools Display Modes
Old 07-21-2004, 06:16 PM   #26 (permalink)
 
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
Default

I'm not a Mono expert. The Bitmap class is part of the .NET framework and I believe it encapsulates a windows HBITMAP (which is a pointer to a structure containing all the bitmap data). It's clear that Mono will handle the Bitmap class differently, but I believe it will support it. The exposed class should be the same as in .NET, it will just work different behind the scenes.
__________________
Oxygen should be regarded as a drug.
Arya is offline   Reply With Quote
Old 07-21-2004, 06:42 PM   #27 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default I guess wait and see

Quote:
Originally Posted by Arya
I'm not a Mono expert. The Bitmap class is part of the .NET framework and I believe it encapsulates a windows HBITMAP (which is a pointer to a structure containing all the bitmap data). It's clear that Mono will handle the Bitmap class differently, but I believe it will support it. The exposed class should be the same as in .NET, it will just work different behind the scenes.

Well, I don't claim to be a mono expert either, as for it me it doesn't offer much. I still think it won't be included, as it seems to follow the "link" to windows display api. Mono isn't dependent on gtk+, but is using it for their display stuff (so I don't see how to get it generically). I readily admit I could easily be reading this all wrong, so I guess it is a wait an see.

What I was still confused about, was it didn't seem the orginal poser was looking to write in C# on linux. That was my why my orginal post, was trying to determine if he was planning on a cgi interface, and if so, what was that going to be coded in. For there are native C++ libraries available on linux for the mul files as well, that would not require all the mono setup. Regardless, it would appear there are several ways to accomplish what wants to be done, it is just dependent on how where one wants to program (php, C#, C++, etc).
punt59 is offline   Reply With Quote
Old 07-21-2004, 07:08 PM   #28 (permalink)
 
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
Default

He's probably familiar with .NET, which I guess is the reason for his post.

As far as the Bitmap class is concerned, well it's part of .NET so I guess Mono will implement it. How is beyond my knowledge
Arya is offline   Reply With Quote
Old 07-21-2004, 07:33 PM   #29 (permalink)
Forum Expert
 
Bradley's Avatar
 
Join Date: Oct 2002
Location: Hummelstown, PA
Age: 29
Posts: 487
Send a message via ICQ to Bradley Send a message via AIM to Bradley Send a message via MSN to Bradley Send a message via Yahoo to Bradley
Default

http://www.go-mono.com/class-status-System.Drawing.html

MONO says that system.drawing.bitmap is 97% complete, missing only 2 rarely used function calls.

Since in PHP the bitmap never actually gets drawn on the server's screen, it only exists in memory, there shouldn't be a problem using it on any system. All it would need to know how to do is stream it to a client it the correct format, which is standard, .gif, .jpg, .png, or whatever. it's fairly system independant.
__________________
-----------------------
If your response will contribute nothing to this discussion except to insult me, or someone else in this thread, please do not post.
I am refering to specific individuals.
You know who you are.
Bradley is offline   Reply With Quote
Old 07-21-2004, 07:44 PM   #30 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default

Quote:
Originally Posted by Bradley
http://www.go-mono.com/class-status-System.Drawing.html

MONO says that system.drawing.bitmap is 97% complete, missing only 2 rarely used function calls.
neat, wasn't aware of that. Still not sure it is worth the effort to get setup for just a php displaying of gumps, but to each their own.

Arya, not all NET is being implemented on MONO. Thus my confusion, and mistake on Bitmap. But just because something is in NET, doesn't mean MONO is going to do it (several things they are not doing due to patents, and are just windows specific, which isn't there goal).
punt59 is offline   Reply With Quote
Old 07-22-2004, 07:37 AM   #31 (permalink)
 
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
Default

Yes Punt, I'm pretty sure they won't implement everything. However the Bitmap class is one of those things one would expect to be in as it's the main class used to manipulate images in .NET.
__________________
Oxygen should be regarded as a drug.
Arya is offline   Reply With Quote
Old 07-22-2004, 09:53 AM   #32 (permalink)
Tim
 
Join Date: Sep 2002
Posts: 348
Send a message via ICQ to Tim Send a message via AIM to Tim Send a message via Yahoo to Tim
Default

Actually, Eagle and I were going to do this using PHP. All you'd have to do is access the character save and get the appropriate bmps from uo.com

We just never got around to it.
__________________
©2003 Irleet. All your rights are belong to me.
"The depth of your jealousy concerning my leetness astounds even me."
Click Me
Tim is offline   Reply With Quote
Old 07-22-2004, 10:53 PM   #33 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

I thought I would come back to the discussion :-)

yeah my suggestion will work

Mono isn't the perfect solution, but I wll be honest if I had a choice between using Mono/PHP or any other solution I would pick Mono/PHP instead of a ASP solution with Mono/Apache.

Actually the best solution would be to use a windows server.

But I will be honest the current version of MyRunUO has alot of work to be done to make it work.
Phantom is offline   Reply With Quote
Old 07-23-2004, 08:44 AM   #34 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default Why, not enough data...

[quote=Phantom]
Actually the best solution would be to use a windows server.

QUOTE]

Hehe, so I will come back to the discussion as well. And have to ask why? Apache/linux support php fine, and as prevously stated, if one only wants a library to get the mul files on linux, there are plenty out there. We have assumed the user wants to use C#, but that isn't clear. Nor is it clear that would buy any major advantage in this instance (over Java, php native, or use C/C++ and other mul libraries).

And the suggestion wont work, unless the dll is modified, as it has been identified to have native windows calls that do need to be changed (few, but there are some). So if one wants to get that route, then changes have to be made to the dll, and then it can be tried.
punt59 is offline   Reply With Quote
Old 07-23-2004, 11:44 PM   #35 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Has anyone even tried, punt you siad you have not even look at mono/tried it.

I think it would, what he wants to use would work.

Well at this point if your saying it won't work the simplest solution would just be to use a windows server.
Phantom is offline   Reply With Quote
Old 07-23-2004, 11:51 PM   #36 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default Again, how do you draw that conclusion?

Quote:
Originally Posted by Phantom
Has anyone even tried, punt you siad you have not even look at mono/tried it.

I think it would, what he wants to use would work.

Well at this point if your saying it won't work the simplest solution would just be to use a windows server.
It has been identified that the ultima.dll, unmodified, uses windows specific functions (not the Bitmap, but others where identified). So I don't see how it would load that dll. But no, I readily admit I have not tried, for I have no need for such a thing.

What I still don't understand, is if one assumes it wont' work, the simpliest solution would be use a windows server? Change your whole OS for one library? Just use another library equivlanent to ultima.dll.
punt59 is offline   Reply With Quote
Old 07-24-2004, 12:16 AM   #37 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by punt
It has been identified that the ultima.dll, unmodified, uses windows specific functions (not the Bitmap, but others where identified). So I don't see how it would load that dll. But no, I readily admit I have not tried, for I have no need for such a thing.

What I still don't understand, is if one assumes it wont' work, the simpliest solution would be use a windows server? Change your whole OS for one library? Just use another library equivlanent to ultima.dll.
He wants to do MyRunUO i mean what choices does he have, if he wants a good stable system?

Up till now we been just talking.. I still say the dll would work on mono.
Phantom is offline   Reply With Quote
Old 07-24-2004, 05:15 AM   #38 (permalink)
 
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
Default

Most of the dll will work on Mono. The TileMatrix and Client classes won't. Look at the code, those calls to FindWindow, _lread, and SendMessage will not work under Linux (unless you program a fake kerlen32.dll or user32.dll and expose a Linux implementation of those functions).
__________________
Oxygen should be regarded as a drug.
Arya is offline   Reply With Quote
Old 07-24-2004, 08:35 AM   #39 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default Plenty

Quote:
Originally Posted by Phantom
He wants to do MyRunUO i mean what choices does he have, if he wants a good stable system?

Up till now we been just talking.. I still say the dll would work on mono.

What choice does he have if he wants a stable system to read gump art? There are other libraries that do that, has xir has pointed out in this thread. So he has choices for even a "good stable system".


But at this point, I don't see any other useful data to the orginal poster being offered, from either of us. So I any other posts I suppose I will do on this would be in starbucks.
punt59 is offline   Reply With Quote
Old 08-15-2004, 12:37 PM   #40 (permalink)
 
Join Date: Nov 2002
Posts: 15
Send a message via AIM to Kinetix
Default

What I was asking was for a cross-platform program which would allow the use of Zulu's MyUO on a PHP platform, Apache and Linux. [edit: WITHOUT extra mods or software requiring to be installed.]

Since my last post, I've learned some C and have written a program that reads the gumpindex and gumpart mul files, then prints out the information that is read by PHP. However, I'm hoping you guys can help me with something.

In the tiledata, how do I get the item's gumpid for when it is equipped?
And hues, I don't understand them at all. How are they applied to the gumps? I'd appreciate any help, thanks.
(Keep in mind I don't know C#)
Kinetix is offline   Reply With Quote
Old 08-15-2004, 01:03 PM   #41 (permalink)
Forum Newbie
 
Join Date: Nov 2002
Posts: 89
Default

Quote:
Originally Posted by Kinetix
In the tiledata, how do I get the item's gumpid for when it is equipped?
What is commonly referred to as the animid in many documents for tiledata.mul is the index number. Add 50,000 to that number, to get the gumpid for the male paperdoll, and add 60,000 to it to get the female paperdoll (if not present, it defaults to the male paperdoll version).

Quote:
And hues, I don't understand them at all. How are they applied to the gumps? I'd appreciate any help, thanks.
(Keep in mind I don't know C#)
In the hues, you see a table of 32 colors. Those represent the subsitute color to use based on the orginal colors red value (which will be a number between 0-31). So you take the gump color for a pixel, get the red value, index into that hue table for the particular hue, and get a new color to use.
punt59 is offline   Reply With Quote
Old 08-15-2004, 01:12 PM   #42 (permalink)
 
Join Date: Nov 2002
Posts: 15
Send a message via AIM to Kinetix
Default

That's EXACTLY what I wanted, thanks a lot punt.
Kinetix is offline   Reply With Quote
Old 08-15-2004, 04:49 PM   #43 (permalink)
 
Join Date: Nov 2002
Posts: 15
Send a message via AIM to Kinetix
Default

Great! I got it working! Using a C program to do the reading of the files (which is WAY faster than having PHP do it) and let PHP create the picture, I have successfully hued gumps!

But I have a problem, how do you go about reading the strange hues? The ones from 1152 to 1170 or so. Ingame they display fine, but in my program it reads it with the black colors, displaying a weird gump. Any ideas on this?

PS. Once I finish this, I plan on releasing it so all those people who wanted to use Zulu's MyUO on a PHP platform will be able to.

EDIT: AHHHHHHH!!!!!!
I fixed it!!!! And it's working! Thanks for the help.
Kinetix is offline   Reply With Quote
Old 08-16-2004, 04:30 AM   #44 (permalink)
 
Join Date: Apr 2003
Posts: 32
Default

could you give me a clue to your solution ? *G*

i'm generating the pictures using c# and my drow (with a skin color of 0x800ish) are displayed with a normal skin hue
Iridath is offline   Reply With Quote
Old 08-16-2004, 11:08 AM   #45 (permalink)
 
Join Date: Nov 2002
Posts: 15
Send a message via AIM to Kinetix
Default

Quote:
Originally Posted by Iridath
could you give me a clue to your solution ? *G*

i'm generating the pictures using c# and my drow (with a skin color of 0x800ish) are displayed with a normal skin hue
I'll be releasing the programs as soon as I fix this one last problem.

The hues above 3000 and from 1152 to 1176 are irregular hues. For some reason I can read 1152, 1153, 1154 fine, even they look weird like the other hues in that range when I open it in the hue editor. However, hues ABOVE 3000 (such as skin hues: 33770, etc) will not display at ALL, because those hues don't exist. The ones from 1155 to 1176 display correctly ingame, but seem to be distorted when I use them in my program.

How it is possible to read these hues, any ideas?
Kinetix is offline   Reply With Quote
Old 08-16-2004, 12:52 PM   #46 (permalink)
Forum Expert
 
Bradley's Avatar
 
Join Date: Oct 2002
Location: Hummelstown, PA
Age: 29
Posts: 487
Send a message via ICQ to Bradley Send a message via AIM to Bradley Send a message via MSN to Bradley Send a message via Yahoo to Bradley
Default

Quote:
Originally Posted by Kinetix
I'll be releasing the programs as soon as I fix this one last problem.

The hues above 3000 and from 1152 to 1176 are irregular hues. For some reason I can read 1152, 1153, 1154 fine, even they look weird like the other hues in that range when I open it in the hue editor. However, hues ABOVE 3000 (such as skin hues: 33770, etc) will not display at ALL, because those hues don't exist. The ones from 1155 to 1176 display correctly ingame, but seem to be distorted when I use them in my program.

How it is possible to read these hues, any ideas?
Krrios' SDK can read them, the source for that is available. You should be able to look at the source code for that section to see if there is anything special being done to read those hues.
__________________
-----------------------
If your response will contribute nothing to this discussion except to insult me, or someone else in this thread, please do not post.
I am refering to specific individuals.
You know who you are.
Bradley is offline   Reply With Quote
Old 08-16-2004, 02:12 PM   #47 (permalink)
Forum Expert
 
Join Date: Dec 2002
Posts: 730
Default

skin hues are just normal hues with
0x8000 added to them :P
but they have the difference that only the grey parts of the gump/item is rehued
Atomic is offline   Reply With Quote
Old 08-16-2004, 02:52 PM   #48 (permalink)
 
Join Date: Nov 2002
Posts: 15
Send a message via AIM to Kinetix
Default

Ahhh! That makes sense, I'm going to give it a try now. Thanks
Edit: It worked.

But I'm still stuck with the 1155-1176 hue range...
Kinetix is offline   Reply With Quote
Old 09-07-2004, 11:35 AM   #49 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
Default

There are lots of little problems like this due to the way AOS handles .def files. The one I wrote for myuogamers ( www.uogamers.com/myuog ) encountered similar problems, mostly with art not showing up because it is actually displayed with a different hue and art # from the .def files.

It's really annoying, I just said screw it and left it out. This applies to stuff like arcane clothing.

Otherwise, skin hues and stuff can be a bit trickey. But I wouldn't want to spoil your fun :-P
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Old 09-07-2004, 11:37 AM   #50 (permalink)
Administrator
 
Zippy's Avatar
 
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,870
Default

Also btw the myuogamers one is all done natively in PHP (no dlls, or external programs). Though most of the code was borrowed from Ultima.dll
__________________
Zippy, Razor Creator and RunUO Core Developer
The RunUO Software Team

"Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal."
~The Cryptonomicon

Zippy is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off