GBDK 2020 Docs  4.1.1
API Documentation for GBDK 2020
joypads_t Struct Reference

#include <gbdk-lib/include/gb/gb.h>

Data Fields

uint8_t npads
 
union {
   struct {
      uint8_t   joy0
 
      uint8_t   joy1
 
      uint8_t   joy2
 
      uint8_t   joy3
 
   } 
 
   uint8_t   joypads [4]
 
}; 
 
union {
   struct {
      uint8_t   joy0
 
      uint8_t   joy1
 
      uint8_t   joy2
 
      uint8_t   joy3
 
   } 
 
   uint8_t   joypads [4]
 
}; 
 
union {
   struct {
      uint8_t   joy0
 
      uint8_t   joy1
 
      uint8_t   joy2
 
      uint8_t   joy3
 
   } 
 
   uint8_t   joypads [4]
 
}; 
 
union {
   struct {
      uint8_t   joy0
 
      uint8_t   joy1
 
      uint8_t   joy2
 
      uint8_t   joy3
 
   } 
 
   uint8_t   joypads [4]
 
}; 
 

Detailed Description

Multiplayer joypad structure.

Must be initialized with joypad_init() first then it may be used to poll all avaliable joypads with joypad_ex()

Field Documentation

◆ npads

uint8_t joypads_t::npads

◆ joy0

uint8_t joypads_t::joy0

◆ joy1

uint8_t joypads_t::joy1

◆ joy2

uint8_t joypads_t::joy2

◆ joy3

uint8_t joypads_t::joy3

◆ joypads

uint8_t joypads_t::joypads[4]

◆ 

union { ... }

◆ 

union { ... }

◆ 

union { ... }

◆ 

union { ... }

The documentation for this struct was generated from the following files: