Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
MrParrot

Converting 8bit ddraw surface to 32-bit

Recommended Posts

I am currently implementing Bilinear filtering (and I will probably implement bicubic later) to cnc-ddraw's GDI render. First thing I must do is convert the 256 colors scheme used by C&C to 32-bits scheme. Currently, I tried to set the bmiHeader.biBitCount to 32 and use the line to convert a ddraw-surface to opengl texture:

((int*)upscaled)[i*dst_width+j] = ddraw->primary->palette->data_bgr[((unsigned char *)ddraw->primary->surface)[i*ddraw->primary->lPitch + j*ddraw->primary->lXPitch]];

But all that I get is a chunky blued output image.

 

Well, I was not going to post this message before revising things, but I pressed a bunch of keys by mistake on my keyboard and this topic was posted. Perhaps someone can give me some useful info.

Edited by MrParrot
incomplete post

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By TwinkyBong
      I love this launcher since I can play online with friends in a windowed 1280-800 resolution.
      But I have a question, I need to touch something to play the SINGLEPLAYER game (since I wanna stream the campaing) in a windowed 1280-800 resolution?
      If yes: How?
      If not: Well, I dont lost anything asking
    • By amokk
      I keep having to ignore the same users. does the ignore time out?? and if it does can it be made perm??
       
    • By js1m2
      Hi Everyone,
      I've got kind of a weird issue that i saw mentioned online many times, but no fix or solutions for it.
      So, in order of steps, i installed C&C Tiberian Sun (which says includes Firestorm) from The First Decade collection, installed the First Decade Patch v1.03 Revision 4, then installed the TSPatch (from http://downloads.cncnet.org/TSpatch.exe ) and was able to get Tiberian Sun to work via the TSLauncher
      However, i finished the Tiberian Sun campaign and just went to try Firestorm and for some reason am getting the message "Unable to read scenario" when trying to start any campaign, GDI or Nod.

      I'm not sure if I'm missing any files or there's some other issue going on. Any help would be appreciated. 
    • By MsMnMs
      I just downloaded the Tiberian Sun: Firestorm game from the site and I was so excited to get to play this game again. Then when I went to click on the icon to start playing, I received a notice that the extention 'Game.exe' had been moved or was deleted and I have no way to play this game that I just installed. Can anyone help tell me why? Windows 10 x64 OS.

    • By Bolty
      So i have no clue what happend, but at one day i just wasn't able to connect to cncnet, because some weird dronebl thing had somthing and the reason was once "none" and then "exherbospam" i have like no clue about any of this, i just want to play with my friend with my mod i was working on and thats it, i have been doing it for over 2 years now and there was no such problem. Beside that the "reasons" were from march 2019 is like really weird to me.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...