From 8ed9a3a57ad08bac4e8441b0b87ddc946296a3fd Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Mon, 9 Jul 2018 22:33:29 +0200 Subject: Fixed "includes/defines/local variables" headers. --- HumanPlayer.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'HumanPlayer.cpp') diff --git a/HumanPlayer.cpp b/HumanPlayer.cpp index 766bf7d..c9b60e4 100644 --- a/HumanPlayer.cpp +++ b/HumanPlayer.cpp @@ -1,6 +1,6 @@ -/* ************************************** - * Includes * - * **************************************/ +/* ******************************************************************* + * Includes + * ******************************************************************/ #include "HumanPlayer.h" #include "System.h" @@ -16,11 +16,15 @@ * ******************************************************************/ /* ******************************************************************* - * Global variables + * Global variables definition + * ******************************************************************/ + +/* ******************************************************************* + * Local variables definition * ******************************************************************/ /* ******************************************************************* - * Local variables + * Local prototypes declaration * ******************************************************************/ /* ******************************************************************* @@ -45,7 +49,7 @@ Player(strPlayerName) *********************************************************************/ void HumanPlayer::buttonHandler(void) { - for (uint8_t btn = 0; btn < NUM_BTN; btn++) + for (uint8_t u8Btn = 0; u8Btn < NUM_BTN; u8Btn++) { /* This array of member functions lists * button pressed event handlers for each button. */ @@ -68,13 +72,13 @@ void HumanPlayer::buttonHandler(void) }; /* Member function pointer is valid. */ - if (gb.buttons.pressed(btn)) + if (gb.buttons.pressed(u8Btn)) { /* Key has been pressed. Execute both * HumanPlayer and Camera handlers, if available. */ /* Get pointer to HumanPlayer member function for selected button. */ - void (HumanPlayer::*const pBtnHandler)(void) = apBtnHandlerTable[btn]; + void (HumanPlayer::*const pBtnHandler)(void) = apBtnHandlerTable[u8Btn]; if (pBtnHandler != NULL) { @@ -88,7 +92,7 @@ void HumanPlayer::buttonHandler(void) } /* Get pointer to Camera member function for selected button. */ - void (Camera::*const pCameraBtnHandler)(void) = apBtnCameraHandlerTable[btn]; + void (Camera::*const pCameraBtnHandler)(void) = apBtnCameraHandlerTable[u8Btn]; if (pCameraBtnHandler != NULL) { -- cgit v1.2.3