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: 27-Dec-07 21:21
Location: schland

The coder in my closet

Post by T0Mi » 21-May-11 17:08

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 22-May-11 11:01, edited 1 time in total.

User avatar
ChristopheF
Encyclopedist
Posts: 1260
Joined: 24-Oct-99 12:36
Location: France
Contact:

Re: The coder in my closet

Post by ChristopheF » 21-May-11 17:54

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: 27-Dec-07 21:21
Location: schland

Re: The coder in my closet

Post by T0Mi » 22-May-11 11:02

Good hint, thanks!

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

User avatar
Zyx
DSA Master
Posts: 2564
Joined: 5-Jun-00 11:53
Location: in the mind
Contact:

Re: The coder in my closet

Post by Zyx » 22-May-11 19:22

Interesting effect!

User avatar
T0Mi
Expert
Posts: 324
Joined: 27-Dec-07 21:21
Location: schland

Re: The coder in my closet

Post by T0Mi » 26-May-11 09:29

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: 7-Aug-11 17:15

Re: The coder in my closet

Post by trompkins » 7-Aug-11 17:32

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: 4100
Joined: 8-Apr-01 16:00
Location: Madison, Wisconsin, USA

Re: The coder in my closet

Post by Paul Stevens » 7-Aug-11 17:48

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: 7-Aug-11 17:15

Re: The coder in my closet

Post by trompkins » 7-Aug-11 20:39

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: 4100
Joined: 8-Apr-01 16:00
Location: Madison, Wisconsin, USA

Re: The coder in my closet

Post by Paul Stevens » 7-Aug-11 21:03

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: 7-Aug-11 17:15

Re: The coder in my closet

Post by trompkins » 7-Aug-11 23:45

Ha! It works!

Thank you, kind sir, all is well again.

Post Reply