Author Topic: 16 bit textures  (Read 18884 times)

fuchisasquatch

  • *
  • Posts: 111
    • View Profile
    • http://aa.1asphost.com/sasquatch/
16 bit textures
« Reply #50 on: 2004-08-20 06:52:55 »
Woah woah...

Read it again

Quote

It is not the same what are you talking about. Look at this:

(255) * (31/255) = ~31
(255) * (255/31) = ~2097


i was comparing

* (31/255) and / (255/31)

Not what you wrote there..and im not accusing you of stealing my idea i just think its pointless to write the same thing.

I already gave the conversion [ / (255 / 31)] and then you posted practically the same thing.

And yeah i agree with you and that speed thing.

Quote

Quote

Quote

Ok well to get the value of the number in the range 0 to 31 you would do

Code:
texnum = bmpnum / (255 / 31)



* (31 / 255) is the same thing as / (255 / 31) and why are you guys posting crap when he already said he got it to work..


Because he said he did not know how to convert back.


he already figured it out without using that..look here

Quote

I ended up with this code:

Code: [Select]

        texfs.Read(kolor, sizeof(kolor));
        r := (kolor and $7C00) shr 10;
        g := (kolor and $3E0) shr 5;
        b := (kolor and $1F);
        r := Round(r * (255 / 31));
        g := Round(g * (255 / 31));
        b := Round(b * (255 / 31));
        destfs.Write(r, sizeof(r));
        destfs.Write(g, sizeof(g));
        destfs.Write(b, sizeof(b));


And it seems to be working fine . Thank you guys. You can find program on my new site.

Link: MaV's Page


Ok? So you understand what im saying now..?

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
16 bit textures
« Reply #51 on: 2004-08-20 13:52:28 »
Guys, guys, don't argue :). Problem is over, solution is above, so there's no need to argue ;).

Cyberman

  • *
  • Posts: 1572
    • View Profile
16 bit textures
« Reply #52 on: 2004-08-20 19:50:31 »
Quote from: M4v3R
Guys, guys, don't argue :). Problem is over, solution is above, so there's no need to argue ;).

So how are you doing? is your project mostly functional? no smoke let out of you brain :D

Cyb

mav

  • *
  • Posts: 239
  • The Sauce team
    • View Profile
16 bit textures
« Reply #53 on: 2004-09-06 16:56:02 »
Yes, it's functional (sorry for long respond, I've been on vacation). You can find it on my page (www button :)).