Skip to content

Commit

Permalink
Use fmod 3.75 i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
AdventureT committed Dec 10, 2023
1 parent eb70d62 commit 0fc3ebe
Show file tree
Hide file tree
Showing 13 changed files with 912 additions and 617 deletions.
5 changes: 3 additions & 2 deletions OpenJPOG/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ project ("OpenJPOG")
"TKernelInterface",
"TApplication",
"libtheora",
"theoraplay"
"theoraplay",
"fmodvc.lib"
}

files
Expand All @@ -33,7 +34,7 @@ project ("OpenJPOG")
"%{LibDir.fmod}"
}

prebuildcommands
postbuildcommands
{
"{COPY} \"%{wks.location}bin/" .. outputdir .. "/TKernelInterface/TKernelInterface.dll\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}\"",
"{COPY} \"%{wks.location}bin/" .. outputdir .. "/TApplication/TApplication.dll\" \"%{wks.location}bin/" .. outputdir .. "/%{prj.name}\"",
Expand Down
530 changes: 330 additions & 200 deletions Toshi/vendor/fmod/include/fmod.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Toshi/vendor/fmod/include/fmod_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static char *FMOD_ErrorString(int errcode)
{
case FMOD_ERR_NONE: return "No errors";
case FMOD_ERR_BUSY: return "Cannot call this command after FSOUND_Init. Call FSOUND_Close first.";
case FMOD_ERR_UNINITIALIZED: return "This command failed because FSOUND_Init was not called or called properly";
case FMOD_ERR_UNINITIALIZED: return "This command failed because FSOUND_Init was not called";
case FMOD_ERR_PLAY: return "Playing the sound failed.";
case FMOD_ERR_INIT: return "Error initializing output device.";
case FMOD_ERR_ALLOCATED: return "The output device is already in use and cannot be reused.";
Expand All @@ -27,6 +27,6 @@ static char *FMOD_ErrorString(int errcode)

default : return "Unknown error";
};
};
}

#endif
909 changes: 496 additions & 413 deletions Toshi/vendor/fmod/include/fmoddyn.h

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions Toshi/vendor/fmod/include/wincompat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#if !defined(WINCOMPAT_INCLUDED) && !defined(PLATFORM_WINDOWS) && !defined(WIN32) && !defined(WINDOWS) && !defined(__WIN32__)
#define WINCOMPAT_INCLUDED

/**
*
* Author: Magnus Naeslund (mag@fbab.net, mag@bahnhof.se)
* (c) 2000 Magnus Naeslund, all rights reserved
*
*/

#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
#include <stdio.h>
#include <stdlib.h>

#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif

#define _kbhit kbhit
#define stricmp strcasecmp
#define strnicmp strncasecmp

#define Sleep(x) usleep((x)*1000)

static int inited=0;
static struct termios ori;

static void tcatexit(){
tcsetattr(0,0,&ori);
}

static void init_terminal(){
struct termios t;
tcgetattr(0,&t);
tcgetattr(0,&ori);
t.c_lflag &= ~(ICANON);
tcsetattr(0,0,&t);
atexit(tcatexit);
}

static inline int kbhit(){
fd_set rfds;
struct timeval tv;

if (!inited){
inited=1;
init_terminal();
}

FD_ZERO(&rfds);
FD_SET(0, &rfds);
tv.tv_sec = 0;
tv.tv_usec = 10*1000;
return select(1, &rfds, NULL, NULL, &tv)>0;
}

static inline int getch(){
fd_set rfds;

if (!inited){
inited=1;
init_terminal();
}

FD_ZERO(&rfds);
FD_SET(0, &rfds);
if (select(1, &rfds, NULL, NULL, NULL)>0)
return getchar();
else{
printf("wincompat.h: select() on fd 0 failed\n");
return 0xDeadBeef;
}
}

#endif
Binary file modified Toshi/vendor/fmod/lib/fmod.dll
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/fmod64.dll
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/fmod64vc.lib
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/fmodbc.lib
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/fmodlcc.lib
Binary file not shown.
Binary file modified Toshi/vendor/fmod/lib/fmodvc.lib
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/fmodwc.lib
Binary file not shown.
Binary file added Toshi/vendor/fmod/lib/libfmod.a
Binary file not shown.

0 comments on commit 0fc3ebe

Please sign in to comment.