OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [actel_m1a3pl_dev_kit/] [software/] [spacewar/] [point.c] - Blame information for rev 161

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 80 olivier.gi
#include "spacewar.h"
2
 
3
//************************************************************
4
// externals
5
//
6
 
7
extern void set_xy(int, int);
8
 
9
//************************************************************
10
//
11
// point
12
//
13
//    displays the torpedos for one rocket
14
//    if pt_dx = -1 torp is inactive
15
//
16
/* Description:
17
Display the active torpedos as points from the structure passed into function.
18
A torpedo is active if its x position is not equal to -1.
19
*/
20
void point(rkt_data *rkt)
21
{
22
  int i;
23
 
24
  for(i = 0; i < ammo; i++) {
25
    if(rkt->pt_dx[i] != -1) {
26
      set_xy(rkt->pt_dx[i], rkt->pt_dy[i]);   // move torp to new position
27
    }
28
  }
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.