Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #ifndef CONSTANTS_H
- #define CONSTANTS_H
- const int WINDOW_WIDTH = 640;
- const int WINDOW_HEIGHT = 480;
- const char* APP_NAME = "5T&H";
- const char* WINDOW_NAME = "DIRECTX";
- bool FULLSCREEN = false;
- template <typename T>
- void SafeRelease(T &ptr)
- {
- if (ptr)
- {
- ptr->Release();
- ptr = NULL;
- }
- }
- #define SAFE_RELEASE SafeRelease;
- template <typename T>
- void SafeDelete(T &ptr)
- {
- if (ptr)
- {
- delete ptr;
- ptr = NULL;
- }
- }
- #define SAFE_DELETE SafeDelete;
- template <typename T>
- void SafeDeleteArray(T &ptr)
- {
- if (ptr)
- {
- delete[] ptr;
- ptr = NULL;
- }
- }
- #define SAFE_DELETE_ARRAY SafeDeleteArray;
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement