added vec2f and vec4f
This commit is contained in:
parent
0df808899b
commit
3ea92c4618
|
@ -1,7 +1,22 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<Objective-C>
|
||||
<option name="HEADER_GUARD_STYLE_PATTERN" value="GUARD_${UUID}" />
|
||||
</Objective-C>
|
||||
<clangFormatSettings>
|
||||
<option name="ENABLED" value="true" />
|
||||
</clangFormatSettings>
|
||||
<files>
|
||||
<extensions>
|
||||
<pair source="c" header="h" fileNamingConvention="SNAKE_CASE" />
|
||||
<pair source="cu" header="cuh" fileNamingConvention="NONE" />
|
||||
<pair source="ixx" header="" fileNamingConvention="NONE" />
|
||||
<pair source="mxx" header="" fileNamingConvention="NONE" />
|
||||
<pair source="cppm" header="" fileNamingConvention="NONE" />
|
||||
<pair source="ccm" header="" fileNamingConvention="NONE" />
|
||||
<pair source="cxxm" header="" fileNamingConvention="NONE" />
|
||||
<pair source="c++m" header="" fileNamingConvention="NONE" />
|
||||
</extensions>
|
||||
</files>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -87,7 +87,7 @@ add_library(skunkworks STATIC
|
|||
src/types.c
|
||||
src/vec2i.c
|
||||
src/vertex_buffer.c
|
||||
src/window.c)
|
||||
src/window.c include/vec2f.h src/vec2f.c src/vec4f.c include/vec4f.h)
|
||||
|
||||
add_executable(skip
|
||||
tools/skip.c)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef GUARD_A01629497D8E42B4B3FB585B56C21AEF
|
||||
#define GUARD_A01629497D8E42B4B3FB585B56C21AEF
|
||||
|
||||
#include "types.h"
|
||||
|
||||
struct sw_vec2f {
|
||||
f32 x, y;
|
||||
};
|
||||
|
||||
struct sw_vec2f sw_vec2f(f32 x, f32 y);
|
||||
|
||||
#endif /* GUARD_A01629497D8E42B4B3FB585B56C21AEF */
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef GUARD_CB04704744FE48F78C6B68B66393739B
|
||||
#define GUARD_CB04704744FE48F78C6B68B66393739B
|
||||
|
||||
#include "types.h"
|
||||
|
||||
struct sw_vec4f {
|
||||
union {
|
||||
f32 x;
|
||||
f32 r;
|
||||
};
|
||||
union {
|
||||
f32 y;
|
||||
f32 g;
|
||||
};
|
||||
union {
|
||||
f32 z;
|
||||
f32 b;
|
||||
};
|
||||
union {
|
||||
f32 w;
|
||||
f32 a;
|
||||
};
|
||||
};
|
||||
|
||||
struct sw_vec4f sw_vec4f(f32 x, f32 y, f32 z, f32 w);
|
||||
|
||||
#endif /* GUARD_CB04704744FE48F78C6B68B66393739B */
|
|
@ -0,0 +1,10 @@
|
|||
#include "vec2f.h"
|
||||
|
||||
struct sw_vec2f sw_vec2f(f32 x, f32 y) {
|
||||
struct sw_vec2f vec;
|
||||
|
||||
vec.x = x;
|
||||
vec.y = y;
|
||||
|
||||
return vec;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include "vec4f.h"
|
||||
|
||||
struct sw_vec4f sw_vec4f(f32 x, f32 y, f32 z, f32 w) {
|
||||
struct sw_vec4f vec;
|
||||
|
||||
vec.x = x;
|
||||
vec.y = y;
|
||||
vec.z = z;
|
||||
vec.w = w;
|
||||
|
||||
return vec;
|
||||
}
|
Loading…
Reference in New Issue