Jump to content

CnCNet Forums

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

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 Star_Ship_0117
      I just joined. Can someone please point me to the latest instructions on how to setup CnCNet, patch the games to Win10 & any other important considerations on getting them to work online? Also, after everything is setup, where would i go to join a game?
      I would think this info should be front & center on CnCNet but i did not see it, sorry if I missed it.
      fyi i just bought the game pack on Origin and downloaded the games from there.
      Thanks a lot for your help!
    • By Fullmetaljacket1991
      Hi all, I have downloaded CnC gold and Red alert 1 from cnc net, both work online and skirmish perfectly yet when i install and to try to run the main campaign, it says couldn't launch main executable, am hugely gutted as an avid fan of the series, any suggestions please ? 
      I deleted ddraw.dll in the properties folder, campaign works but lags then when i alt tab it out the window is stuck and i can hear the game just no picture proper annoying now !
      Running this on
      HP Pavilion notebook
      2GB RAM
      30GB HDD
      HD graphics internal up to 1028MB 
      Windows 8.1 
    • By Onimot
      Figured I am better off asking for help over here then in the EA forums. I need help getting The First Decade version of Generals and Zero Hour to work on Windows 10. I already tried the options.ini fix aswell as different compatibility modes, but I keep getting a "Serious error" whenever I try to launch Generals. I also tried installing the directx that is on my TFD cd but apparently that one is not compatible with my version of Windows, and download the supposedly same version of directx online didnt help or I simply didnt install it properly, not sure. I currently have a chat windows open with EA tech support to see if I could get the game on Origin, but they have not responded at all since the very start so I am assuming they died on the other end.
    • By blackone90
      WHY THE HELL I GOT BANNED from the server? pls answer me

    • By WARwolf
      So after buying a new Alienware laptop, with Windows 10 Home, I got back into C&C after a long pause. I've been playing C&C since day 1. Before just finding this great site I downloaded C&C3 TS off of Steam.
      It runs perfectly fine, and I tweaked all the graphics to ultimate or very high and changed the screen size further above 1280x. The graphics are just damn amazing, right down to the drifting haze of tiberium you can see throughout the game. 
      There's just one problem right from the start.. there's absolutely no sound.. at all.
      And to state the obvious, yes the volume is up and the ingame audio settings are set up.
      Does anyone here have any suggestions? 
  • Recently Browsing   0 members

    No registered users viewing this page.