Skip to content

Commit

Permalink
Merge commit '482b161b63b33bf4ad5ff0553247e4807a7b3ff1'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel303 committed May 19, 2022
2 parents 319a1ef + 482b161 commit 3f4f835
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion chibi
Submodule chibi updated 1 files
+6 −2 write-cmake.cpp
10 changes: 6 additions & 4 deletions framework/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ ImageData * loadImage_qoi(const char * filename)
{
Assert(desc.channels == 4);

imageData = new ImageData();
imageData->sx = desc.width;
imageData->sy = desc.height;
imageData->imageData = (ImageData::Pixel*)data;
imageData = new ImageData(desc.width, desc.height);

memcpy(imageData->imageData, data, desc.width * desc.height * 4);

free(data);
data = nullptr;
}

return imageData;
Expand Down
6 changes: 0 additions & 6 deletions users/marcel/lgen-origin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@

//---------------------------------------------------------------------------

#if !defined(ALLEGRO_DJGPP) && !defined(ALLEGRO_MINGW32)
#warning compiling for an untested platform! it is possible you will run into unexpected trouble..
#endif

//---------------------------------------------------------------------------

#define PAL_COL(_p, _i, _r, _g, _b) _i = makecol(_r, _g, _b)

//---------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions users/marcel/ovr-cubes/main6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "Path.h" // GetExtension for jgmod file listing
#include "Quat.h"

#include <algorithm>

/*
new challenges!
Expand Down
6 changes: 3 additions & 3 deletions users/marcel/xenocollide-testbed/Math/Math.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ inline float32 RadToDeg(float32 rad)
inline float32 Sqrt(const float32 a)
{
ASSERT(a >= 0.f);
return _mm_sqrt_ss(_mm_set_ps1(a))[0];
return _mm_extract_ps(_mm_sqrt_ss(_mm_set_ps1(a)), 0);
}
inline float32 InvSqrt (const float32 a)
{
ASSERT(a > 0.f);
static __m128 s_ssevec1 = _mm_set_ps1(1.f);
return _mm_div_ss(s_ssevec1,_mm_sqrt_ss(_mm_set_ps1(a)))[0];
return _mm_extract_ps(_mm_div_ss(s_ssevec1,_mm_sqrt_ss(_mm_set_ps1(a))), 0);
}

inline Euler::Euler(const Matrix& m)
Expand Down Expand Up @@ -823,7 +823,7 @@ inline float64 Abs(float64 a)

inline Vector64 CompAbs(const Vector64& a)
{
return Vector64(abs(a.X()), abs(a.Y()), abs(a.Z()));
return Vector64(Abs(a.X()), Abs(a.Y()), Abs(a.Z()));
}

inline Vector64 CompMin(const Vector64& a, const Vector64& b)
Expand Down
2 changes: 1 addition & 1 deletion users/marcel/xenocollide-testbed/TestModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TestModule
virtual void OnRightButtonUp(const Vector& rayOrigin, const Vector& rayDirection, const Vector& point) {};
virtual void OnMouseMove(const Vector& rayOrigin, const Vector& rayDirection, const Vector& point) {};

virtual const Vector& GetBackgroundColor() {};
virtual const Vector& GetBackgroundColor() { static Vector result; return result; };

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ not be misrepresented as being the original software.

#include <stdio.h>
#include <map>
#include <assert.h>

#include "DrawUtil.h"
#include "HullMaker.h"
Expand Down

0 comments on commit 3f4f835

Please sign in to comment.