As this is C project, rename all source file to .c
This commit is contained in:
parent
864fda651d
commit
d45822951f
@ -29,7 +29,7 @@ set(CMAKE_CXX_FLAGS ${COMP_FLAGS})
|
|||||||
|
|
||||||
message("-- Building version ${VERSION}")
|
message("-- Building version ${VERSION}")
|
||||||
|
|
||||||
add_executable(wonderswan main.cpp)
|
add_executable(wonderswan main.c)
|
||||||
|
|
||||||
set_property(TARGET wonderswan PROPERTY CXX_STANDARD 98)
|
set_property(TARGET wonderswan PROPERTY CXX_STANDARD 98)
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -31,7 +31,7 @@ CLEAN_FILES = wonderswan
|
|||||||
|
|
||||||
.SUFFIXES: .cpp
|
.SUFFIXES: .cpp
|
||||||
|
|
||||||
main.o: main.cpp
|
main.o: main.c
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(ALLCFLAGS) -o $@ $<
|
$(CC) -c $(ALLCFLAGS) -o $@ $<
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
set(SOURCES audio.cpp emulate.cpp gpu.cpp io.cpp log.cpp memory.cpp rom.cpp ws.cpp)
|
set(SOURCES audio.c emulate.c gpu.c io.c log.c memory.c rom.c ws.c)
|
||||||
set(HEADERS audio.h emulate.h gpu.h ieeprom.h initialIo.h io.h log.h memory.h rom.h ws.h)
|
set(HEADERS audio.h emulate.h gpu.h ieeprom.h initialIo.h io.h log.h memory.h rom.h ws.h)
|
||||||
|
|
||||||
add_library(wswan ${SOURCES} ${HEADERS})
|
add_library(wswan ${SOURCES} ${HEADERS})
|
||||||
|
|||||||
@ -472,7 +472,7 @@ unsigned int ws_audio_mrand(unsigned int Degree)
|
|||||||
};
|
};
|
||||||
|
|
||||||
static POLYNOMIAL *pTbl = TblMask;
|
static POLYNOMIAL *pTbl = TblMask;
|
||||||
static int ShiftReg=pTbl->InputBit-1;
|
static int ShiftReg = 1;
|
||||||
int XorReg=0;
|
int XorReg=0;
|
||||||
int Masked;
|
int Masked;
|
||||||
|
|
||||||
@ -28,6 +28,7 @@
|
|||||||
#include "gpu.h"
|
#include "gpu.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
//#define IO_DUMP
|
//#define IO_DUMP
|
||||||
|
|
||||||
@ -28,6 +28,7 @@
|
|||||||
#include "gpu.h"
|
#include "gpu.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -1,4 +1,4 @@
|
|||||||
set(SOURCES nec.cpp)
|
set(SOURCES nec.c)
|
||||||
set(HEADERS nec.h necea.h necinstr.h necintrf.h necmodrm.h)
|
set(HEADERS nec.h necea.h necinstr.h necintrf.h necmodrm.h)
|
||||||
|
|
||||||
add_library(nec_v30 ${SOURCES} ${HEADERS})
|
add_library(nec_v30 ${SOURCES} ${HEADERS})
|
||||||
@ -425,11 +425,9 @@ int ws_saveState(char *statepath)
|
|||||||
{
|
{
|
||||||
uint16_t crc=memory_getRomCrc();
|
uint16_t crc=memory_getRomCrc();
|
||||||
uint32_t value;
|
uint32_t value;
|
||||||
char *newPath;
|
char newPath[1024];
|
||||||
fprintf(log_get(),"saving %s\n",statepath);
|
fprintf(log_get(),"saving %s\n",statepath);
|
||||||
|
|
||||||
newPath=new char[1024];
|
|
||||||
|
|
||||||
if (strlen(statepath)<4)
|
if (strlen(statepath)<4)
|
||||||
{
|
{
|
||||||
sprintf(newPath,"%s.wss",statepath);
|
sprintf(newPath,"%s.wss",statepath);
|
||||||
@ -461,7 +459,6 @@ int ws_saveState(char *statepath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int fp=open(newPath, O_RDWR|O_CREAT, 0644);
|
int fp=open(newPath, O_RDWR|O_CREAT, 0644);
|
||||||
delete newPath;
|
|
||||||
|
|
||||||
if (fp==-1)
|
if (fp==-1)
|
||||||
{
|
{
|
||||||
Loading…
x
Reference in New Issue
Block a user