Binary Flags Header

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

Binary Flags Header

Postby The_Rabid_Taco » Thu Nov 30, 2017 1:46 pm

Wrote a new header for the Titan Two: Binary Flags.

This will allow the use of a single byte to store up to 8 different bit level values.

How to use:

Make sure the header file is in the same folder as the script, or is in the include folder where GTuner IV is located.

If using from same folder as script add the following line to your main script file:
Code: Select all
#include "Binary Flags.gph"


If using from include folder where GTuner IV is located:
Code: Select all
#include <Binary Flags.gph>


Calling from within script:

The following is an example of how to use from within the script. It is assumed that you are using a configuration and pmem_load(); has already been called somewhere before this point.

Code: Select all
// In the following:
    // 4 - The location of the bit within the byte
    // TRUE - The boolean value to be set, can be TRUE or FALSE
    // 0 - The memory offset, valid values are 0 - 127
    binaryFlags(4, TRUE, 0);
User avatar
The_Rabid_Taco
Major
Major
 
Posts: 1066
Joined: Wed Mar 16, 2016 6:04 pm
Location: Pensacola, FL

Re: Binary Flags Header

Postby J2Kbr » Fri Dec 01, 2017 12:35 pm

Very nice header file... I can see myself making use of it.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Binary Flags Header

Postby bonefisher » Fri Dec 01, 2017 12:55 pm

Very nice! :smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am


Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 73 guests