ArgType

Enum ArgType 

Source
pub enum ArgType {
Show 96 variants Word = 0, Opcode = 1, Coordi = 2, Coordq = 3, Pal = 4, Tlut = 5, Timg = 6, Tmem = 7, Tile = 8, Fmt = 9, Siz = 10, Dim = 11, Cm = 12, Tm = 13, Ts = 14, Dxt = 15, Tag = 16, Pm = 17, Colorpart = 18, Color = 19, Lodfrac = 20, Cimg = 21, Zimg = 22, Ac = 23, Ad = 24, Cd = 25, Ccpre = 26, Ccmuxa = 27, Ccmuxb = 28, Ccmuxc = 29, Ccmuxd = 30, Acmuxabd = 31, Acmuxc = 32, Cv = 33, Tc = 34, Cyc = 35, Zs = 36, Ck = 37, Keyscale = 38, Keywidth = 39, Zi = 40, Rm1 = 41, Rm2 = 42, Sc = 43, Td = 44, Tf = 45, Tl = 46, Tt = 47, Tp = 48, Line = 49, Vtx = 50, Vtxflag = 51, Dl = 52, Zraw = 53, Dlflag = 54, Cr = 55, Num = 56, Fogz = 57, Fogp = 58, Mtxptr = 59, Gm = 60, Mwo_matrix = 61, Linewd = 62, Uctext = 63, Ucdata = 64, Size = 65, Lookatptr = 66, Mtxparam = 67, Mtxstack = 68, Mwo_point = 69, Wscale = 70, Seg = 71, Segptr = 72, Lightsn = 73, Numlights = 74, Lightnum = 75, Lightptr = 76, Tcscale = 77, Switch = 78, St = 79, Stdelta = 80, Vtxptr = 81, Vpptr = 82, Dram = 83, Sftlo = 84, Othermodelo = 85, Sfthi = 86, Othermodehi = 87, Mw = 88, Mwo = 89, Mwo_clip = 90, Mwo_lightcol = 91, Mv = 92, Mvo = 93, Dmem = 94, Dmaflag = 95,
}
Expand description

The type of an Gfx argument.

Variants§

§

Word = 0

generic word

§

Opcode = 1

command opcode (G_*)

§

Coordi = 2

integer coordinate

§

Coordq = 3

fractional (q10.2) coordinate

§

Pal = 4

palette index

§

Tlut = 5

tlut pointer

§

Timg = 6

texture image pointer

§

Tmem = 7

tmem address

§

Tile = 8

tile index

§

Fmt = 9

texture format

§

Siz = 10

texture pixel size

§

Dim = 11

integer dimension (width / height)

§

Cm = 12

clamp and mirror flags

§

Tm = 13

tile mask

§

Ts = 14

tile shift

§

Dxt = 15

texture dxt

§

Tag = 16

generic tag

§

Pm = 17

pipeline mode

§

Colorpart = 18

color component

§

Color = 19

color

§

Lodfrac = 20

lod fraction (q0.8)

§

Cimg = 21

color image pointer

§

Zimg = 22

depth image pointer

§

Ac = 23

alpha compare mode

§

Ad = 24

alpha dither mode

§

Cd = 25

color dither mode

§

Ccpre = 26

color combiner preset index

§

Ccmuxa = 27

color mux operand (a)

§

Ccmuxb = 28

color mux operand (b)

§

Ccmuxc = 29

color mux operand (c)

§

Ccmuxd = 30

color mux operand (d)

§

Acmuxabd = 31

alpha mux operand (a, b, or d)

§

Acmuxc = 32

alpha mux operand (c)

§

Cv = 33

color convert operand

§

Tc = 34

texture convert mode

§

Cyc = 35

cycle type

§

Zs = 36

depth source mode

§

Ck = 37

combine key mode

§

Keyscale = 38

combine key scale

§

Keywidth = 39

combine key width

§

Zi = 40

integer depth

§

Rm1 = 41

cycle 1 render mode

§

Rm2 = 42

cycle 2 render mode

§

Sc = 43

scissor mode

§

Td = 44

texture detail mode

§

Tf = 45

texture filter mode

§

Tl = 46

texture LOD mode

§

Tt = 47

textuure LUT mode

§

Tp = 48

texture perspective mode

§

Line = 49

texture line size

§

Vtx = 50

vertex index

§

Vtxflag = 51

vertex flag

§

Dl = 52

display list pointer

§

Zraw = 53

raw depth value (q16.16)

§

Dlflag = 54

display list flag

§

Cr = 55

clip ratio

§

Num = 56

element count

§

Fogz = 57

fog factor

§

Fogp = 58

fog position (0 - 1000)

§

Mtxptr = 59

matrix pointer

§

Gm = 60

geometry mode

§

Mwo_matrix = 61

matrix moveword offset

§

Linewd = 62

line width (1.5 + q7.1)

§

Uctext = 63

microcode text pointer

§

Ucdata = 64

microcode data pointer

§

Size = 65

data size

§

Lookatptr = 66

lookat pointer

§

Mtxparam = 67

matrix param

§

Mtxstack = 68

matrix param (stack select only)

§

Mwo_point = 69

vertex moveword offset

§

Wscale = 70

w-component scale (perspnorm)

§

Seg = 71

segment number

§

Segptr = 72

segment pointer

§

Lightsn = 73

dereferenced LightsM (0-7 or n) pointer

§

Numlights = 74

light count (NUMLIGHTS_*)

§

Lightnum = 75

light number (LIGHT_*)

§

Lightptr = 76

diffuse or ambient light pointer

§

Tcscale = 77

texture coordinate scale

§

Switch = 78

on-off value

§

St = 79

vertex coordinate (q10.5)

§

Stdelta = 80

vertex coordinate delta (q5.10)

§

Vtxptr = 81

vertex pointer

§

Vpptr = 82

viewport pointer

§

Dram = 83

generic dram address

§

Sftlo = 84

othermode lo shift

§

Othermodelo = 85

othermode lo value

§

Sfthi = 86

othermode hi shift

§

Othermodehi = 87

othermode hi value

§

Mw = 88

moveword index

§

Mwo = 89

moveword offset

§

Mwo_clip = 90

clip ratio moveword offset

§

Mwo_lightcol = 91

light color moveword offset

§

Mv = 92

movemem index

§

Mvo = 93

movemem offset

§

Dmem = 94

dmem address

§

Dmaflag = 95

dma io flag

Implementations§

Source§

impl ArgType

Source

pub const fn as_str(&self) -> &'static str

An string represation of the argument type.

Source

pub const fn from_u32(value: u32) -> Option<Self>

Convert an integer value to an argument type.

Source

pub const fn to_u32(&self) -> u32

Convert this argument type to a plain integer.

Trait Implementations§

Source§

impl Clone for ArgType

Source§

fn clone(&self) -> ArgType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ArgType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ArgType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ArgType> for ArgType

Source§

fn from(value: ArgType) -> Self

Converts to this type from the input type.
Source§

impl From<ArgType> for ArgType

Source§

fn from(value: ArgType) -> ArgType

Converts to this type from the input type.
Source§

impl From<ArgType> for u32

Source§

fn from(value: ArgType) -> Self

Converts to this type from the input type.
Source§

impl Hash for ArgType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ArgType

Source§

fn cmp(&self, other: &ArgType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ArgType

Source§

fn eq(&self, other: &ArgType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ArgType

Source§

fn partial_cmp(&self, other: &ArgType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<u32> for ArgType

Source§

type Error = IntoArgTypeError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for ArgType

Source§

impl Eq for ArgType

Source§

impl StructuralPartialEq for ArgType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.