-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSky.h
More file actions
43 lines (36 loc) · 1.33 KB
/
Copy pathSky.h
File metadata and controls
43 lines (36 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
Copyright (c) 2024-2025 Toksisitee. All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, refer to license.md or https://opensource.org/licenses/MIT
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
*/
#pragma once
#include "Assets.h"
namespace Assets
{
namespace Sky
{
constexpr uint32_t k_uWidth = 512;
constexpr uint32_t k_uHeight = 512;
constexpr uint32_t k_uSize = k_uWidth * k_uHeight;
constexpr uint32_t k_uNumColors = 16; // Max numbers of colors in the palette reserved for the sky texture
constexpr uint32_t k_uColorStart = 112; // Starting index in the palette for the sky texture
}
class CSky : public CAsset
{
public:
// ====== Virtual Overrides ======
Result LoadBin( const std::string& sFilePath );
Result LoadImg( const std::string& sFilePath );
Result ExportImg( const std::string& sFilePath );
Result ExportBin( const std::string& sFilePath );
bool CreateTexture( LPDIRECT3DDEVICE9 pD3DDevice );
inline void* GetPtr() override { return static_cast<void*>(&m_Data); }
// ================================
uint8_t FindColor( const Color& color );
private:
uint8_t m_Data[Sky::k_uWidth * Sky::k_uHeight];
};
}