Added libmpg123 to FileHandler. This and libjpeg-turbo are now being assembled by GCC and NASM, respectively.

BMP support will be coming next.
This commit is contained in:
Fatbag 2012-03-25 20:51:30 -05:00
parent 705da4ba5c
commit 4442056335
9 changed files with 11 additions and 5 deletions

View file

@ -39,8 +39,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
endif()
# Size
set(CFLAGS_SIZE "${CFLAGS} -Os -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fmerge-all-constants -fsched-pressure")
set(LDFLAGS_SIZE "${LDFLAGS} -s -fwhole-program")
set(CFLAGS_SIZE "${CFLAGS} -Os -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fmerge-all-constants -fsched-pressure -flto")
set(LDFLAGS_SIZE "${LDFLAGS} -s -fwhole-program -flto")
# Speed
set(CFLAGS_SPEED "${CFLAGS} -O3 -g0 -fomit-frame-pointer -ffast-math -fmerge-all-constants -funsafe-loop-optimizations -fmerge-all-constants -fsched-pressure -fmodulo-sched -fmodulo-sched-allow-regmoves -fgcse-sm -fgcse-las -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=0 -fsched-stalled-insns-dep -fsched2-use-superblocks -fipa-pta -fipa-matrix-reorg -ftree-loop-linear -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-loop-distribution -ftree-loop-im -ftree-loop-ivcanon -fivopts -fvect-cost-model -fvariable-expansion-in-unroller -fbranch-target-load-optimize -maccumulate-outgoing-args -flto")
@ -62,6 +62,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_RC_FLAGS "${RCFLAGS}")
endif()
enable_language(ASM)
set(CMAKE_ASM_COMPILER "gcc")
set(CMAKE_ASM_FLAGS "${CFLAGS}")
if(WIN32)
set(DIST_NAME "windows" CACHE STRING "Output folder name for the _dist folder (no start or end slash)")
elseif(APPLE)

View file

@ -91,6 +91,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
LARGE_INTEGER CurrentTime;
QueryPerformanceCounter(&CurrentTime);
float TimeDelta = (float)(CurrentTime.QuadPart-PreviousTime.QuadPart)/System::ClockFreq.QuadPart;
if(TimeDelta < 0 || TimeDelta >= 5) //Invalid TimeDelta
continue;
int result = CurrentScene->RunFor(TimeDelta);
if(result == System::SHUTDOWN)
@ -104,7 +106,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
QueryPerformanceCounter(&CurrentTime);
float SleepDuration =
(System::FramePeriod - (float)(CurrentTime.QuadPart-PreviousTime.QuadPart)/System::ClockFreq.QuadPart) * 1000;
if(SleepDuration > 1) Sleep((unsigned) SleepDuration);
if(SleepDuration > 1 && SleepDuration < 100) Sleep((unsigned) SleepDuration);
}
ShowWindow(Window::hWnd, SW_HIDE);

View file

@ -17,7 +17,6 @@
#define WINVER 0x0502
#define _WIN32_WINNT 0x0502
#define NTDDI_VERSION 0x05010300
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>

View file

@ -12,7 +12,7 @@ Development Phase: Planning
Technical Preview 1
Schedule: (Not very subject to change)
1. Implement cst and uis parsers [40%]
2. Replicate functionality up until the login dialog
2. Replicate functionality up until the login dialog [0%]
3. Implement the OpenGL-based windowing system
4. Replicate character selection and creation features and the city selection dialog
5. Implement the code needed to allow the game to read all necessary files from the TSOClient folder

View file

@ -5,6 +5,7 @@ add_subdirectory(iff)
add_subdirectory(libexpat)
add_subdirectory(libfar)
add_subdirectory(libjpeg-turbo)
add_subdirectory(libmpg123)
add_subdirectory(libpng)
add_subdirectory(utk)
add_subdirectory(xa)