Made betting work correctly.
This commit is contained in:
26
include/dawn/util/flags.h
Normal file
26
include/dawn/util/flags.h
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
|
||||
/**
|
||||
* Create a flag definition.
|
||||
*
|
||||
* @param n The flag number.
|
||||
* @return The bitwise flag for that number.
|
||||
*/
|
||||
#define flagDefine(n) (1 << n)
|
||||
|
||||
/**
|
||||
* Turns a flag off in a state.
|
||||
*
|
||||
* @param state State to update.
|
||||
* @param flag Flag to turn off.
|
||||
* @return The updated state.
|
||||
*/
|
||||
#define flagOff(state, flag) (state & ~flag)
|
Reference in New Issue
Block a user