/**
 * 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)