Files
libsst/libsst-math/dump_VecN_headers.sh
2026-04-03 00:22:39 -05:00

198 lines
6.8 KiB
Bash

#!/bin/sh
HEADERPATH=../Lib/Include/SST
echo "/* NEXT FILE */
/* This is an AUTOGENERATED FILE generated from the bash script 'dump_VecN_headers.sh', last generated on `date` */
#ifndef __SST_VEC2_H__
#define __SST_VEC2_H__
#include <SST/SST_Build.h>
#include <SST/SST_Vec2.h>
#include <pstdbool.h>
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(disable:4201)
#endif
#ifdef __cplusplus
extern \"C\" {
#endif
typedef SST_ALIGN_PREFIX(16) union SST_Vec2f
{
float v[2];
struct { float x, y; };
} SST_ALIGN_SUFFIX(16) SST_Vec2f;
typedef SST_ALIGN_PREFIX(16) union SST_Vec2d
{
double v[2];
struct { double x, y; };
} SST_ALIGN_SUFFIX(16) SST_Vec2d;
typedef SST_ALIGN_PREFIX(16) union SST_Vec2i
{
int v[2];
struct { int x, y; };
} SST_ALIGN_SUFFIX(16) SST_Vec2i;
typedef SST_ALIGN_PREFIX(16) union SST_Vec2u
{
unsigned int v[2];
struct { unsigned int x, y; };
} SST_ALIGN_SUFFIX(16) SST_Vec2u;" > $HEADERPATH/SST_Vec2.h
echo "
/*##########################################################
## float
##########################################################*/" >> $HEADERPATH/SST_Vec2.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec2f.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec2.h
echo "
/*##########################################################
## double
##########################################################*/" >> $HEADERPATH/SST_Vec2.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec2d.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec2.h
echo "
/*##########################################################
## int
##########################################################*/" >> $HEADERPATH/SST_Vec2.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec2i.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec2.h
echo "
/*##########################################################
## unsigned int
##########################################################*/" >> $HEADERPATH/SST_Vec2.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec2u.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec2.h
echo "#ifdef __cplusplus
}
#endif
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(default:4201)
#endif
#endif" >> $HEADERPATH/SST_Vec2.h
echo "/* NEXT FILE */
/* This is an AUTOGENERATED FILE generated from the bash script 'dumpheader.sh', last generated on `date` */
#ifndef __SST_VEC3_H__
#define __SST_VEC3_H__
#include <SST/SST_Build.h>
#include <SST/SST_Vec3.h>
#include <pstdbool.h>
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(disable:4201)
#endif
#ifdef __cplusplus
extern \"C\" {
#endif
#define PAD 3 /* spaces it out to 4 * T for better alignment */
typedef SST_ALIGN_PREFIX(16) union SST_Vec3f
{
float v[4];
struct { float x, y, z, _pad; };
} SST_ALIGN_SUFFIX(16) SST_Vec3f;
typedef SST_ALIGN_PREFIX(16) union SST_Vec3d
{
double v[4];
struct { double x, y, z, _pad; };
} SST_ALIGN_SUFFIX(16) SST_Vec3d;
typedef SST_ALIGN_PREFIX(16) union SST_Vec3i
{
int v[4];
struct { int x, y, z, _pad; };
} SST_ALIGN_SUFFIX(16) SST_Vec3i;
typedef SST_ALIGN_PREFIX(16) union SST_Vec3u
{
unsigned int v[4];
struct { unsigned int x, y, z, _pad; };
} SST_ALIGN_SUFFIX(16) SST_Vec3u;
#undef PAD" > $HEADERPATH/SST_Vec3.h
echo "
/*##########################################################
## float
##########################################################*/" >> $HEADERPATH/SST_Vec3.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec3f.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec3.h
echo "
/*##########################################################
## double
##########################################################*/" >> $HEADERPATH/SST_Vec3.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec3d.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec3.h
echo "
/*##########################################################
## int
##########################################################*/" >> $HEADERPATH/SST_Vec3.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec3i.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec3.h
echo "
/*##########################################################
## unsigned int
##########################################################*/" >> $HEADERPATH/SST_Vec3.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec3u.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec3.h
echo "#ifdef __cplusplus
}
#endif
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(default:4201)
#endif
#endif" >> $HEADERPATH/SST_Vec3.h
echo "/* NEXT FILE */
/* This is an AUTOGENERATED FILE generated from the bash script 'dumpheader.sh', last generated on `date` */
#ifndef __SST_VEC4_H__
#define __SST_VEC4_H__
#include <SST/SST_Build.h>
#include <SST/SST_Vec4.h>
#include <pstdbool.h>
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(disable:4201)
#endif
#ifdef __cplusplus
extern \"C\" {
#endif
typedef SST_ALIGN_PREFIX(16) union SST_Vec4f
{
float v[4];
struct { float x, y, z, w; };
} SST_ALIGN_SUFFIX(16) SST_Vec4f;
typedef SST_ALIGN_PREFIX(16) union SST_Vec4d
{
double v[4];
struct { double x, y, z, w; };
} SST_ALIGN_SUFFIX(16) SST_Vec4d;
typedef SST_ALIGN_PREFIX(16) union SST_Vec4i
{
int v[4];
struct { int x, y, z, w; };
} SST_ALIGN_SUFFIX(16) SST_Vec4i;
typedef SST_ALIGN_PREFIX(16) union SST_Vec4u
{
unsigned int v[4];
struct { unsigned int x, y, z, w; };
} SST_ALIGN_SUFFIX(16) SST_Vec4u;" > $HEADERPATH/SST_Vec4.h
echo "
/*##########################################################
## float
##########################################################*/" >> $HEADERPATH/SST_Vec4.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec4f.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec4.h
echo "
/*##########################################################
## double
##########################################################*/" >> $HEADERPATH/SST_Vec4.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec4d.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec4.h
echo "
/*##########################################################
## int
##########################################################*/" >> $HEADERPATH/SST_Vec4.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec4i.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec4.h
echo "
/*##########################################################
## unsigned int
##########################################################*/" >> $HEADERPATH/SST_Vec4.h
grep -h "^[bvfdiu][Boln][iouts].* SST_Math_Vec" SST_Vec4u.c | sed -e "s/$/;/" -e "s/^/ /" >> $HEADERPATH/SST_Vec4.h
echo "#ifdef __cplusplus
}
#endif
#if SST_COMPILER == SST_COMPILER_MSVC
#pragma warning(default:4201)
#endif
#endif" >> $HEADERPATH/SST_Vec4.h