Page 1 of 1

The coder in my closet

Posted: Sat May 21, 2011 7:08 pm
by T0Mi
is a thirsty little guy.
So I gave him a "almost empty" waterskin (against the thirst)
and a little weed (for creative leasure).

This is the outcome:
(in-game footage)

[original zoom x4] - Beginning
Image

[added scale2x effect + scanlines] - Beginning
Image

[original zoom x4] - chewers
Image

[added scale2x effect + scanlines] - chewers
Image

[original zoom x4] - trollin
Image

[added scale2x effect + scanlines] - trollin
Image


It's based on the latest CSBwin source (11_059) and seems to run Conflux 3.5 BETA 6 just fine.
It is unknown what will happen when a overlay DSA kicks in though. DM/CSB most likely will run flawless.

Download:
http://cid-d210c7c0127e269f.office.live ... anline.exe
(click on Download/Herunterladen)

Instruction:
place "CSBwin_11_059_scale2x_scanline.exe" in your Conflux (or DM/CSB) directory and start it.
Select Size x4 from the misc menu to see the effect.


changes to the source:
minor changes took place in CSB.h and DSA.cpp. The scale2x effect was added to WinScreen.cpp.
If you guys and gals feel this is a worthwhile addition for CSBwin, and Paul is willing to add it, I will happily share the files. :)

Have fun.

Re: The coder in my closet

Posted: Sat May 21, 2011 7:54 pm
by ChristopheF
Nice effect!

To store your files, you can use http://skydrive.live.com/
Create a Windows Live ID, upload your files (up to 25 GB). You can easily make a folder public to share your files.

Re: The coder in my closet

Posted: Sun May 22, 2011 1:02 pm
by T0Mi
Good hint, thanks!

I've updated the links and added some full screen pictures.

Re: The coder in my closet

Posted: Sun May 22, 2011 9:22 pm
by Zyx
Interesting effect!

Re: The coder in my closet

Posted: Thu May 26, 2011 11:29 am
by T0Mi
I'm having soooo much fun with Conflux right now. I'm ill, poisoned and totally lost. :-)
Lots and lots of new and shiny things to discover. So many changes since 3.0. Had a bad dream already. Mophus was in it. :shock:

I will report back with a release version (with and without the scanlines). The debug that is on for download now might be a bit slow on older machines.

Re: The coder in my closet

Posted: Sun Aug 07, 2011 7:32 pm
by trompkins
T0Mi wrote:minor changes took place in CSB.h and DSA.cpp.
I wonder what those changes are... You see, I'm trying to pinpoint a bug which causes the Illegal Timer Entry when you play CSB (builds 11.057-11-059 are affected). DM plays fine. Steps to reproduce: just create a CSB party, make new adventure, load it up as you normally would -- and play for about 30 seconds.

Your build, although based on 11.059 source, doesn't exhibit this behaviour. Care to share the details?

Re: The coder in my closet

Posted: Sun Aug 07, 2011 7:48 pm
by Paul Stevens
Illegal Timer Entry when you play CSB (builds 11.057-11-059 are affected).
Why do you care? If the latest version of CSBwin (11.065) does not
display the bug then why not use that?

The 11_059 source is still available. So, if it is important
for some reason to pin-point this bug, I can undoubtedly do
that for you (if I can reproduce the bug. I haven't tried).

Re: The coder in my closet

Posted: Sun Aug 07, 2011 10:39 pm
by trompkins
I've compiled CSBWin for Nokia N900 using Ful Ir's Pandora port (the hardware is virtually identical). Someone noticed the bug -- now I'm trying to hunt it down, failing in process. The latest source available is .059 and somehow retrofitting the code to look like .056 doesn't feel quite right ;)

Sooo... If you'd be so kind...? I'm sure it's something trivial, I just can't for the life of me spot that little bugger. :)

Re: The coder in my closet

Posted: Sun Aug 07, 2011 11:03 pm
by Paul Stevens
OK....here is the problem

Code: Select all

void GameTimers::ConvertToSequencedTimers(void)
{
  // Note that the timers are still in big-endian order!
  // This will not bother us as we simpy copy them as-is and
  // append a couple of zero bytes which will bet swapped
  // but still remain zero!
  i32 i;
  i32 oldSize = sizeof(TIMER) - sizeof(m_timers[0].m_timerSequence); 
  ui8 *pOldTimer;
  TIMER *pNewTimer;
  for (i=m_maxTimers-1; i>=0; i--)
  {
    pOldTimer =   (ui8 *)m_timers + i*oldSize;
    pNewTimer =   m_timers + i;
    memmove(pNewTimer, pOldTimer, oldSize);
    pNewTimer->m_timerSequence = 0;
  };
}
See the 'memmove'? In version 11.059 it was 'memcpy'.
But we were copying from low to high addresses and the
bottom couple of timers were being copied onto
themselves. Destroying themselves. This happened
when converting old savegames.

Re: The coder in my closet

Posted: Mon Aug 08, 2011 1:45 am
by trompkins
Ha! It works!

Thank you, kind sir, all is well again.