The coder in my closet

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

The coder in my closet

Post 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.
Last edited by T0Mi on Sun May 22, 2011 1:01 pm, edited 1 time in total.
User avatar
ChristopheF
Encyclopedist
Posts: 1537
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: The coder in my closet

Post 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.
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Re: The coder in my closet

Post by T0Mi »

Good hint, thanks!

I've updated the links and added some full screen pictures.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Re: The coder in my closet

Post by Zyx »

Interesting effect!
User avatar
T0Mi
Expert
Posts: 324
Joined: Thu Dec 27, 2007 10:21 pm
Location: schland

Re: The coder in my closet

Post 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.
trompkins
Neophyte
Posts: 3
Joined: Sun Aug 07, 2011 7:15 pm

Re: The coder in my closet

Post 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?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: The coder in my closet

Post 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).
trompkins
Neophyte
Posts: 3
Joined: Sun Aug 07, 2011 7:15 pm

Re: The coder in my closet

Post 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. :)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: The coder in my closet

Post 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.
trompkins
Neophyte
Posts: 3
Joined: Sun Aug 07, 2011 7:15 pm

Re: The coder in my closet

Post by trompkins »

Ha! It works!

Thank you, kind sir, all is well again.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”