Subversion Repositories Games.Rick Dangerous

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 10
Line 23... Line 23...
23
/*
23
/*
24
 * Entity action
24
 * Entity action
25
 *
25
 *
26
 * ASM 242C
26
 * ASM 242C
27
 */
27
 */
-
 
28
#define seq c1
28
void e_bonus_action (U8 e)
29
void e_bonus_action (U8 e)
29
{
30
{
30
   if (E_RICK_STTST (E_RICK_STZOMBIE))
31
   if (E_RICK_STTST (E_RICK_STZOMBIE))
31
      return;
32
      return; // don't pick up stuff when we're dead
32
 
33
 
-
 
34
#define seq c1
-
 
35
 
-
 
36
   if (ent_ents[e].seq == 0)
-
 
37
   {
33
   if (e_rick_boxtest (e))
38
      if (e_rick_boxtest (e))
-
 
39
      {
-
 
40
         game_score += 500;
-
 
41
         syssnd_play (WAV_BONUS, 1);
-
 
42
         map_marks[ent_ents[e].mark].ent |= MAP_MARK_NACT;
-
 
43
         ent_ents[e].seq = 1;
-
 
44
         ent_ents[e].sprite = 0xad; // flying number '500'
-
 
45
         ent_ents[e].front = TRUE;
-
 
46
         ent_ents[e].y -= 0x08;
-
 
47
      }
-
 
48
   }
-
 
49
   else if ((ent_ents[e].seq > 0) && (ent_ents[e].seq < 10))
34
   {
50
   {
35
      game_score += 500;
51
      ent_ents[e].seq++;
36
      syssnd_play (WAV_BONUS, 1);
-
 
37
      map_marks[ent_ents[e].mark].ent |= MAP_MARK_NACT;
52
      ent_ents[e].y -= 2; // raise the floating number progressively during 10 frames
38
      ent_ents[e].n = 0;
-
 
39
   }
53
   }
-
 
54
   else
-
 
55
      ent_ents[e].n = 0;
40
}
56
}