1 /*---------------------------------------------------------------------------* 2 Copyright (C) 2010-2012 Nintendo. All rights reserved. 3 4 These coded instructions, statements, and computer programs contain 5 proprietary information of Nintendo of America Inc. and/or Nintendo 6 Company Ltd., and are protected by Federal copyright law. They may 7 not be disclosed to third parties or copied or duplicated in any form, 8 in whole or in part, without the prior written consent of Nintendo. 9 *---------------------------------------------------------------------------*/ 10 11 #ifndef _DEMO_GFX_TYPES_H_ 12 #define _DEMO_GFX_TYPES_H_ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 /// @addtogroup demoGfxTypes 19 /// @{ 20 21 // 22 // Data Types 23 // 24 25 /// \brief Struct contains floatx4 26 /// 27 typedef struct _DEMO_F32x4 28 { 29 union 30 { 31 struct{ f32 x, y, z, w;} v; 32 struct{ f32 r, g, b, a;} c; 33 f32 F32[4]; 34 } u; 35 } DEMO_F32x4; 36 37 /// \brief Struct contains floatx3 38 /// 39 typedef struct _DEMO_F32x3 40 { 41 union 42 { 43 struct{ f32 x, y, z;} v; 44 struct{ f32 r, g, b;} c; 45 f32 F32[3]; 46 } u; 47 } DEMO_F32x3; 48 49 /// \brief Struct contains floatx2 50 /// 51 typedef struct _DEMO_F32x2 52 { 53 union 54 { 55 struct{ f32 x, y;} v; 56 struct{ f32 r, g;} c; 57 f32 F32[2]; 58 } u; 59 } DEMO_F32x2; 60 61 /// \brief Struct contains float 62 /// 63 typedef struct _DEMO_F32 64 { 65 union 66 { 67 struct{ f32 x;} v; 68 struct{ f32 r;} c; 69 f32 F32; 70 } u; 71 } DEMO_F32; 72 73 /// \brief Struct contains U32x4 74 /// 75 typedef struct _DEMO_U32x4 76 { 77 union 78 { 79 struct{ u32 x, y, z, w;} v; 80 struct{ u32 r, g, b, a;} c; 81 u32 U32[4]; 82 } u; 83 } DEMO_U32x4; 84 85 /// \brief Struct contains U32x3 86 /// 87 typedef struct _DEMO_U32x3 88 { 89 union 90 { 91 struct{ u32 x, y, z;} v; 92 struct{ u32 r, g, b;} c; 93 u32 U32[3]; 94 } u; 95 } DEMO_U32x3; 96 97 /// \brief Struct contains U32x2 98 /// 99 typedef struct _DEMO_U32x2 100 { 101 union 102 { 103 struct{ u32 x, y;} v; 104 struct{ u32 r, g;} c; 105 u32 U32[2]; 106 } u; 107 } DEMO_U32x2; 108 109 /// \brief Struct contains U32 110 /// 111 typedef struct _DEMO_U32 112 { 113 union 114 { 115 struct{ u32 x;} v; 116 struct{ u32 r;} c; 117 u32 U32; 118 } u; 119 } DEMO_U32; 120 121 /// \brief Struct contains S32x4 122 /// 123 typedef struct _DEMO_S32x4 124 { 125 union 126 { 127 struct{ s32 x, y, z, w;} v; 128 struct{ s32 r, g, b, a;} c; 129 s32 S32[4]; 130 } u; 131 } DEMO_S32x4; 132 133 /// \brief Struct contains S32x3 134 /// 135 typedef struct _DEMO_S32x3 136 { 137 union 138 { 139 struct{ s32 x, y, z;} v; 140 struct{ s32 r, g, b;} c; 141 s32 S32[3]; 142 } u; 143 } DEMO_S32x3; 144 145 /// \brief Struct contains S32x2 146 /// 147 typedef struct _DEMO_S32x2 148 { 149 union 150 { 151 struct{ s32 x, y;} v; 152 struct{ s32 r, g;} c; 153 s32 S32[2]; 154 } u; 155 } DEMO_S32x2; 156 157 /// \brief Struct contains S32 158 /// 159 typedef struct _DEMO_S32 160 { 161 union 162 { 163 struct{ s32 x;} v; 164 struct{ s32 r;} c; 165 s32 S32; 166 } u; 167 } DEMO_S32; 168 169 /// \brief Struct contains U16x4 170 /// 171 typedef struct _DEMO_U16x4 172 { 173 union 174 { 175 struct{ u16 x, y, z, w;} v; 176 struct{ u16 r, g, b, a;} c; 177 u16 U16[4]; 178 } u; 179 } DEMO_U16x4; 180 181 /// \brief Struct contains U16x3 182 /// 183 typedef struct _DEMO_U16x3 184 { 185 union 186 { 187 struct{ u16 x, y, z;} v; 188 struct{ u16 r, g, b;} c; 189 u16 U16[3]; 190 } u; 191 } DEMO_U16x3; 192 193 /// \brief Struct contains U16x2 194 /// 195 typedef struct _DEMO_U16x2 196 { 197 union 198 { 199 struct{ u16 x, y;} v; 200 struct{ u16 r, g;} c; 201 u16 U16[2]; 202 } u; 203 } DEMO_U16x2; 204 205 /// \brief Struct contains U16 206 /// 207 typedef struct _DEMO_U16 208 { 209 union 210 { 211 struct{ u16 x;} v; 212 struct{ u16 r;} c; 213 u16 U16; 214 } u; 215 } DEMO_U16; 216 217 /// \brief Struct contains S16x4 218 /// 219 typedef struct _DEMO_S16x4 220 { 221 union 222 { 223 struct{ s16 x, y, z, w;} v; 224 struct{ s16 r, g, b, a;} c; 225 s16 S16[4]; 226 } u; 227 } DEMO_S16x4; 228 229 /// \brief Struct contains S16x3 230 /// 231 typedef struct _DEMO_S16x3 232 { 233 union 234 { 235 struct{ s16 x, y, z;} v; 236 struct{ s16 r, g, b;} c; 237 s16 S16[3]; 238 } u; 239 } DEMO_S16x3; 240 241 /// \brief Struct contains S16x2 242 /// 243 typedef struct _DEMO_S16x2 244 { 245 union 246 { 247 struct{ s16 x, y;} v; 248 struct{ s16 r, g;} c; 249 s16 S16[2]; 250 } u; 251 } DEMO_S16x2; 252 253 /// \brief Struct contains S16 254 /// 255 typedef struct _DEMO_S16 256 { 257 union 258 { 259 struct{ s16 x;} v; 260 struct{ s16 r;} c; 261 s16 S16; 262 } u; 263 } DEMO_S16; 264 265 /// \brief Struct contains U8x4 266 /// 267 typedef struct _DEMO_U8x4 268 { 269 union 270 { 271 struct{ u8 x, y, z, w;} v; 272 struct{ u8 r, g, b, a;} c; 273 u8 U8[4]; 274 } u; 275 } DEMO_U8x4; 276 277 /// \brief Struct contains U8x3 278 /// 279 typedef struct _DEMO_U8x3 280 { 281 union 282 { 283 struct{ u8 x, y, z;} v; 284 struct{ u8 r, g, b;} c; 285 u8 U8[3]; 286 } u; 287 } DEMO_U8x3; 288 289 /// \brief Struct contains U8x2 290 /// 291 typedef struct _DEMO_U8x2 292 { 293 union 294 { 295 struct{ u8 x, y;} v; 296 struct{ u8 r, g;} c; 297 u8 U8[2]; 298 } u; 299 } DEMO_U8x2; 300 301 /// \brief Struct contains U8 302 /// 303 typedef struct _DEMO_U8 304 { 305 union 306 { 307 struct{ u8 x;} v; 308 struct{ u8 r;} c; 309 u8 U8; 310 } u; 311 } DEMO_U8; 312 313 /// \brief Struct contains S8x4 314 /// 315 typedef struct _DEMO_S8x4 316 { 317 union 318 { 319 struct{ s8 x, y, z, w;} v; 320 struct{ s8 r, g, b, a;} c; 321 s8 S8[4]; 322 } u; 323 } DEMO_S8x4; 324 325 /// \brief Struct contains S8x3 326 /// 327 typedef struct _DEMO_S8x3 328 { 329 union 330 { 331 struct{ s8 x, y, z;} v; 332 struct{ s8 r, g, b;} c; 333 s8 S8[3]; 334 } u; 335 } DEMO_S8x3; 336 337 /// \brief Struct contains S8x2 338 /// 339 typedef struct _DEMO_S8x2 340 { 341 union 342 { 343 struct{ s8 x, y;} v; 344 struct{ s8 r, g;} c; 345 s8 S8[2]; 346 } u; 347 } DEMO_S8x2; 348 349 /// \brief Struct contains S8 350 /// 351 typedef struct _DEMO_S8 352 { 353 union 354 { 355 struct{ s8 x;} v; 356 struct{ s8 r;} c; 357 s8 S8; 358 } u; 359 } DEMO_S8; 360 361 362 // 363 // Helper types for attributes 364 // 365 366 /// \brief Struct contains f32x4x4 367 /// 368 typedef struct _DEMO_F32x4F32x4F32x4F32x4 369 { 370 DEMO_F32x4 F32x4[4]; 371 } DEMO_F32x4F32x4F32x4F32x4; 372 373 /// \brief Struct contains f32x4x3 374 /// 375 typedef struct _DEMO_F32x4F32x4F32x4 376 { 377 DEMO_F32x4 F32x4[3]; 378 } DEMO_F32x4F32x4F32x4; 379 380 /// \brief Struct contains f32x4x2 381 /// 382 typedef struct _DEMO_F32x4F32x4 383 { 384 DEMO_F32x4 F32x4[2]; 385 } DEMO_F32x4F32x4; 386 387 /// \brief Struct contains f32x3x3 388 /// 389 typedef struct _DEMO_F32x3F32x3F32x3 390 { 391 DEMO_F32x3 F32x3[3]; 392 } DEMO_F32x3F32x3F32x3; 393 394 /// \brief Struct contains f32x3x2 395 /// 396 typedef struct _DEMO_F32x3F32x3 397 { 398 DEMO_F32x3 F32x3[2]; 399 } DEMO_F32x3F32x3; 400 401 /// \brief Struct contains f32x3f32x2 402 /// 403 typedef struct _DEMO_F32x3F32x2 404 { 405 DEMO_F32x3 F32x3; 406 DEMO_F32x2 F32x2; 407 } DEMO_F32x3F32x2; 408 409 410 /// \brief Struct contains f32x4f32x3 411 /// 412 typedef struct _DEMO_F32x4F32x3 413 { 414 DEMO_F32x4 F32x4; 415 DEMO_F32x3 F32x3; 416 } DEMO_F32x4F32x3; 417 418 /// \brief Struct contains f32x3f32x4 419 /// 420 typedef struct _DEMO_F32x3F32x4 421 { 422 DEMO_F32x3 F32x3; 423 DEMO_F32x4 F32x4; 424 } DEMO_F32x3F32x4; 425 426 /// \brief Struct contains f32x3f32x4x2 427 /// 428 typedef struct _DEMO_F32x3F32x4F32x4 429 { 430 DEMO_F32x3 F32x3; 431 DEMO_F32x4 F32x4[2]; 432 } DEMO_F32x3F32x4F32x4; 433 434 435 /// \brief Struct contains f32x4x2f32x3 436 /// 437 typedef struct _DEMO_F32x4F32x4F32x3 438 { 439 DEMO_F32x4 F32x4[2]; 440 DEMO_F32x3 F32x3; 441 } DEMO_F32x4F32x4F32x3; 442 443 /// \brief Struct contains f32x4x3f32x2 444 /// 445 typedef struct _DEMO_F32x4F32x4F32x4F32x2 446 { 447 DEMO_F32x4 F32x4[3]; 448 DEMO_F32x2 F32x2; 449 } DEMO_F32x4F32x4F32x4F32x2; 450 451 /// \brief Struct contains f32x4f32x3x2 452 /// 453 typedef struct _DEMO_F32x4F32x3F32x3 454 { 455 DEMO_F32x4 F32x4; 456 DEMO_F32x3 F32x3[2]; 457 } DEMO_F32x4F32x3F32x3; 458 459 /// \brief Struct contains f32x4f32x3x2f32x2 460 /// 461 typedef struct _DEMO_F32x4F32x4F32x3F32x2 462 { 463 DEMO_F32x4 F32x4[2]; 464 DEMO_F32x3 F32x3; 465 DEMO_F32x2 F32x2; 466 } DEMO_F32x4F32x4F32x3F32x2; 467 468 469 /// \brief Struct contains f32x4f32x3x2f32x2 470 /// 471 typedef struct _DEMO_F32x4F32x3F32x3F32x2 472 { 473 DEMO_F32x4 F32x4; 474 DEMO_F32x3 F32x3[2]; 475 DEMO_F32x2 F32x2; 476 } DEMO_F32x4F32x3F32x3F32x2; 477 478 /// \brief Struct contains f32x4f32x3f32x2 479 /// 480 typedef struct _DEMO_F32x4F32x3F32x2 481 { 482 DEMO_F32x4 F32x4; 483 DEMO_F32x3 F32x3; 484 DEMO_F32x2 F32x2; 485 } DEMO_F32x4F32x3F32x2; 486 487 /// \brief Struct contains f32x3f32x3f32x2 488 /// 489 typedef struct _DEMO_F32x3F32x3F32x2 490 { 491 DEMO_F32x3 F32x3[2]; 492 DEMO_F32x2 F32x2; 493 } DEMO_F32x3F32x3F32x2; 494 495 /// \brief Struct contains f32x3f32x3f32x3f32x3f32x2 496 /// 497 typedef struct _DEMO_F32x3F32x3F32x3F32x3F32x2 498 { 499 DEMO_F32x3 F32x3[4]; 500 DEMO_F32x2 F32x2; 501 } DEMO_F32x3F32x3F32x3F32x3F32x2; 502 503 504 /// @} 505 506 #ifdef __cplusplus 507 } 508 #endif 509 510 #endif // _DEMO_GFX_TYPES_H_ 511