Two small DC2 bugs

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Two small DC2 bugs

Post by mat »

I can even present quick solutions for fixing the bugs :D

1. In DC2, eaters (yam yams) move up at startup. In RND, they move in a random direction.

Solution

File: files.c, line 4276 (according to RND 4.2.0.3)

Just add _UP.

Code: Select all

...
case 0x13f5:
      element = EL_YAMYAM_UP;
      break;
...
2. Gray doors are interperted in a wrong way in RND. In DC2, they are EM-style. In RND, they are RND-style.

Solution

File: files.c, line 5302

Just add EM_ before GATE_X_GRAY.

Code: Select all

...
case 0x1682:	// secret gate (red)
      element = EL_EM_GATE_1_GRAY;
      break;

    case 0x1683:	// gate (yellow)
      element = EL_EM_GATE_2;
      break;

    case 0x1684:	// secret gate (yellow)
      element = EL_EM_GATE_2_GRAY;
      break;

    case 0x1685:	// gate (blue)
      element = EL_EM_GATE_4;
      break;

    case 0x1686:	// secret gate (blue)
      element = EL_EM_GATE_4_GRAY;
      break;

    case 0x1687:	// gate (green)
      element = EL_EM_GATE_3;
      break;

    case 0x1688:	// secret gate (green)
      element = EL_EM_GATE_3_GRAY;
      break;
...
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Re: Two small DC2 bugs

Post by mat »

I found another improvements: in DC2 there is no bonus score for collecting extra shield and extra time. In RND, the values are set to 10.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Two small DC2 bugs

Post by Holger »

Thank you very much for these improvements! I will have a look at them and will most probably add them for the next version!

I'll write again after having a more detailed look at these fixes, but they look quite fine!
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Re: Two small DC2 bugs

Post by mat »

The next inadequacy: you put deadly shields into DC2 levels but a duration of them is assigned to normal shields, not the first ones.
Holger wrote: Tue Nov 10, 2020 10:41 am Thank you very much for these improvements!
Not at all :) I have been rummaging in the source code since sometime and I thought of adding better support for native DC2 levels as well as possible (for fun and skill).
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Two small DC2 bugs

Post by Holger »

Added all mentioned DC/DC2 fixes to the latest code base. Thanks again for your help! :)
The next inadequacy: you put deadly shields into DC2 levels but a duration of them is assigned to normal shields, not the first ones.
I've now set the duration as stored in the level file to both normal and deadly shields.

BTW: Does the shield element in DC2 levels behave like the "normal" or "deadly" shield type in R'n'D? As you wrote, I currently use deadly shields when reading native DC2 levels, but I do not have a working version of DC2 available anymore, and I am not sure anymore how this element behaved in original DC2...
mat
Posts: 62
Joined: Sun Sep 20, 2020 8:24 am

Re: Two small DC2 bugs

Post by mat »

I've noticed that a player that has the deadly shield can't walk into a mine until it explodes in RND. In DC2, the player is able to get into the mine as though it was a normal sand.

Thanks for implementing the fixes. Really appreciate it! :)
Post Reply