Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 Bomb blowing up EMPTY_FIELDs

closed-fixed
nobody
None
5
2010-08-23
2009-03-09
Jacek Stypula
No

In Atari Robbo the bomb blows-up empty space but not in GNU Robbo. The simplest patch is to add the following piece of code into blow_bomb(int x,int y) in board.c

/\* Blow-up empty space \*/
if \(\!coords\_out\_of\_range\(coords\) && \!board\[coords.x\]\[coords.y\].blowed && board\[coords.x\]\[coords.y\].type == EMPTY\_FIELD\)\{board\[coords.x\]\[coords.y\].blowed = 1;\}

just after

/\* Robbo was near blowing up \*/
if\(\(robbo.x == coords.x\) && \(robbo.y == coords.y\)\) \{
    kill\_robbo\(\);
\}

It isn't very elegant, but it works. The problem is different treatment of EMPTY_FIELDs. It's simply zeroing instead of using create_object(x,y,EMPTY_FIELD);

Because blowing EMTY_FIELDs takes time bord.h needs a patch too:

#define DELAY_BOMB_TARGET (DELAY_BIGBOOM + 3) /* Was DELAY_BIGBOOM * 2 (6) use RobboIX-003 and Original-020 to test */

Discussion

  • Jacek Stypula
    Jacek Stypula
    2009-03-09

    Patched files: board.c, board.h

     
    Attachments
  • Simcon
    Simcon
    2009-03-09

    Hi Jacek

    As you already know this is noted in Bugs.

    I think the exploding bomb needs to be reworked, including the animation.

    The best way to test the timing of the exploding bomb is to play RobboIX level 3. You should be able to just reach the scews before they blow-up :)

    This will be fixed for the next release and I will take note of your patch.

    Many thanks,
    Thunor

     
  • Simcon
    Simcon
    2009-03-18

    • status: open --> closed
     
  • Simcon
    Simcon
    2009-03-18

    Fixed in 0.62.

     
  • Thunor
    Thunor
    2010-08-23

    • status: closed --> closed-fixed