Rewrote assertions
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/dawn/audio/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/dawn/audio/CMakeLists.txt
									
									
									
									
									
										Normal 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
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										13
									
								
								src/dawn/audio/IAudioManager.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/dawn/audio/IAudioManager.cpp
									
									
									
									
									
										Normal 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;
 | 
			
		||||
}
 | 
			
		||||
@@ -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;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user