cleaning linux up after cpp
This commit is contained in:
parent
2680bf1103
commit
faed278acd
|
@ -2,7 +2,7 @@ Installation Instructions
|
|||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
@ -67,9 +67,6 @@ The simplest way to compile this package is:
|
|||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ AM_INIT_AUTOMAKE
|
|||
dnl -- make sure we have a C compiler
|
||||
AC_PROG_CC
|
||||
|
||||
dnl -- make sure we have a c++ compiler
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl -- use ranlib for libraries
|
||||
AC_PROG_RANLIB
|
||||
|
||||
|
|
|
@ -3490,18 +3490,6 @@ arm7_write32(void *data, u32 adr, u32 val) {
|
|||
* the base memory interfaces
|
||||
*/
|
||||
struct armcpu_memory_iface arm9_base_memory_iface = {
|
||||
#ifdef __GNUC__
|
||||
.prefetch32 = arm9_prefetch32,
|
||||
.prefetch16 = arm9_prefetch16,
|
||||
|
||||
.read8 = arm9_read8,
|
||||
.read16 = arm9_read16,
|
||||
.read32 = arm9_read32,
|
||||
|
||||
.write8 = arm9_write8,
|
||||
.write16 = arm9_write16,
|
||||
.write32 = arm9_write32
|
||||
#else
|
||||
arm9_prefetch32,
|
||||
arm9_prefetch16,
|
||||
|
||||
|
@ -3512,22 +3500,9 @@ struct armcpu_memory_iface arm9_base_memory_iface = {
|
|||
arm9_write8,
|
||||
arm9_write16,
|
||||
arm9_write32
|
||||
#endif
|
||||
};
|
||||
|
||||
struct armcpu_memory_iface arm7_base_memory_iface = {
|
||||
#ifdef __GNUC__
|
||||
.prefetch32 = arm7_prefetch32,
|
||||
.prefetch16 = arm7_prefetch16,
|
||||
|
||||
.read8 = arm7_read8,
|
||||
.read16 = arm7_read16,
|
||||
.read32 = arm7_read32,
|
||||
|
||||
.write8 = arm7_write8,
|
||||
.write16 = arm7_write16,
|
||||
.write32 = arm7_write32
|
||||
#else
|
||||
arm7_prefetch32,
|
||||
arm7_prefetch16,
|
||||
|
||||
|
@ -3538,7 +3513,6 @@ struct armcpu_memory_iface arm7_base_memory_iface = {
|
|||
arm7_write8,
|
||||
arm7_write16,
|
||||
arm7_write32
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -3547,19 +3521,6 @@ struct armcpu_memory_iface arm7_base_memory_iface = {
|
|||
* memory.
|
||||
*/
|
||||
struct armcpu_memory_iface arm9_direct_memory_iface = {
|
||||
#ifdef __GNUC__
|
||||
/* the prefetch is not used */
|
||||
.prefetch32 = NULL,
|
||||
.prefetch16 = NULL,
|
||||
|
||||
.read8 = arm9_read8,
|
||||
.read16 = arm9_read16,
|
||||
.read32 = arm9_read32,
|
||||
|
||||
.write8 = arm9_write8,
|
||||
.write16 = arm9_write16,
|
||||
.write32 = arm9_write32
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
|
@ -3570,5 +3531,4 @@ struct armcpu_memory_iface arm9_direct_memory_iface = {
|
|||
arm9_write8,
|
||||
arm9_write16,
|
||||
arm9_write32
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "debug.h"
|
||||
#include "MMU.h"
|
||||
|
||||
BOOL execute;
|
||||
extern volatile BOOL execute;
|
||||
|
||||
// Use this macros for reading/writing, so the GDB stub isn't broken
|
||||
#ifdef GDB_STUB
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "SDL.h"
|
||||
#include "SDL_thread.h"
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_thread.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
|
@ -287,7 +287,7 @@ createThread_gdb( void (*thread_function)( void *data),
|
|||
void
|
||||
joinThread_gdb( void *thread_handle) {
|
||||
int ignore;
|
||||
SDL_WaitThread( thread_handle, &ignore);
|
||||
SDL_WaitThread( (SDL_Thread*)thread_handle, &ignore);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ BOOL init_joy( void) {
|
|||
|
||||
if ( nbr_joy > 0) {
|
||||
open_joysticks =
|
||||
calloc( sizeof ( SDL_Joystick *), nbr_joy);
|
||||
(SDL_Joystick**)calloc( sizeof ( SDL_Joystick *), nbr_joy);
|
||||
|
||||
if ( open_joysticks != NULL) {
|
||||
for (i = 0; i < nbr_joy; i++)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
//#include <pthread.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include "MMU.h"
|
||||
|
||||
#include "types.h"
|
||||
|
@ -55,13 +55,13 @@
|
|||
#define KEY_BOOST 14
|
||||
|
||||
/* Keypad key names */
|
||||
const char *key_names[NB_KEYS];
|
||||
extern const char *key_names[NB_KEYS];
|
||||
/* Current keyboard configuration */
|
||||
u16 keyboard_cfg[NB_KEYS];
|
||||
extern u16 keyboard_cfg[NB_KEYS];
|
||||
/* Current joypad configuration */
|
||||
u16 joypad_cfg[NB_KEYS];
|
||||
extern u16 joypad_cfg[NB_KEYS];
|
||||
/* Number of detected joypads */
|
||||
u16 nbr_joy;
|
||||
extern u16 nbr_joy;
|
||||
|
||||
#ifndef GTK_UI
|
||||
struct mouse_status
|
||||
|
@ -72,7 +72,7 @@ struct mouse_status
|
|||
BOOL down;
|
||||
};
|
||||
|
||||
struct mouse_status mouse;
|
||||
extern mouse_status mouse;
|
||||
|
||||
void set_mouse_coord(signed long x,signed long y);
|
||||
#endif // !GTK_UI
|
||||
|
|
|
@ -48,7 +48,7 @@ void * FsReadFirst(const char * path, FsEntry * entry) {
|
|||
if (!e)
|
||||
return NULL;
|
||||
|
||||
dir = malloc(sizeof(FsLinuxDir));
|
||||
dir = (FsLinuxDir*)malloc(sizeof(FsLinuxDir));
|
||||
dir->dir = tmp;
|
||||
|
||||
strcpy(entry->cFileName, e->d_name);
|
||||
|
@ -72,7 +72,7 @@ void * FsReadFirst(const char * path, FsEntry * entry) {
|
|||
}
|
||||
|
||||
int FsReadNext(void * search, FsEntry * entry) {
|
||||
FsLinuxDir * dir = search;
|
||||
FsLinuxDir * dir = (FsLinuxDir*)search;
|
||||
struct dirent * e;
|
||||
struct stat s;
|
||||
char buffer[1024];
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "registers.h"
|
||||
|
||||
#define CHECK_3D_ATTEMPT attempted_3D_op=TRUE;
|
||||
BOOL attempted_3D_op;
|
||||
extern BOOL attempted_3D_op;
|
||||
|
||||
#define MTX_MODE_PROJECTION 0
|
||||
#define MTX_MODE_POSITION 1
|
||||
|
|
|
@ -33,7 +33,7 @@ void MatrixInit (float *matrix)
|
|||
}
|
||||
|
||||
#ifndef SSE2
|
||||
void __fastcall MatrixMultVec4x4 (const float *matrix, float *vecPtr)
|
||||
void FASTCALL MatrixMultVec4x4 (const float *matrix, float *vecPtr)
|
||||
{
|
||||
float x = vecPtr[0];
|
||||
float y = vecPtr[1];
|
||||
|
@ -46,7 +46,7 @@ void __fastcall MatrixMultVec4x4 (const float *matrix, float *vecPtr)
|
|||
vecPtr[3] = x * matrix[3] + y * matrix[7] + z * matrix[11] + w * matrix[15];
|
||||
}
|
||||
|
||||
void __fastcall MatrixMultVec3x3 (const float *matrix, float *vecPtr)
|
||||
void FASTCALL MatrixMultVec3x3 (const float *matrix, float *vecPtr)
|
||||
{
|
||||
float x = vecPtr[0];
|
||||
float y = vecPtr[1];
|
||||
|
@ -57,7 +57,7 @@ void __fastcall MatrixMultVec3x3 (const float *matrix, float *vecPtr)
|
|||
vecPtr[2] = x * matrix[2] + y * matrix[6] + z * matrix[10];
|
||||
}
|
||||
|
||||
void __fastcall MatrixMultiply (float *matrix, const float *rightMatrix)
|
||||
void FASTCALL MatrixMultiply (float *matrix, const float *rightMatrix)
|
||||
{
|
||||
float tmpMatrix[16];
|
||||
|
||||
|
@ -84,7 +84,7 @@ void __fastcall MatrixMultiply (float *matrix, const float *rightMatrix)
|
|||
memcpy (matrix, tmpMatrix, sizeof(float)*16);
|
||||
}
|
||||
|
||||
void __fastcall MatrixTranslate (float *matrix, const float *ptr)
|
||||
void FASTCALL MatrixTranslate (float *matrix, const float *ptr)
|
||||
{
|
||||
matrix[12] += (matrix[0]*ptr[0])+(matrix[4]*ptr[1])+(matrix[ 8]*ptr[2]);
|
||||
matrix[13] += (matrix[1]*ptr[0])+(matrix[5]*ptr[1])+(matrix[ 9]*ptr[2]);
|
||||
|
@ -92,7 +92,7 @@ void __fastcall MatrixTranslate (float *matrix, const float *ptr)
|
|||
matrix[15] += (matrix[3]*ptr[0])+(matrix[7]*ptr[1])+(matrix[11]*ptr[2]);
|
||||
}
|
||||
|
||||
void __fastcall MatrixScale (float *matrix, const float *ptr)
|
||||
void FASTCALL MatrixScale (float *matrix, const float *ptr)
|
||||
{
|
||||
matrix[0] *= ptr[0];
|
||||
matrix[1] *= ptr[0];
|
||||
|
@ -125,13 +125,13 @@ void MatrixTranspose(float *matrix)
|
|||
#undef swap
|
||||
}
|
||||
|
||||
void __fastcall MatrixIdentity (float *matrix) //============== TODO
|
||||
void FASTCALL MatrixIdentity (float *matrix) //============== TODO
|
||||
{
|
||||
memset (matrix, 0, sizeof(float)*16);
|
||||
matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.f;
|
||||
}
|
||||
|
||||
float __fastcall MatrixGetMultipliedIndex (int index, float *matrix, float *rightMatrix)
|
||||
float FASTCALL MatrixGetMultipliedIndex (int index, float *matrix, float *rightMatrix)
|
||||
{
|
||||
int iMod = index%4, iDiv = (index>>2)<<2;
|
||||
|
||||
|
@ -139,12 +139,12 @@ float __fastcall MatrixGetMultipliedIndex (int index, float *matrix, float *righ
|
|||
(matrix[iMod+8]*rightMatrix[iDiv+2])+(matrix[iMod+12]*rightMatrix[iDiv+3]);
|
||||
}
|
||||
|
||||
void __fastcall MatrixSet (float *matrix, int x, int y, float value) // TODO
|
||||
void FASTCALL MatrixSet (float *matrix, int x, int y, float value) // TODO
|
||||
{
|
||||
matrix [x+(y<<2)] = value;
|
||||
}
|
||||
|
||||
void __fastcall MatrixCopy (float* matrixDST, const float* matrixSRC)
|
||||
void FASTCALL MatrixCopy (float* matrixDST, const float* matrixSRC)
|
||||
{
|
||||
memcpy ((void*)matrixDST, matrixSRC, sizeof(float)*16);
|
||||
}
|
||||
|
@ -267,4 +267,5 @@ void Vector4Copy(float *dst, const float *src)
|
|||
dst[3] = src[3];
|
||||
}
|
||||
|
||||
} //extern "C"
|
||||
} //extern "C"
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ typedef struct MatrixStack
|
|||
|
||||
void MatrixInit (float *matrix);
|
||||
|
||||
void __fastcall MatrixMultVec3x3 (const float * matrix, float * vecPtr);
|
||||
void __fastcall MatrixMultVec4x4 (const float * matrix, float * vecPtr);
|
||||
void __fastcall MatrixMultiply (float * matrix, const float * rightMatrix);
|
||||
void __fastcall MatrixTranslate (float *matrix, const float *ptr);
|
||||
void __fastcall MatrixScale (float * matrix, const float * ptr);
|
||||
float __fastcall MatrixGetMultipliedIndex (int index, float *matrix, float *rightMatrix);
|
||||
void __fastcall MatrixSet (float *matrix, int x, int y, float value);
|
||||
void __fastcall MatrixCopy (float * matrixDST, const float * matrixSRC);
|
||||
void __fastcall MatrixIdentity (float *matrix);
|
||||
void FASTCALL MatrixMultVec3x3 (const float * matrix, float * vecPtr);
|
||||
void FASTCALL MatrixMultVec4x4 (const float * matrix, float * vecPtr);
|
||||
void FASTCALL MatrixMultiply (float * matrix, const float * rightMatrix);
|
||||
void FASTCALL MatrixTranslate (float *matrix, const float *ptr);
|
||||
void FASTCALL MatrixScale (float * matrix, const float * ptr);
|
||||
float FASTCALL MatrixGetMultipliedIndex (int index, float *matrix, float *rightMatrix);
|
||||
void FASTCALL MatrixSet (float *matrix, int x, int y, float value);
|
||||
void FASTCALL MatrixCopy (float * matrixDST, const float * matrixSRC);
|
||||
void FASTCALL MatrixIdentity (float *matrix);
|
||||
|
||||
void MatrixTranspose (float *matrix);
|
||||
void MatrixStackInit (MatrixStack *stack);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include <SDL/SDL.h>
|
||||
#include "types.h"
|
||||
#include "SPU.h"
|
||||
#include "sndsdl.h"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define REG_NUM(i, n) (((i)>>n)&0x7)
|
||||
|
||||
extern BOOL execute;
|
||||
extern volatile BOOL execute;
|
||||
|
||||
// Use this macros for reading/writing, so the GDB stub isn't broken
|
||||
#ifdef GDB_STUB
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#define FASTCALL __attribute__((fastcall))
|
||||
#elif defined (__i386__)
|
||||
#define FASTCALL __attribute__((regparm(3)))
|
||||
#elif defined _MSC_VER
|
||||
#define FASTCALL __fastcall
|
||||
#else
|
||||
#define FASTCALL
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue