Rewrote assertions

This commit is contained in:
2023-11-01 21:48:10 -05:00
parent 0752d7ba4b
commit 0126661ce2
12 changed files with 146 additions and 133 deletions

View File

@ -0,0 +1,10 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
IAudioManager.cpp
)

View File

@ -0,0 +1,13 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "IAudioManager.hpp"
using namespace Dawn;
IAudioManager::IAudioManager(DawnGame *game) {
assertNotNull(game, "Game cannot be null.");
this->game = game;
}

View File

@ -4,22 +4,31 @@
// https://opensource.org/licenses/MIT
#pragma once
#include "dawnlibs.hpp"
#include "assert/assert.hpp"
namespace Dawn {
class DawnGame;
class IAudioManager {
public:
protected:
DawnGame *game;
IAudioManager(DawnGame *game) {
assertNotNull(game);
this->game = game;
}
public:
/**
* Construct a new IAudioManager.
*
* @param game The game instance.
*/
IAudioManager(DawnGame *game);
/**
* Initializes the audio manager system.
*/
virtual void init() = 0;
/**
* Ticks/Update the audio manager system.
*/
virtual void update() = 0;
};
}