CSBuild Questions (Best forum for them?)

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
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

CSBuild Questions (Best forum for them?)

Post by Gambit37 »

Paul

I went through the DM and CSB dungeons using your CSB Build to find out the timers attached to all the monster generators. This was to give to George Gilbert so that he can make the RTC versions of those dungeons more accurate.

I just wanted to check that these are completely accurate? I spent some time a while back looking at this manually. I determined that the increment for each change in byte value (8th byte of each generator) leaps in large amounts at key points. Has this been taken into account, or are you just using a basic function which assumes that every byte equates to say, 6 ticks?

(Does that make sense!!??)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: CSBuild Questions (Best forum for them?)

Post by Paul Stevens »

I hope that I did it right. I think that I did it
right. Here is the original code with my translation:

010812 302a 0006 MOVE.W 6(A2),D0
010816 c07c fff0 AND.W #65520,D0
01081a e848 LSR.W #4,D0
01081c e848 LSR.W #4,D0
01081e 3d40 fff6 MOVE.W D0,-10(A6)
w_10 = pDB3->disableTime();
010822 4a40 TST.W D0
010824 6764 BEQ $+102 (=0x01088a)
010826 026a ff80 0002 AND.W #65408,2(A2)
pDB3->actuatorType(0);
01082c 0c6e 007f fff6 CMP.W #127,-10(A6)
010832 630e BLS $+16 (=0x010842)
if (w_10 >= 128)
{
010834 302e fff6 MOVE.W -10(A6),D0
010838 907c 007e SUB.W #126,D0
01083c ed40 ASL.W #6,D0
01083e 3d40 fff6 MOVE.W D0,-10(A6)
w_10 = 64 * (w_10 - 126);
};
010842 1d7c 0041 fff0 MOVE.B #65,-16(A6)
timer.timerFunction = timerFunction65;
010848 202c d23a MOVE.L -11718(A4),D0
01084c 362e fff6 MOVE.W -10(A6),D3
010850 c6bc 0000 ffff AND.L #65535,D3
010856 d083 ADD.L D3,D0
010858 322c d746 MOVE.W -10426(A4),D1
01085c 48c1 EXT.L D1
01085e 263c 0000 0018 MOVE.L #24,D3
010864 e7a1 ASL.L D3,D1
010866 8081 OR.L D1,D0
010868 2d40 ffec MOVE.L D0,-20(A6)
timer.timerTime = d.Time + w_10 + (d.LoadedLevel<<24);
01086c 422e fff1 CLR.B -15(A6)
timer.timerUByte5 = 0;
010870 302e fffa MOVE.W -6(A6),D0
010874 1d40 fff2 MOVE.B D0,-14(A6)
timer.timerUByte6 = ub(targetX);
010878 302e fff8 MOVE.W -8(A6),D0
01087c 1d40 fff3 MOVE.B D0,-13(A6)
timer.timerUByte7 = ub(targetY);
010880 486e ffec PEA -20(A6)
010884 4eba f738 JSR $-2246 (=0x00ffbe=SetTimer)
010888 588f ADDQ.L #4,A7
SetTimer(&timer);
};
};
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: CSBuild Questions (Best forum for them?)

Post by Gambit37 »

Means nothing to me! I'll take that as a Yes then! :-) Thanks.
Post Reply

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