News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Break & Bash - 3ds Model Loader

Started by Draakie, November 11, 2008, 05:05:33 PM

Previous topic - Next topic

Draakie

Hiya all,

See what you can do to make this thing nice. I would have but I've got too much on my plate
right now (2 year old, demanding husband, exam papers to mark etc.)
Sorta works at present - but probably has a bug or three, or four, or five  :lol

Draakie

PS: It's a RADASM project - has loads of comments, uses SSE here and there.

NEEDS :
1) a front-end to specify or automate object "Z" field assignment
2) needs a SSE Allignment load object at boundry algo - memory assignment
3) Texture load needs testing & implimentation
4) Diffuse needs testing  & implementation
5) Vertex Buffer Object load preffered or ......

Has the potential to be a GREAT - if you know what I mean. :boohoo:

[attachment deleted by admin]
Does this code make me look bloated ? (wink)

0x401000


Draakie

O.k it's been two weeks - has any of the socially disfunctional types been able
to make any sense of it. Don't be shy now. :wink Getting to the point where
I'm able to work on it again....... Seesh Comptia exam equivalency development is a
nightmare!

Draakie
Does this code make me look bloated ? (wink)

vanjast

Quote from: Draakie on November 11, 2008, 05:05:33 PM
.. demanding husband...

:dazzled:
Come on now.. this is what my wife says of me... It's not all that bad  :green2

Draakie

May I ask as to your definition of demanding  ::)

Reasoning - my Hubby is in the same career path as me (actually work in the same building - doing the same thing)
and expects me after a long day's work to still be the caregiver at home. Cleaning, motherly duties involving nappies,
bringing him the odd thing while he lies in bed rubbing his feet etc. before he cooks dinner (long story - basically we
agreed I clean and he cooks - or something like that). But still demanding to the point where I would like to
throttle him. :eek

So all sympathy to your wife. :toothy

Draakie
Does this code make me look bloated ? (wink)

vanjast

I haven't been around this forum for some time... but let's  continue..
Quote from: Draakie on December 03, 2008, 09:08:21 PM
May I ask as to your definition of demanding  ::)
Censored for this forum  :green

Quote
Reasoning - my Hubby is in the same career path as me (actually work in the same building - doing the same thing)
and expects me after a long day's work to still be the caregiver at home. Cleaning, motherly duties involving nappies,
bringing him the odd thing while he lies in bed rubbing his feet etc. before he cooks dinner (long story - basically we
agreed I clean and he cooks - or something like that). But still demanding to the point where I would like to
throttle him. :eek
I believe a marriage, especially when kids are around, is a 50/50 operation. If you feel you're doing all the work and he's doing nothing, you only have yourself to blame. Go 'kick his butt' (so to say), Give him 'the rocket'. If this doesn't work, plan your next 'attack'. Look after the kid and yourself only, leave him out of the picture - he'll get the hint - you have to be cruel to be kind, otherwise you'll be a slave for the rest of your life.
If he doesn't get the hint... you've got a big problem.. and should plan your future (sad to say).

My 'better half' does have a 'must do it now' problem, whereas the 2 boys and I (probably my bad influence  :U ) have this 'we'll do it later' thing.
So being impatient, she drives herself around the bend - and I tell her bluntly that she only has herself to blame... get out the house, go shopping, do something else... like we do !!! Don't get me wrong.. I've changed approx 3000 nappies... actually I think I did 90% of them( they smelt good), but one must get a grip on sensibility.

Hope that helps  :U

Quote
So all sympathy to your wife. :toothy
I'll pass it on.. :wink with a bit of 'slap-n-tickle'


vanjast

Draakie.. From your profile I see you're somewhere near the ZA sea.. West coast, East Coast, Windy Corner, or in the 'Vaal' ??  :bg

Mark_Larson

MOVUPS is twice as slow compared to a MOVAPS on a P4, and even slower in relation to MOVAPS on core 2 duo.  Align your Data on a 16 byte boundary!

I cringed.

Oh and I prefer free slave labor when it comes to wives! *ducks quickly to avoid any projectiles*, that is probably why I am single ;)


CalCNormal proc ; calculate all normals coords for all objects per face
mov ebx, MeshNumb
sub ebx, 1
CNMesh:
push ebx ; index to current Mesh Object
shl ebx, 6
lea eax, MeshList[ebx]
CNobject:
mov   ebx, [eax].Mesh3DS.mFace ; get pointer to start of faces for this object
mov   edx, [eax].Mesh3DS.mVert ; get pointer to start of vertices for this object
movzx ecx, [eax].Mesh3DS.mTotF ; number of faces in this object
CNFace:
movzx esi, [ebx].Face3DS.F_idx0 ; for this face read point index coord 0 }
movzx edi, [ebx].Face3DS.F_idx1 ; for this face read point index coord 1 }> of the triangle
movzx eax, [ebx].Face3DS.F_idx2 ; for this face read point index coord 2 }
shl esi, 4 ; scale to index of Vertex = 16 bytes
shl edi, 4 ; "               "
shl eax, 4 ; "               "
mov [ebx].Face3DS.Fcnormal.Va, NULL
; -------------------partial-----------------------------------
        movups XMM0, [esi+edx] ; XMM0 = coord 0 a0,z0,y0,x0  -->  z0 - z1/y0 - y1/x0 - x1
movups XMM1, [edi+edx]  ; XMM1 = coord 1 a1,z1,y1,x1  -->  z1 - z2/y1 - y2/x1 - x2
movups XMM3, [edi+edx] ; XMM3 = Copy of XMM1
movups XMM2, [eax+edx]  ; XMM2 = coord 2 a2,z2,y2,x2
; -------------------full--------------------------------------
BIOS programmers do it fastest, hehe.  ;)

My Optimization webpage
htttp://www.website.masmforum.com/mark/index.htm