Simulacrum  1.2
Macros
sprimitives.cpp File Reference
#include "sprimitives.h"
#include <string>
#include <sstream>
#include <iostream>
#include <math.h>
#include <limits>
Include dependency graph for sprimitives.cpp:

Macros

#define GET_BLUE(X)   ( X & 0x00000000000000FF)
 
#define GET_GREEN(X)   ((X & 0x000000000000FF00)>>8)
 
#define GET_RED(X)   ((X & 0x0000000000FF0000)>>16)
 
#define GET_INTENSITY(X)   ((X & 0x000000FFFF000000)>>24)
 
#define GET_SEGMENT(X)   ((X & 0x00FFFF0000000000)>>40)
 
#define GET_VALID(X)   ((X & 0x8000000000000000)>>63)
 
#define GET_SIGNED(X)   ((X & 0x4000000000000000)>>62)
 
#define GET_RGB(X)   ( X & 0x0000000000FFFFFF)
 
#define GET_ALPHA(X)   ((X & 0x00000000FF000000)>>24)
 
#define SET_BLUE(X, Y)   (X = (X & 0xFFFFFFFFFFFFFF00) | ((Y) & 0x00000000000000FF))
 
#define SET_GREEN(X, Y)   (X = (X & 0xFFFFFFFFFFFF00FF) | ((Y<<8) & 0x000000000000FF00))
 
#define SET_RED(X, Y)   (X = (X & 0xFFFFFFFFFF00FFFF) | ((Y<<16) & 0x0000000000FF0000))
 
#define SET_INTENSITY(X, Y)   (X = (X & 0xFFFFFF0000FFFFFF) | ((Y<<24) & 0x000000FFFF000000))
 
#define SET_SEGMENT(X, Y)   (X = (X & 0xFF0000FFFFFFFFFF) | ((Y<<40) & 0x00FFFF0000000000))
 
#define SET_VALID(X, Y)   (X = (X & 0x7FFFFFFFFFFFFFFF) | ((Y<<63) & 0x8000000000000000))
 
#define SET_SIGNED(X, Y)   (X = (X & 0x3FFFFFFFFFFFFFFF) | ((Y<<62) & 0x4000000000000000))
 
#define SET_RGB(X, Y)   (X = (X & 0xFFFFFFFFFF000000) | ((Y) & 0x0000000000FFFFFF))
 
#define SET_ALPHA(X, Y)   (X = (X & 0xFFFFFFFF00FFFFFF) | ((Y<<24) & 0x00000000FF000000))
 

Macro Definition Documentation

◆ GET_ALPHA

#define GET_ALPHA (   X)    ((X & 0x00000000FF000000)>>24)

◆ GET_BLUE

#define GET_BLUE (   X)    ( X & 0x00000000000000FF)

◆ GET_GREEN

#define GET_GREEN (   X)    ((X & 0x000000000000FF00)>>8)

◆ GET_INTENSITY

#define GET_INTENSITY (   X)    ((X & 0x000000FFFF000000)>>24)

◆ GET_RED

#define GET_RED (   X)    ((X & 0x0000000000FF0000)>>16)

◆ GET_RGB

#define GET_RGB (   X)    ( X & 0x0000000000FFFFFF)

◆ GET_SEGMENT

#define GET_SEGMENT (   X)    ((X & 0x00FFFF0000000000)>>40)

◆ GET_SIGNED

#define GET_SIGNED (   X)    ((X & 0x4000000000000000)>>62)

◆ GET_VALID

#define GET_VALID (   X)    ((X & 0x8000000000000000)>>63)

◆ SET_ALPHA

#define SET_ALPHA (   X,
 
)    (X = (X & 0xFFFFFFFF00FFFFFF) | ((Y<<24) & 0x00000000FF000000))

◆ SET_BLUE

#define SET_BLUE (   X,
 
)    (X = (X & 0xFFFFFFFFFFFFFF00) | ((Y) & 0x00000000000000FF))

◆ SET_GREEN

#define SET_GREEN (   X,
 
)    (X = (X & 0xFFFFFFFFFFFF00FF) | ((Y<<8) & 0x000000000000FF00))

◆ SET_INTENSITY

#define SET_INTENSITY (   X,
 
)    (X = (X & 0xFFFFFF0000FFFFFF) | ((Y<<24) & 0x000000FFFF000000))

◆ SET_RED

#define SET_RED (   X,
 
)    (X = (X & 0xFFFFFFFFFF00FFFF) | ((Y<<16) & 0x0000000000FF0000))

◆ SET_RGB

#define SET_RGB (   X,
 
)    (X = (X & 0xFFFFFFFFFF000000) | ((Y) & 0x0000000000FFFFFF))

◆ SET_SEGMENT

#define SET_SEGMENT (   X,
 
)    (X = (X & 0xFF0000FFFFFFFFFF) | ((Y<<40) & 0x00FFFF0000000000))

◆ SET_SIGNED

#define SET_SIGNED (   X,
 
)    (X = (X & 0x3FFFFFFFFFFFFFFF) | ((Y<<62) & 0x4000000000000000))

◆ SET_VALID

#define SET_VALID (   X,
 
)    (X = (X & 0x7FFFFFFFFFFFFFFF) | ((Y<<63) & 0x8000000000000000))
Simulacrum Project