Dreamcast: Slightly simplify sh4 code

This commit is contained in:
UnknownShadow200 2024-08-17 21:22:18 +10:00
parent 507f71c944
commit 8fc8628adf
5 changed files with 20 additions and 1197 deletions

View file

@ -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

View file

@ -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);

View file

@ -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;

View file

@ -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) {

File diff suppressed because it is too large Load diff