User Tools

Site Tools


notes:cprog:spring2025:projects:mtb4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:cprog:spring2025:projects:mtb4 [2025/03/13 03:45] – [power ups] bdildinenotes:cprog:spring2025:projects:mtb4 [2025/03/13 03:45] (current) – [power ups] bdildine
Line 63: Line 63:
 void main() void main()
 { {
- Powerup *ptrPowerup;                          create a pointer to a powerup + Powerup *ptrPowerup;                          //create a pointer to a powerup 
- ptrPowerup->position.x = screen_width / 2;    set x and y values of the point struct within the powerup+ ptrPowerup->position.x = screen_width / 2;    //set x and y values of the point struct within the powerup
  ptrPowerup->position.y = screen_height / 2;  ptrPowerup->position.y = screen_height / 2;
- ptrPowerup->type = DUPLICATE;                   set the type variable within the powerup struct to DUPLICATE, which represent the underlying value of 1+ ptrPowerup->type = DUPLICATE;                   //set the type variable within the powerup struct to DUPLICATE, which represent the underlying value of 1
 } }
 </code> </code>
notes/cprog/spring2025/projects/mtb4.1741837534.txt.gz · Last modified: 2025/03/13 03:45 by bdildine