mirror of
				https://github.com/hedge-dev/XenosRecomp.git
				synced 2025-10-30 07:12:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			No EOL
		
	
	
		
			554 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			No EOL
		
	
	
		
			554 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <Windows.h>
 | |
| #include <dxcapi.h>
 | |
| 
 | |
| #include <bit>
 | |
| #include <cassert>
 | |
| #include <cstdint>
 | |
| #include <execution>
 | |
| #include <filesystem>
 | |
| #include <format>
 | |
| #include <map>
 | |
| #include <string>
 | |
| #include <unordered_map>
 | |
| #include <xxhash.h>
 | |
| 
 | |
| template<typename T>
 | |
| struct be
 | |
| {
 | |
|     T value;
 | |
| 
 | |
|     T get() const
 | |
|     {
 | |
|         if constexpr (std::is_enum_v<T>)
 | |
|             return T(std::byteswap(std::underlying_type_t<T>(value)));
 | |
|         else
 | |
|             return std::byteswap(value);
 | |
|     }
 | |
| 
 | |
|     operator T() const
 | |
|     {
 | |
|         return get();
 | |
|     }
 | |
| };  
 | 
