mirror of
https://github.com/simtactics/niotso.git
synced 2025-03-23 19:32:19 +00:00
* Some files were still encoded with Windows newlines. I fixed all of that.
* Started using the static keyword in a few more places in the client * Updated libpng, libmpg123, and freetype to the latest versions, with position-independent code turned off rather than set to "both"
This commit is contained in:
parent
ecafff8c5c
commit
5713fc1bd1
23 changed files with 1432 additions and 1456 deletions
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "EngineInterface.hpp"
|
#include "EngineInterface.hpp"
|
||||||
|
|
||||||
void Shutdown();
|
static void Shutdown();
|
||||||
Scene * CurrentScene;
|
Scene * CurrentScene;
|
||||||
|
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||||
|
@ -115,7 +115,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shutdown()
|
static void Shutdown()
|
||||||
{
|
{
|
||||||
Audio::Shutdown();
|
Audio::Shutdown();
|
||||||
Graphics::Shutdown();
|
Graphics::Shutdown();
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __restrict
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int bmp_read_header(bmpheader_t * BMPHeader, const uint8_t * Buffer, size_t FileSize){
|
int bmp_read_header(bmpheader_t * BMPHeader, const uint8_t * Buffer, size_t FileSize){
|
||||||
unsigned padding;
|
unsigned padding;
|
||||||
if(FileSize < 54) return 0;
|
if(FileSize < 54) return 0;
|
||||||
|
|
|
@ -17,11 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
typedef unsigned char uint8_t;
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef __restrict
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int RefPackDecompress(const uint8_t *__restrict CompressedData, size_t CompressedSize,
|
int RefPackDecompress(const uint8_t *__restrict CompressedData, size_t CompressedSize,
|
||||||
uint8_t *__restrict DecompressedData, size_t DecompressedSize, unsigned HNSV){
|
uint8_t *__restrict DecompressedData, size_t DecompressedSize, unsigned HNSV){
|
||||||
|
|
|
@ -38,13 +38,6 @@
|
||||||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __inline
|
|
||||||
#define __inline
|
|
||||||
#endif
|
|
||||||
#ifndef __restrict
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static uint8_t ReadBits(utkparams_t *p, uint8_t bits);
|
static uint8_t ReadBits(utkparams_t *p, uint8_t bits);
|
||||||
static void SetUTKParameters(utkparams_t *p);
|
static void SetUTKParameters(utkparams_t *p);
|
||||||
static void DecompressBlock(utkparams_t *p);
|
static void DecompressBlock(utkparams_t *p);
|
||||||
|
|
|
@ -27,10 +27,6 @@
|
||||||
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __restrict
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int wav_read_header(wavheader_t * WAVHeader, const uint8_t * Buffer, size_t FileSize){
|
int wav_read_header(wavheader_t * WAVHeader, const uint8_t * Buffer, size_t FileSize){
|
||||||
if(FileSize < 45) return 0;
|
if(FileSize < 45) return 0;
|
||||||
WAVHeader->sID = read_uint32(Buffer);
|
WAVHeader->sID = read_uint32(Buffer);
|
||||||
|
|
|
@ -29,13 +29,6 @@
|
||||||
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __inline
|
|
||||||
#define __inline
|
|
||||||
#endif
|
|
||||||
#ifndef __restrict
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned xa_compressed_size(unsigned Frames, unsigned Channels)
|
unsigned xa_compressed_size(unsigned Frames, unsigned Channels)
|
||||||
{
|
{
|
||||||
/* This function calculates the size of compressed XA data with known frames and channels, as such:
|
/* This function calculates the size of compressed XA data with known frames and channels, as such:
|
||||||
|
|
|
@ -58,7 +58,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int){
|
||||||
2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
|
2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
|
||||||
2108, 2109, 2200, 2201, 2202, 2203, 2204, 2205,
|
2108, 2109, 2200, 2201, 2202, 2203, 2204, 2205,
|
||||||
2206, 2207, 2208, 2209, 2210, 2300, 2301, 2302,
|
2206, 2207, 2208, 2209, 2210, 2300, 2301, 2302,
|
||||||
2303, 2400
|
2303, 2400, 2401
|
||||||
};
|
};
|
||||||
|
|
||||||
for(unsigned i=0; i<MENUICONS; i++){
|
for(unsigned i=0; i<MENUICONS; i++){
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#define ID_HELP_WEBSITE 1400
|
#define ID_HELP_WEBSITE 1400
|
||||||
#define ID_HELP_ABOUT 1401
|
#define ID_HELP_ABOUT 1401
|
||||||
|
|
||||||
#define MENUICONS 26
|
#define MENUICONS 27
|
||||||
#define IDI_FILE_NEW 2100
|
#define IDI_FILE_NEW 2100
|
||||||
#define IDI_FILE_OPEN 2101
|
#define IDI_FILE_OPEN 2101
|
||||||
#define IDI_FILE_SAVE 2102
|
#define IDI_FILE_SAVE 2102
|
||||||
|
@ -63,6 +63,7 @@
|
||||||
#define IDI_TOOLS_REMOVEHOLES 2302
|
#define IDI_TOOLS_REMOVEHOLES 2302
|
||||||
#define IDI_TOOLS_BATCH 2303
|
#define IDI_TOOLS_BATCH 2303
|
||||||
#define IDI_HELP_WEBSITE 2400
|
#define IDI_HELP_WEBSITE 2400
|
||||||
|
#define IDI_HELP_ABOUT 2401
|
||||||
|
|
||||||
//Right-click menu items
|
//Right-click menu items
|
||||||
#define ID_LISTMENU_ADD 3100
|
#define ID_LISTMENU_ADD 3100
|
||||||
|
|
|
@ -108,6 +108,7 @@ IDI_TOOLS_RESORT RCDATA "../resources/icons/mail-send-receive.png"
|
||||||
IDI_TOOLS_REMOVEHOLES RCDATA "../resources/icons/edit-clear.png"
|
IDI_TOOLS_REMOVEHOLES RCDATA "../resources/icons/edit-clear.png"
|
||||||
IDI_TOOLS_BATCH RCDATA "../resources/icons/utilities-terminal.png"
|
IDI_TOOLS_BATCH RCDATA "../resources/icons/utilities-terminal.png"
|
||||||
IDI_HELP_WEBSITE RCDATA "../resources/icons/internet-web-browser.png"
|
IDI_HELP_WEBSITE RCDATA "../resources/icons/internet-web-browser.png"
|
||||||
|
IDI_HELP_ABOUT RCDATA "../resources/icons/help-about.png"
|
||||||
|
|
||||||
IDB_INFO BITMAP "../resources/icons/info.bmp"
|
IDB_INFO BITMAP "../resources/icons/info.bmp"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue