Home Gallery Resources The Team Rules chat Login Register
Pages:  1 ... 8 9 10 [11] 12 13 14 ... 1046
Author Topic: Brawlbox Resources & History  (Read 3892913 times)
0 Members and 3 Guests are viewing this topic.
DarkPikachu
Angel Kitten
***
Offline Offline

Posts: 3069


complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #150 on: December 23, 2010, 02:46:09 PM »


    yea you can
    but include these as well:

    #--<<common functions>>--
    import struct as S
    def hex(this): return this.encode('hex') #return the hex value of a char
    def ui(this): return int(this.encode('hex'),16) #return an unsigned 8bit, 16bit, or 32bit int (most common)
    def si8(this): return S.unpack("b", this)[0] #return a signed 8bit int
    def ui16(this): return S.unpack(">H", this)[0] #return an unsigned 16bit int (I think)
    def si16(this): return S.unpack(">h", this)[0] #return a signed 16bit int
    def fl32(this): return S.unpack(">f", this)[0] #return a 32bit float
    def si32(this): return S.unpack(">l", this)[0] #return a signed 32bit int
    #--<</common functions>>--

    ^they're what actually do the conversions
    « Last Edit: December 23, 2010, 02:47:06 PM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #151 on: December 23, 2010, 02:55:33 PM »


    ok, now I gotta turn it into C#
    Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #152 on: December 24, 2010, 07:16:44 AM »


    well I've just asked on DW for info that may prove helpful in deciphering the mdl0 format...

    http://www.daniweb.com/forums/post1425660.html#post1425660

    if anyone here want's to help, click the link Smiley

    EDIT:
    I have my tmp format posted:
    http://tcll5850.proboards.com/index.cgi?action=gotopost&board=python&thread=74&post=365
    « Last Edit: December 24, 2010, 07:39:14 AM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #153 on: December 24, 2010, 01:49:28 PM »


    hey BJ

    Will's loads the mdl0 into mem as [##,##,##, ...
    and accesses those bytes at a specified index during conversion.

    just posting my findigs is all Smiley

    EDIT:
    you can delete the ">H" function
    it is unsigned which is takenen care of by the ui function
    ui = unsigned int
    si = signed int
    fl = float
    « Last Edit: December 24, 2010, 05:19:30 PM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #154 on: December 24, 2010, 06:03:58 PM »


    hey...

    I've shortened the common functions by quite a bit:

    #--<<common functions>>--
    import struct as S
    def hex(this): return this.encode('hex') #return the hex value of a char
    def ui(this): return int(this.encode('hex'),16) #return an unsigned 8bit, 16bit, or 32bit int (most common)
    def si(this): return int(long(this.encode('hex'),16)-2**32) #return a signed 8bit, 16bit, or 32bit int
    def fl(this): return S.unpack(">f", this)[0] #return a 32bit float (highly common)
    #--<</common functions>>--
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #155 on: December 24, 2010, 06:04:47 PM »


    Kewl. I'm still working on getting the verts from the xml...
    Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #156 on: December 24, 2010, 08:28:18 PM »


    oh yea...
    and modded these...

    ^ was wrong
    ** was right

    def vec(dtyp,mult): #decide the type of conversion to use
                    if dtyp==0 :return ui(fr.read(1))/(float(2)**mult) #fixed point ui8
                    if dtyp==1 :return si(fr.read(1))/(float(2)**mult) #fixed point si8
                    if dtyp==2 :return ui(fr.read(2))/(float(2)**mult) #fixed point ui16
                    if dtyp==3 :return si(fr.read(2))/(float(2)**mult) #fixed point si16
                    if dtyp==4 :return fl(fr.read(4)) #floating point fl
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #157 on: December 25, 2010, 07:07:56 AM »


    william didn't know what the weights were XD

    uint16_t unknowncount = BigUInt16(data, 102);

    data 102 (in polygon/object header) <- can be called either
    is the middle of the weight count... ui(data[100:104])

    it works like that in Py btw (if the file were loaded that way)
    « Last Edit: December 25, 2010, 10:25:06 AM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #158 on: December 25, 2010, 09:43:09 PM »


    Boom. Check it out:
    Code:
    Converted the String value '-2.07217' to the String value C00093CDDD6E04C0.
    Converted the String value '7.18786' to the String value 401CC05E5F30E7FF.
    Converted the String value '0.462265' to the String value 3FDD95BFF04577D9.
    Converted the String value '-2.06874' to the String value C0008CC78E9F6A94.
    Converted the String value '7.19277' to the String value 401CC5657FB69985.
    Converted the String value '0.393945' to the String value 3FD9366516DB0DD8.
    Converted the String value '-2.07101' to the String value C000916DB0DD82FD.
    Converted the String value '7.16143' to the String value 401CA54DE7EA5F85.
    Converted the String value '0.391582' to the String value 3FD90FADF2ECF206.
    Converted the String value '-2.07444' to the String value C0009873FFAC1D2A.
    Converted the String value '7.15652' to the String value 401CA046C764AE00.
    Converted the String value '0.459903' to the String value 3FDD6F0CFE154435.
    Converted the String value '-2.07867' to the String value C000A11DBCA9691A.
    Converted the String value '7.15047' to the String value 401C9A14CEC41DD2.
    Converted the String value '0.544343' to the String value 3FE16B4202D9CF14.
    Converted the String value '-2.0764' to the String value C0009C779A6B50B1.
    Converted the String value '7.18181' to the String value 401CBA2C669057D1.
    Converted the String value '0.546706' to the String value 3FE17E9D94D0DCFD.
    Converted the String value '-2.0894' to the String value C000B71758E21965.
    Converted the String value '7.00242' to the String value 401C027A63736CDF.
    Converted the String value '0.533183' to the String value 3FE10FD5CB790FB6.
    Converted the String value '-2.08713' to the String value C000B27136A400FC.
    Converted the String value '7.03376' to the String value 401C2291FB3FA6DF.
    Converted the String value '0.535545' to the String value 3FE1232F44912989.
    Converted the String value '-2.0829' to the String value C000A9C779A6B50B.
    Converted the String value '7.03982' to the String value 401C28C692F6E829.
    Converted the String value '0.451105' to the String value 3FDCDEE78183F91E.
    Converted the String value '-2.08517' to the String value C000AE6D9BE4CD75.
    Converted the String value '7.00848' to the String value 401C08AEFB2AAE29.
    Converted the String value '0.448742' to the String value 3FDCB8305D95DD4C.
    Converted the String value '-2.09978' to the String value C000CC5974E65BEA.
    Converted the String value '6.85918' to the String value 401B6FCCE1C58256.
    Converted the String value '0.522384' to the String value 3FE0B75EA67E846A.
    Converted the String value '-2.09751' to the String value C000C7B352A84381.
    Converted the String value '6.89052' to the String value 401B8FE47991BC56.
    Converted the String value '0.524747' to the String value 3FE0CABA38759253.
    Converted the String value '-2.09328' to the String value C000BF0995AAF790.
    Converted the String value '6.89658' to the String value 401B96191148FDA0.
    Converted the String value '0.440306' to the String value 3FDC2DF9378EE286.
    Converted the String value '-2.09555' to the String value C000C3AFB7E90FF9.
    Converted the String value '6.86524' to the String value 401B7601797CC3A0.
    Converted the String value '0.437944' to the String value 3FDC0746455EAEE2.
    Converted the String value '-2.48001' to the String value C003D70F7B9E0610.
    Converted the String value '7.21242' to the String value 401CD984A0E410B6.
    Converted the String value '0.528684' to the String value 3FE0EAFAB53D640F.
    Converted the String value '-2.48228' to the String value C003DBB59DDC1E79.
    Converted the String value '7.18108' to the String value 401CB96D0917D6B6.
    Converted the String value '0.526321' to the String value 3FE0D79F23465626.
    Converted the String value '-2.47805' to the String value C003D30BE0DED289.
    Converted the String value '7.18714' to the String value 401CBFA1A0CF1801.
    Converted the String value '0.441881' to the String value 3FDC47C73EEE5259.
    Converted the String value '-2.47578' to the String value C003CE65BEA0BA1F.
    Converted the String value '7.21848' to the String value 401CDFB9389B5200.
    Converted the String value '0.444243' to the String value 3FDC6E7A311E85FD.
    Converted the String value '-2.49074' to the String value C003ED0917D6B65B.
    Converted the String value '7.06437' to the String value 401C41EA35935FC4.
    Converted the String value '0.517523' to the String value 3FE08F8C64FDB09A.
    Converted the String value '-2.49301' to the String value C003F1AF3A14CEC4.
    Converted the String value '7.03303' to the String value 401C21D29DC725C4.
    Converted the String value '0.515161' to the String value 3FE07C32EBE596C8.
    Converted the String value '-2.48878' to the String value C003E9057D1782D4.
    Converted the String value '7.03909' to the String value 401C2807357E670E.
    Converted the String value '0.43072' to the String value 3FDB90EA9E6EEB70.
    Converted the String value '-2.48651' to the String value C003E45F5AD96A6A.
    Converted the String value '7.07043' to the String value 401C481ECD4AA10E.
    Converted the String value '0.433083' to the String value 3FDBB7A1C25D0742.
    Converted the String value '-2.50112' to the String value C004024B33DAF8DF.
    Converted the String value '6.92113' to the String value 401BAF3CB3E5753A.
    Converted the String value '0.506725' to the String value 3FE0371758E21965.
    Converted the String value '-2.50339' to the String value C00406F156191149.
    Converted the String value '6.88979' to the String value 401B8F251C193B3A.
    Converted the String value '0.504362' to the String value 3FE023BBC6EB0B7C.
    Converted the String value '-2.49916' to the String value C003FE47991BC558.
    Converted the String value '6.89585' to the String value 401B9559B3D07C85.
    Converted the String value '0.419922' to the String value 3FDAE0008637BD06.
    Converted the String value '-2.49689' to the String value C003F9A176DDACEF.
    Converted the String value '6.92719' to the String value 401BB5714B9CB685.
    Converted the String value '0.422284' to the String value 3FDB06B37867F0AA.
    Converted the String value '-2.09213' to the String value C000BCAEA747D806.
    Converted the String value '6.87014' to the String value 401B7B05FAEBC409.
    Converted the String value '0.369624' to the String value 3FD7A7EB6BF444E1.
    Converted the String value '-2.08985' to the String value C000B80346DC5D64.
    Converted the String value '6.90148' to the String value 401B9B1D92B7FE09.
    Converted the String value '0.371986' to the String value 3FD7CE9E5E247885.
    Converted the String value '-2.08635' to the String value C000B0D844D013A9.
    Converted the String value '6.9065' to the String value 401BA04189374BC7.
    Converted the String value '0.301985' to the String value 3FD353B8E4B87BDD.
    Converted the String value '-2.08862' to the String value C000B57E670E2C13.
    Converted the String value '6.87516' to the String value 401B8029F16B11C7.
    Converted the String value '0.299622' to the String value 3FD32D01C0CA600B.
    Converted the String value '-2.07947' to the String value C000A2C12AD81ADF.
    Converted the String value '7.04472' to the String value 401C2DCB1465E892.
    Converted the String value '0.382785' to the String value 3FD87F8CA8198F1D.
    Converted the String value '-2.08174' to the String value C000A7674D163348.
    Converted the String value '7.01338' to the String value 401C0DB37C99AE92.
    Converted the String value '0.380422' to the String value 3FD858D5842B734B.
    Converted the String value '-2.07597' to the String value C0009B9628CBD124.
    Converted the String value '7.04975' to the String value 401C32F1A9FBE76D.
    Converted the String value '0.312783' to the String value 3FD404A2FCEFAA47.
    Converted the String value '-2.07824' to the String value C000A03C4B09E98E.
    Converted the String value '7.01841' to the String value 401C12DA122FAD6D.
    Converted the String value '0.310421' to the String value 3FD3DDF00ABF76A3.
    Converted the String value '-2.06524' to the String value C000859C8C9320DA.
    Converted the String value '7.19779' to the String value 401CCA897635E743.
    Converted the String value '0.323944' to the String value 3FD4BB7F9D6F1130.
    Converted the String value '-2.06751' to the String value C0008A42AED13943.
    Converted the String value '7.16645' to the String value 401CAA71DE69AD43.
    Converted the String value '0.321581' to the String value 3FD494C87980F55E.
    Converted the String value '-2.47463' to the String value C003CC0AD03D9A95.
    Converted the String value '7.19204' to the String value 401CC4A6223E186A.
    Converted the String value '0.37356' to the String value 3FD7E86833C6002A.
    Converted the String value '-2.47236' to the String value C003C764ADFF822C.
    Converted the String value '7.22338' to the String value 401CE4BDBA0A5269.
    Converted the String value '0.375923' to the String value 3FD80F1F57B41BFC.
    Converted the String value '-2.48536' to the String value C003E2046C764AE0.
    Converted the String value '7.044' to the String value 401C2D0E56041893.
    Converted the String value '0.3624' to the String value 3FD7318FC504816F.
    Converted the String value '-2.48309' to the String value C003DD5E4A383276.
    Converted the String value '7.07533' to the String value 401C4D234EB9A177.
    Converted the String value '0.364763' to the String value 3FD75846E8F29D41.
    Converted the String value '-2.49574' to the String value C003F746887A8D65.
    Converted the String value '6.90075' to the String value 401B9A5E353F7CEE.
    Converted the String value '0.351601' to the String value 3FD680A17B0F6AD7.
    Converted the String value '-2.49347' to the String value C003F2A0663C74FB.
    Converted the String value '6.93209' to the String value 401BBA75CD0BB6ED.
    Converted the String value '0.353964' to the String value 3FD6A7589EFD86A9.
    Converted the String value '-2.47112' to the String value C003C4DA9003EEA2.
    Converted the String value '7.19706' to the String value 401CC9CA18BD6627.
    Converted the String value '0.303559' to the String value 3FD36D82BA5A0382.
    Converted the String value '-2.46885' to the String value C003C0346DC5D639.
    Converted the String value '7.2284' to the String value 401CE9E1B089A027.
    Converted the String value '0.305921' to the String value 3FD39435AC8A3726.
    Converted the String value '-2.48185' to the String value C003DAD42C3C9EED.
    Converted the String value '7.04902' to the String value 401C32324C836651.
    Converted the String value '0.292399' to the String value 3FD2B6AA4B9884C7.
    Converted the String value '-2.47958' to the String value C003D62E09FE8683.
    Converted the String value '7.08036' to the String value 401C5249E44FA051.
    Converted the String value '0.294761' to the String value 3FD2DD5D3DC8B86B.
    Converted the String value '-2.49223' to the String value C003F0164840E172.
    Converted the String value '6.90577' to the String value 401B9F822BBECAAC.
    Converted the String value '0.2816' to the String value 3FD205BC01A36E2F.
    Converted the String value '-2.48996' to the String value C003EB702602C908.
    Converted the String value '6.93711' to the String value 401BBF99C38B04AB.
    Converted the String value '0.283963' to the String value 3FD22C7325918A01.

    Although I'm pretty sure you said that each float was only 4 bytes long right? lol
    « Last Edit: December 25, 2010, 11:33:04 PM by BlackJax96 » Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #159 on: December 26, 2010, 08:54:09 AM »


    yea...
    32bit conversion is what you need Smiley

    EDIT:
    I'm still trying to figure out the polygon data :/
    this is the part that confuses me:
    http://www.daniweb.com/forums/post1426482.html#post1426482
    « Last Edit: December 26, 2010, 09:26:58 AM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #160 on: December 26, 2010, 11:27:25 AM »


    Some guy posted. You might wanna check that out when you get back

    And there's a slight problem with 32 bits:

    [redacted]

    See this: BitConverter.DoubleToInt64Bits(result);
    There's no such thing as BitConverter.DoubleToInt32Bits(result); Sad

    Gonna have to find a workaround.
    « Last Edit: December 26, 2010, 12:10:17 PM by BlackJax96 » Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #161 on: December 26, 2010, 11:53:53 AM »


    Some guy posted. You might wanna check that out when you get back

    And there's a slight problem with 32 bits:

    See this: BitConverter.DoubleToInt64Bits(result);
    There's no such thing as BitConverter.DoubleToInt32Bits(result); Sad

    Gonna have to find a workaround.

    just tell him you've already got the list,
    you just need a function to convert the floats to hex...

    try google search: C# convert float to hex

    see what google gives you Wink
    I'm a master at google btw

    just look for anything saying 32bit Smiley
    « Last Edit: December 26, 2010, 12:30:36 PM by Tcll » Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #162 on: December 26, 2010, 12:06:18 PM »


    I already know how to convert float to hex...
    And I did Google it
    Logged

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #163 on: December 26, 2010, 12:25:29 PM »


    I already know how to convert float to hex...
    And I did Google it

    well why you askin then =P
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #164 on: December 26, 2010, 12:32:42 PM »


    There was no question mark Tongue
    I was telling you that converting to 32 bits isn't possible the way I'm converting it. I have to change it
    Logged

    Pages:  1 ... 8 9 10 [11] 12 13 14 ... 1046
    Print
    Jump to: