User Tools

Site Tools


notes:unix:fall2023:projects:fwg1

This is an old revision of the document!


FWG1

structures

defining

struct person {

  char name[32];
  short int age;
  int height;

}

struct person Stanley;

Stanley.age = 34;

Stanely.height = 74;

declaring

accessing

displaying sprites on screen

game controller input

you need to let the program know that you have a controller with “select_gamepad();”. In the () you can put 0, 1, 2, or 3 for the gamepad you want to use. 0 is the default.

to get an input from the gamepad, use the gamepad_direction() function and make variables for the x and y directions. You can also check to see if individual buttons are pressed with their respective functions found in the input.h API

notes/unix/fall2023/projects/fwg1.1698879518.txt.gz · Last modified: 2023/11/01 22:58 by jbernata