mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Dreamcast: Slightly simplify sh4 code
This commit is contained in:
parent
507f71c944
commit
8fc8628adf
5 changed files with 20 additions and 1197 deletions
8
Makefile
8
Makefile
|
@ -249,12 +249,10 @@ $(ENAME): $(BUILD_DIR) $(OBJECTS)
|
|||
|
||||
# macOS app bundle
|
||||
$(ENAME).app : $(ENAME)
|
||||
mkdir $(TARGET)
|
||||
mkdir $(TARGET)/Contents
|
||||
mkdir $(TARGET)/Contents/MacOS
|
||||
mkdir $(TARGET)/Contents/Resources
|
||||
mkdir -p $(TARGET)/Contents/MacOS
|
||||
mkdir -p $(TARGET)/Contents/Resources
|
||||
cp $(ENAME) $(TARGET)/Contents/MacOS/$(ENAME)
|
||||
cp misc/macOS/Info.plist $(TARGET)/Contents/Resources/Info.plist
|
||||
cp misc/macOS/Info.plist $(TARGET)/Contents/Info.plist
|
||||
cp misc/macOS/appicon.icns $(TARGET)/Contents/Resources/appicon.icns
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ static void VirtualCursor_Display3D(float delta) {
|
|||
|
||||
vc_texture.x = Pointers[0].x - CURSOR_EXTENT;
|
||||
vc_texture.y = Pointers[0].y - CURSOR_EXTENT;
|
||||
int X = vc_texture.x, Y = vc_texture.y;
|
||||
|
||||
Gfx_SetVertexFormat(VERTEX_FORMAT_TEXTURED);
|
||||
Gfx_BindTexture(vc_texture.ID);
|
||||
|
|
|
@ -25,7 +25,12 @@ void HttpRequest_Free(struct HttpRequest* request) {
|
|||
/*########################################################################################################################*
|
||||
*----------------------------------------------------Http requests list---------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#define HTTP_DEF_ELEMS 10
|
||||
#ifdef CC_BUILD_NETWORKING
|
||||
#define HTTP_DEF_ELEMS 10
|
||||
#else
|
||||
#define HTTP_DEF_ELEMS 1 /* TODO better unused code removal */
|
||||
#endif
|
||||
|
||||
struct RequestList {
|
||||
int count, capacity;
|
||||
struct HttpRequest* entries;
|
||||
|
|
13
third_party/gldc/src/sh4.c
vendored
13
third_party/gldc/src/sh4.c
vendored
|
@ -2,13 +2,22 @@
|
|||
#include <kos.h>
|
||||
#include <dc/pvr.h>
|
||||
#include "gldc.h"
|
||||
#include "sh4_math.h"
|
||||
|
||||
#define PREFETCH(addr) __builtin_prefetch((addr))
|
||||
static volatile uint32_t* sq;
|
||||
|
||||
// calculates 1/sqrt(x)
|
||||
GL_FORCE_INLINE float sh4_fsrra(float x) {
|
||||
asm volatile ("fsrra %[value]\n"
|
||||
: [value] "+f" (x) // outputs (r/w to FPU register)
|
||||
: // no inputs
|
||||
: // no clobbers
|
||||
);
|
||||
return x;
|
||||
}
|
||||
|
||||
GL_FORCE_INLINE float _glFastInvert(float x) {
|
||||
return MATH_fsrra(x * x);
|
||||
return sh4_fsrra(x * x);
|
||||
}
|
||||
|
||||
GL_FORCE_INLINE void _glPerspectiveDivideVertex(Vertex* vertex) {
|
||||
|
|
1188
third_party/gldc/src/sh4_math.h
vendored
1188
third_party/gldc/src/sh4_math.h
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue