Don Turner | bbdefad | 2018-04-26 12:58:44 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef SAMPLES_GAMECONSTANTS_H |
| 18 | #define SAMPLES_GAMECONSTANTS_H |
| 19 | |
| 20 | #include "ui/OpenGLFunctions.h" |
| 21 | |
| 22 | constexpr int kSampleRateHz = 48000; // Fixed sample rate, see README |
| 23 | constexpr int kBufferSizeInBursts = 2; // Use 2 bursts as the buffer size (double buffer) |
| 24 | constexpr int kMaxQueueItems = 4; // Must be power of 2 |
| 25 | |
| 26 | constexpr ScreenColor kScreenBackgroundColor = GREY; |
| 27 | constexpr ScreenColor kTapSuccessColor = GREEN; |
| 28 | constexpr ScreenColor kTapEarlyColor = ORANGE; |
| 29 | constexpr ScreenColor kTapLateColor = PURPLE; |
| 30 | |
| 31 | // This defines the size of the tap window in milliseconds. For example, if defined at 100ms the |
| 32 | // player will have 100ms before and after the centre of the tap window to tap on the screen and |
| 33 | // be successful |
| 34 | constexpr int kWindowCenterOffsetMs = 100; |
| 35 | |
| 36 | #endif //SAMPLES_GAMECONSTANTS_H |