void regInputToStruct(PlayerMusicData playerData, float timestamp, int stepID, int gridX, int gridY) { playerData.timestamp = timestamp; playerData.stepID = stepID; playerData.gridX = gridX; playerData.gridY = gridY; playerData.ready = false; }
//inputReg reg bool regPlayerInputCheckTime(PlayerMusicData playerData, int gridX, int gridY) { if(tempoInterval - timer <= maxAllowedDiff) //early { regNum += 1; regInputToStruct(playerData, tempoInterval - timer, resolvedStepID + 1, gridX, gridY); return true; } else if(timer <= maxAllowedDiff) //late { regNum += 1; regInputToStruct(playerData, tempoInterval - timer, resolvedStepID + 1, gridX, gridY); return true; } else //bad timing { regNum += 1; regInputToStruct(playerData, tempoInterval, resolvedStepID + 1, gridX, gridY); //reg to some value always lose in conflict return false; } }