Author Topic: Dive: Why does not this work  (Read 332 times)

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 333
  • Karma: +28/-0
    • View Profile
Dive: Why does not this work
« on: April 18, 2024, 08:24:42 am »
I'm trying to use pure OS/2 for ClassiCube instead the much unsupported SDL2 window system (it even has a big #error Don't use it sign at the entry).
So I'm trying to use DIVE, but all I get is the frame window and the background in it. When I move the window around, the background stays in it, i.e. nothing gets drawn.
I looked at the SDL implementation and the Toolkit samples, but I can't understand, what's wrong with my code.

If somebody please can take a look at the attached code give me some hints. I think the ClassiCube code is well structured and understandable, but if you have questions about ask me.

Thanks

Flashback

  • Newbie
  • *
  • Posts: 10
  • Karma: +3/-1
    • View Profile
Re: Dive: Why does not this work
« Reply #1 on: April 18, 2024, 06:28:12 pm »
I seem to remember, that DIVE doesn't like 'BGR4'. Try to set up your source buffer as 'BGR3'. Also I don't see, where 'fccColorFormat' is initialized.

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 333
  • Karma: +28/-0
    • View Profile
Re: Dive: Why does not this work
« Reply #2 on: April 19, 2024, 12:55:32 am »
Actually, BGR4 was what the driver was given me as screen color scheme. Also it's only the color scheme for the frame buffer, which gets blitted to the screen color scheme.
« Last Edit: April 19, 2024, 07:27:17 am by Jochen Schäfer »

Flashback

  • Newbie
  • *
  • Posts: 10
  • Karma: +3/-1
    • View Profile
Re: Dive: Why does not this work
« Reply #3 on: April 19, 2024, 08:03:56 pm »
Take a look here. It seems that DIVE doesn't support blitting from 32bit source buffers. No matter what colour depth the screen is using. You may also want to check the return values of DiveSetupBlitter and DiveBlitImage.

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 333
  • Karma: +28/-0
    • View Profile
Re: Dive: Why does not this work
« Reply #4 on: April 19, 2024, 11:10:24 pm »
Ok, then I have to look how I get that to work.