| /TwlSDK-5.4/include/nitro/math/ |
| D | math.h | 80 #define MATH_CLAMP(x, low, high) ( ( (x) > (high) ) ? (high) : ( ( (x) < (low) ) ? (low) : (x) ) ) argument 150 #define MATH_DIVUP(x, base) (((x) + ((base)-1)) / (base)) argument 162 #define MATH_ROUNDUP(x, base) (((x) + ((base)-1)) & ~((base)-1)) argument 174 #define MATH_ROUNDDOWN(x, base) ((x) & ~((base)-1)) argument 185 #define MATH_ROUNDUP32(x) MATH_ROUNDUP(x, 32) argument 196 #define MATH_ROUNDDOWN32(x) MATH_ROUNDDOWN(x, 32) argument 208 u32 MATH_CountLeadingZerosFunc(u32 x); 216 SDK_INLINE u32 MATH_CountLeadingZerosInline(u32 x) in MATH_CountLeadingZerosInline() argument 220 clz x, x} in MATH_CountLeadingZerosInline() 221 return x; in MATH_CountLeadingZerosInline() [all …]
|
| D | rand.h | 29 u64 x; // Random number value member 38 u32 x; // Random number value member 58 context->x = seed; in MATH_InitRand32() 78 context->x = context->mul * context->x + context->add; in MATH_Rand32() 83 return (u32)(context->x >> 32); in MATH_Rand32() 87 return (u32)(((context->x >> 32) * max) >> 32); in MATH_Rand32() 105 context->x = seed; in MATH_InitRand16() 125 context->x = context->mul * context->x + context->add; in MATH_Rand16() 130 return (u16)(context->x >> 16); in MATH_Rand16() 134 return (u16)(((context->x >> 16) * max) >> 16); in MATH_Rand16()
|
| /TwlSDK-5.4/include/nitro/gx/ |
| D | gx_vramcnt.h | 70 #define GX_VRAM_LCDC_ASSERT(x) \ argument 71 SDK_MINMAX_ASSERT(x, GX_VRAM_LCDC_NONE, GX_VRAM_LCDC_ALL) 106 #define GX_VRAM_BG_ASSERT(x) \ argument 107 SDK_ASSERT( (x) == GX_VRAM_BG_NONE || \ 108 (x) == GX_VRAM_BG_16_F || \ 109 (x) == GX_VRAM_BG_16_G || \ 110 (x) == GX_VRAM_BG_32_FG || \ 111 (x) == GX_VRAM_BG_64_E || \ 112 (x) == GX_VRAM_BG_80_EF || \ 113 (x) == GX_VRAM_BG_80_EG || \ [all …]
|
| D | g3.h | 131 #define GX_VALID_OPCODE_ASSERT(x) SDK_ASSERT((x == 0xFF) || ((x >= 0) && (x <= 0x72))) argument 145 #define GX_MTXMODE_ASSERT(x) \ argument 146 SDK_MINMAX_ASSERT(x, GX_MTXMODE_PROJECTION, GX_MTXMODE_TEXTURE) 153 #define GX_MTX_POP_NUM_ASSERT(x) SDK_MINMAX_ASSERT(x, -30, 31) argument 159 #define GX_MTX_STORE_NUM_ASSERT(x) SDK_MINMAX_ASSERT(x, 0, 30) argument 164 #define GX_MTX_RESTORE_NUM_ASSERT(x) SDK_MINMAX_ASSERT(x, 0, 30) argument 178 #define GX_BEGIN_ASSERT(x) \ argument 179 SDK_MINMAX_ASSERT(x, GX_BEGIN_TRIANGLES, GX_BEGIN_QUAD_STRIP) 191 #define GX_SORTMODE_ASSERT(x) \ argument 192 SDK_MINMAX_ASSERT(x, GX_SORTMODE_AUTO, GX_SORTMODE_MANUAL) [all …]
|
| D | gx_capture.h | 63 #define GX_CAPTURE_DEST_ASSERT(x) \ argument 64 SDK_MINMAX_ASSERT(x, GX_CAPTURE_DEST_VRAM_A_0x00000, GX_CAPTURE_DEST_VRAM_D_0x18000) 76 #define GX_CAPTURE_SIZE_ASSERT(x) \ argument 77 SDK_MINMAX_ASSERT(x, GX_CAPTURE_SIZE_128x128, GX_CAPTURE_SIZE_256x192) 86 #define GX_CAPTURE_SRCA_ASSERT(x) \ argument 87 SDK_MINMAX_ASSERT(x, GX_CAPTURE_SRCA_2D3D, GX_CAPTURE_SRCA_3D) 99 #define GX_CAPTURE_SRCB_ASSERT(x) \ argument 100 SDK_ASSERT( (x) == GX_CAPTURE_SRCB_VRAM_0x00000 || \ 101 (x) == GX_CAPTURE_SRCB_MRAM || \ 102 (x) == GX_CAPTURE_SRCB_VRAM_0x08000 || \ [all …]
|
| D | gxcommon.h | 74 #define GX_POLYGONID_ASSERT(x) SDK_ASSERT((x) >= 0 && (x) <= 63) argument 75 #define GX_ALPHA_ASSERT(x) SDK_ASSERT((x) >= 0 && (x) <= 31) argument 76 #define GX_DEPTH_ASSERT(x) SDK_ASSERT((x) >= 0 && (x) <= 0x7fff) argument 84 #define GX_VECFX10(x, y, z) \ argument 85 …((VecFx10)(((((x) >> (FX32_DEC_SIZE - GX_FX10_DEC_SIZE)) & GX_FX10_MASK) << GX_VEC_FX10_X_SHIFT) |…
|
| D | gx.h | 115 #define GX_BGMODE_ASSERT(x) \ argument 116 SDK_MINMAX_ASSERT(x, GX_BGMODE_0, GX_BGMODE_6) 125 #define GX_BG0_AS_ASSERT(x) \ argument 126 SDK_MINMAX_ASSERT(x, GX_BG0_AS_2D, GX_BG0_AS_3D) 142 #define GX_DISPMODE_ASSERT(x) \ argument 143 SDK_ASSERT( (x) == GX_DISPMODE_OFF || \ 144 (x) == GX_DISPMODE_GRAPHICS || \ 145 (x) == GX_DISPMODE_VRAM_A || \ 146 (x) == GX_DISPMODE_VRAM_B || \ 147 (x) == GX_DISPMODE_VRAM_C || \ [all …]
|
| D | g3imm.h | 59 static void G3_Scale(fx32 x, fx32 y, fx32 z); 60 static void G3_Translate(fx32 x, fx32 y, fx32 z); 62 static void G3_Normal(fx16 x, fx16 y, fx16 z); 64 static void G3_Vtx(fx16 x, fx16 y, fx16 z); 65 static void G3_Vtx10(fx16 x, fx16 y, fx16 z); 66 static void G3_VtxXY(fx16 x, fx16 y); 67 static void G3_VtxXZ(fx16 x, fx16 z); 69 static void G3_VtxDiff(fx16 x, fx16 y, fx16 z); 80 static void G3_LightVector(GXLightId lightID, fx16 x, fx16 y, fx16 z); 88 static void G3_PositionTest(fx16 x, fx16 y, fx16 z); [all …]
|
| D | g2_oam.h | 65 u32 x:9; 178 #define GX_OAM_CPARAM_ASSERT(x) SDK_MINMAX_ASSERT(x, 0, 15) argument 179 #define GX_OAM_RSPARAM_ASSERT(x) SDK_MINMAX_ASSERT(x, 0, 31) argument 180 #define GX_OAM_CHARNAME_ASSERT(x) SDK_MINMAX_ASSERT(x, 0, 1023) argument 203 #define GX_OAM_SHAPE_ASSERT(x) \ argument 204 SDK_ASSERT( (x) == GX_OAM_SHAPE_8x8 || \ 205 (x) == GX_OAM_SHAPE_16x16 || \ 206 (x) == GX_OAM_SHAPE_32x32 || \ 207 (x) == GX_OAM_SHAPE_64x64 || \ 208 (x) == GX_OAM_SHAPE_16x8 || \ [all …]
|
| /TwlSDK-5.4/build/libraries/math/common/src/ |
| D | math.c | 33 u32 MATH_CountLeadingZerosFunc(u32 x) in MATH_CountLeadingZerosFunc() argument 40 clz x, x} in MATH_CountLeadingZerosFunc() 41 return x; in MATH_CountLeadingZerosFunc() 47 u32 MATH_CountLeadingZerosFunc(u32 x) in MATH_CountLeadingZerosFunc() argument 53 y = x >> 16; in MATH_CountLeadingZerosFunc() 57 x = y; in MATH_CountLeadingZerosFunc() 59 y = x >> 8; in MATH_CountLeadingZerosFunc() 63 x = y; in MATH_CountLeadingZerosFunc() 65 y = x >> 4; in MATH_CountLeadingZerosFunc() 69 x = y; in MATH_CountLeadingZerosFunc() [all …]
|
| D | dgt_md5.c | 41 #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) argument 42 #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) argument 43 #define H(x, y, z) ((x) ^ (y) ^ (z)) argument 44 #define I(x, y, z) ((y) ^ ((x) | (~z))) argument 45 #define ROTL(x, n) (((x) << (n)) | ((x) >> (32-(n)))) argument 49 inline static u32 CalcRound1(u32 a, u32 b, u32 c, u32 d, u32 x, u32 s, u32 t) in CalcRound1() argument 51 return b + ROTL((a + F(b,c,d) + x + t), s); in CalcRound1() 54 inline static u32 CalcRound2(u32 a, u32 b, u32 c, u32 d, u32 x, u32 s, u32 t) in CalcRound2() argument 56 return b + ROTL((a + G(b,c,d) + x + t), s); in CalcRound2() 59 inline static u32 CalcRound3(u32 a, u32 b, u32 c, u32 d, u32 x, u32 s, u32 t) in CalcRound3() argument [all …]
|
| /TwlSDK-5.4/build/libraries/fx/common/src/ |
| D | fx_atan.c | 171 fx16 FX_Atan(fx32 x) in FX_Atan() argument 173 if (x >= 0) in FX_Atan() 175 if (x > FX32_ONE) in FX_Atan() 177 return (fx16)(6434 - FX_AtanTable_[FX_Inv(x) >> 5]); in FX_Atan() 179 else if (x < FX32_ONE) in FX_Atan() 181 return FX_AtanTable_[x >> 5]; in FX_Atan() 190 if (x < -FX32_ONE) in FX_Atan() 192 return (fx16)(-6434 + FX_AtanTable_[FX_Inv(-x) >> 5]); in FX_Atan() 194 else if (x > -FX32_ONE) in FX_Atan() 196 return (fx16)-FX_AtanTable_[-x >> 5]; in FX_Atan() [all …]
|
| D | fx_atanidx.c | 166 u16 FX_AtanIdx(fx32 x) in FX_AtanIdx() argument 168 if (x >= 0) in FX_AtanIdx() 170 if (x > FX32_ONE) in FX_AtanIdx() 172 return (u16)(16384 - FX_AtanIdxTable_[FX_Inv(x) >> 5]); in FX_AtanIdx() 174 else if (x < FX32_ONE) in FX_AtanIdx() 176 return (u16)FX_AtanIdxTable_[x >> 5]; in FX_AtanIdx() 185 if (x < -FX32_ONE) in FX_AtanIdx() 187 return (u16)(-16384 + FX_AtanIdxTable_[FX_Inv(-x) >> 5]); in FX_AtanIdx() 189 else if (x > -FX32_ONE) in FX_AtanIdx() 191 return (u16)-FX_AtanIdxTable_[-x >> 5]; in FX_AtanIdx() [all …]
|
| D | fx_vec.c | 45 ab->x = a->x + b->x; in VEC_Add() 69 ab->x = a->x - b->x; in VEC_Subtract() 93 ab->x = (fx16)(a->x + b->x); in VEC_Fx16Add() 117 ab->x = (fx16)(a->x - b->x); in VEC_Fx16Subtract() 138 return (fx32)(((fx64)a->x * b->x + in VEC_DotProduct() 159 tmp1 = (a->x * b->x) + (a->y * b->y); in VEC_Fx16DotProduct() 179 fx32 x, y, z; in VEC_CrossProduct() local 184 x = (fx32)(((fx64)a->y * b->z - (fx64)a->z * b->y + (1 << (FX64_SHIFT - 1))) >> FX64_SHIFT); in VEC_CrossProduct() 186 y = (fx32)(((fx64)a->z * b->x - (fx64)a->x * b->z + (1 << (FX64_SHIFT - 1))) >> FX64_SHIFT); in VEC_CrossProduct() 188 z = (fx32)(((fx64)a->x * b->y - (fx64)a->y * b->x + (1 << (FX64_SHIFT - 1))) >> FX32_SHIFT); in VEC_CrossProduct() [all …]
|
| D | fx_cp.c | 109 fx32 FX_Sqrt(fx32 x) in FX_Sqrt() argument 112 if (x > 0) in FX_Sqrt() 114 CP_SetSqrt64((u64)x << 32); in FX_Sqrt() 134 fx32 FX_InvSqrt(fx32 x) in FX_InvSqrt() argument 136 if (x > 0) in FX_InvSqrt() 142 FX_InvAsync(x); in FX_InvSqrt() 143 FX_SqrtAsync(x); in FX_InvSqrt() 220 void FX_SqrtAsync(fx32 x) in FX_SqrtAsync() argument 223 if (x > 0) in FX_SqrtAsync() 225 CP_SetSqrt64((u64)x << 32); in FX_SqrtAsync() [all …]
|
| /TwlSDK-5.4/include/nitro/fx/ |
| D | fx.h | 55 #define FX_FX32_TO_F32(x) ((f32)((x) / (f32)(1 << FX32_SHIFT))) argument 56 #define FX_F32_TO_FX32(x) ((fx32)(((x) > 0) ? \ argument 57 ((x) * (1 << FX32_SHIFT) + 0.5f ) : \ 58 ((x) * (1 << FX32_SHIFT) - 0.5f ))) 60 #define FX32_CONST(x) FX_F32_TO_FX32(x) argument 78 #define FX_FX64_TO_F32(x) ((f32)((x) / (f32)(1 << FX64_SHIFT))) argument 79 #define FX_F32_TO_FX64(x) ((fx64)(((x) > 0) ? \ argument 80 ((x) * (1 << FX32_SHIFT) + 0.5f ) : \ 81 ((x) * (1 << FX32_SHIFT) - 0.5f ))) 83 #define FX64_CONST(x) FX_F32_TO_FX64(x) argument [all …]
|
| /TwlSDK-5.4/build/demos/ctrdg/backup-1/src/ |
| D | draw.c | 62 static inline RGB555 *GetSurface(int x, int y) in GetSurface() argument 64 return drawi_common.next_surface + x + y * GX_LCD_SIZE_X; in GetSurface() 67 static inline BOOL IsBoundX(DrawiCommon * p, int x) in IsBoundX() argument 69 return (x >= p->clip.o.x) && (x < p->clip.t.x); in IsBoundX() 79 if (p->pos.x >= pc->clip.t.x) in NormalizeRegion() 83 if (p->pos.x - pc->clip.o.x < 0) in NormalizeRegion() 84 p->wid.x += p->pos.x - pc->clip.o.x, p->pos.x = pc->clip.o.x; in NormalizeRegion() 85 if (p->wid.x <= 0) in NormalizeRegion() 87 else if (p->wid.x > pc->clip.t.x - p->pos.x) in NormalizeRegion() 88 p->wid.x = pc->clip.t.x - p->pos.x; in NormalizeRegion() [all …]
|
| /TwlSDK-5.4/build/demos/ctrdg/backup-1/include/ |
| D | draw.h | 42 int x; member 135 void FillRect(int x, int y, int wx, int wy, RGB555 col); 136 void BlitRect(int x, int y, int wx, int wy, RGB555 * src, int stroke); 137 void TransRect(int x, int y, int wx, int wy, RGB555 * src, int stroke); 141 static inline void MoveTo(int x, int y) in MoveTo() argument 143 cur_pt.x = x, cur_pt.y = y; in MoveTo() 146 static inline void LineTo(int x, int y) in LineTo() argument 148 DrawLine(cur_pt.x, cur_pt.y, x, y, col_text); in LineTo() 149 MoveTo(x, y); in LineTo() 152 void DrawTextLen(int x, int y, const char *s, int n); [all …]
|
| /TwlSDK-5.4/build/demos/gx/UnitTours/DEMOLib/include/ |
| D | DEMOBitmap.h | 40 #define DEMOFillRect(x, y, wx, wy, color) DEMOiFillRect(x, y, wx, wy, DEMOVerifyGXRgb(color)) argument 42 #define DEMODrawFrame(x, y, wx, wy, color) DEMOiDrawFrame(x, y, wx, wy, DEMOVerifyGXRgb(color)) argument 124 void DEMOiFillRect(int x, int y, int wx, int wy, GXRgb color); 140 void DEMOBlitRect(int x, int y, int wx, int wy, const GXRgb *image, int stroke); 156 void DEMOBlitTex16(int x, int y, int wx, int wy, const void *chr, const GXRgb *plt); 186 void DEMOiDrawFrame(int x, int y, int wx, int wy, GXRgb color); 199 void DEMODrawText(int x, int y, const char *format, ...); 223 void DEMOPutString(int x, int y, const char *format, ...); 248 void DEMOSetViewPort(int x, int y, int wx, int wy);
|
| /TwlSDK-5.4/build/demos/wxc/relayStation-2/src/ |
| D | dispfunc.c | 42 static void BgiPutChar(int x, int y, u8 palette, char c, u8 lcd); 43 static void BgiPutStringN(int x, int y, u8 palette, const char *text, u32 num, u8 lcd); 46 static void BgiPutChar(int x, int y, u8 palette, char c, u8 lcd) in BgiPutChar() argument 50 vscr[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 54 vscr_sub[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 58 static void BgiPutStringN(int x, int y, u8 palette, const char *text, u32 num, u8 lcd) in BgiPutStringN() argument 69 BgiPutChar((s16)(x + i), y, palette, text[i], lcd); in BgiPutStringN() 122 void BgPrintf(int x, int y, u8 palette, const char *text, ...) in BgPrintf() argument 133 BgPutString(x, y, palette, temp); in BgPrintf() 138 void BgPutString(int x, int y, u8 palette, const char *text) in BgPutString() argument [all …]
|
| /TwlSDK-5.4/include/twl/aes/common/ |
| D | types.h | 47 #define AESi_ASSERT_MAC_LENGTH(x) \ argument 48 SDK_TASSERTMSG( ((x) == AES_MAC_LENGTH_4) \ 49 || ((x) == AES_MAC_LENGTH_6) \ 50 || ((x) == AES_MAC_LENGTH_8) \ 51 || ((x) == AES_MAC_LENGTH_10) \ 52 || ((x) == AES_MAC_LENGTH_12) \ 53 || ((x) == AES_MAC_LENGTH_14) \ 54 || ((x) == AES_MAC_LENGTH_16), \ 55 "%s(=%d) is not valid AESMacLength.", #x, (x) )
|
| /TwlSDK-5.4/build/demos/mb/multiboot/src/ |
| D | dispfunc.c | 39 void ObjSet(int objNo, int x, int y, int charNo, int paletteNo) in ObjSet() argument 42 x, in ObjSet() 51 void ObjSetString(int startobjNo, int x, int y, char *string, int paletteNo) in ObjSetString() argument 56 ObjSet(startobjNo + i, x + i * 8, y, (int)string[i], paletteNo); in ObjSetString() 99 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd); 100 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd); 103 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd) in BgiPutChar() argument 107 vscr[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 111 vscr_sub[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 115 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd) in BgiPutStringN() argument [all …]
|
| /TwlSDK-5.4/build/demos/gx/UnitTours/DEMOLib/src/ |
| D | DEMOBitmap.c | 248 int x, y; in DEMO_DrawFlip() local 253 for (x = 0; (x < 32) && src[x] && (src[x] != '\n'); ++x) in DEMO_DrawFlip() 255 dst[x] = (u16)((u8)src[x] | (palette << 12)); in DEMO_DrawFlip() 257 for (; x < 32; ++x) in DEMO_DrawFlip() 259 dst[x] = (u16)(0 | (palette << 12)); in DEMO_DrawFlip() 347 void DEMOiFillRect(int x, int y, int wx, int wy, GXRgb color) in DEMOiFillRect() argument 349 if ((x < GX_LCD_SIZE_X) && (y < GX_LCD_SIZE_Y)) in DEMOiFillRect() 351 if (wx > GX_LCD_SIZE_X - x) in DEMOiFillRect() 353 wx = GX_LCD_SIZE_X - x; in DEMOiFillRect() 362 GXRgb *dst = &context->bitmap_frame[x + y * GX_LCD_SIZE_X]; in DEMOiFillRect() [all …]
|
| /TwlSDK-5.4/build/demos/wxc/simple-2/src/ |
| D | dispfunc.c | 43 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd); 44 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd); 47 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd) in BgiPutChar() argument 51 vscr[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 55 vscr_sub[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 59 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd) in BgiPutStringN() argument 70 BgiPutChar((s16)(x + i), y, palette, text[i], lcd); in BgiPutStringN() 123 void BgPrintf(s16 x, s16 y, u8 palette, char *text, ...) in BgPrintf() argument 134 BgPutString(x, y, palette, temp); in BgPrintf() 139 void BgPutString(s16 x, s16 y, u8 palette, char *text) in BgPutString() argument [all …]
|
| /TwlSDK-5.4/build/demos/wxc/relayStation-1/src/ |
| D | dispfunc.c | 43 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd); 44 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd); 47 static void BgiPutChar(s16 x, s16 y, u8 palette, char c, u8 lcd) in BgiPutChar() argument 51 vscr[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 55 vscr_sub[((y * 32) + x) % (32 * 32)] = (u16)((palette << 12) | c); in BgiPutChar() 59 static void BgiPutStringN(s16 x, s16 y, u8 palette, char *text, u32 num, u8 lcd) in BgiPutStringN() argument 70 BgiPutChar((s16)(x + i), y, palette, text[i], lcd); in BgiPutStringN() 123 void BgPrintf(s16 x, s16 y, u8 palette, char *text, ...) in BgPrintf() argument 134 BgPutString(x, y, palette, temp); in BgPrintf() 139 void BgPutString(s16 x, s16 y, u8 palette, char *text) in BgPutString() argument [all …]
|