Problems hacking properties

Blitz3D Forums/Blitz3D Programming/Problems hacking properties

jfk EO-11110(Posted 2007) [#1]
Hi
I'm currently working on a SaveMEsh command that will use the correct settings for everything: textures, brushes, etc. etc.
I successfully hacked most properties that make sense when saving a mesh(such as GetBrushAlpha(brush) etc.)

I failed to access the following so far:

Texture scale
texture position
texture rotation

Brush color

How would you access these properties?

BTW I want to make this work with meshes I used to load with LoadMesh, so "store your settings in variables" is not a solution. I know, I could utilize Rickies Load-Save-AnimB3d code. But I'd really like to have these functions working
(GetBrushRed(brush), GetTextureScaleX() etc.)

BTW the entity offsets have been altered in the past compiler releases!
I also remember we had a discussion here about these offsets, but the thread was deleted due to database size (post number 27000 or so). Additionally halo released some access info some time ago, but I can't find it anymore.
Furthermore there's Tom's DLL to obtain properties mainly of cameras and brushes, still doesn't cover all my needs.

IMHO these functions (a complete GetProperty range for all settings that may be used) is a significant lack. Things like GetBrushTexture and GetTexturePath were added recently, but what was needed is a systematic wrap of all properties in all command families. Just go trough the docs section by section and note every setting command.

Any help is welcome!


EDIT: could it be that some settings are "shoot and forget"? I doubt Mark would do this, but it seems I cannot detect some settings even when I scale larger amounts of RAM around the pointers found around the handle-pointer.


puki(Posted 2007) [#2]
There must be half a dozen save mesh code archive entries - I've not looked at them - but I mention it anyway.


Ricky Smith(Posted 2007) [#3]
This may help - not sure if the offsets are still valid though..


.decls




jfk EO-11110(Posted 2007) [#4]
Wow, thanks a lot!!! Saves me a lot of work!


jfk EO-11110(Posted 2007) [#5]
Ok, some of them still work, some don't

Especially those GetTextureScaleU etc. don't work anymore, where their counterparts for the handles obtained by GetTextureBrush (eg GetTextureBrushScaleU) will now work also for loaded and created textures right away.

GetBrushTextureFlags is currently driving me mad.
I put the output as a binary value onto the screen. First there's the 16th bit that is set all the time.

Bit values 1 and 2 work normally. Bit value 4 will return 7, the same as bit value 7!

eg:
tex=loadtexture("map.jpg",4)
will give me
%0000000111

just like
tex=loadtexture("map.jpg",7)

no idea why...

Bit values 8 to 128 are working as expected.

Bit 256 to 32768 will not affect the int found at offset 8 at all.

So it seem the bits are laying around all over :o, Unfort. I really need the flags, they're most important to me.


jfk EO-11110(Posted 2007) [#6]
Uh, kind of russian roulette is it. Maybe I better use your B3D loader noless. I could combine it: obtain the properties using the loader, then load the mesh using LoadMesh. Tho, the loading order of the surfaces still has to be sorted due to DXs fancy loading order scrambling.


jfk EO-11110(Posted 2007) [#7]
This was kinda waste of time, I wish I used your loader in the first place, Ricky, it's perfect!


Ricky Smith(Posted 2007) [#8]
I guessed some of the offsets may be out of date due to the changes in versions etc. It's a pity they couldn't be republished.
My loader is ok but needs a lot of tidying and optimising.