mirror of
https://github.com/simtactics/niotso.git
synced 2025-03-22 10:52:20 +00:00
Added eagames.bmp reading to the LoginScreen scene.
Added BCON parsing functionality contributed by Propeng.
This commit is contained in:
parent
cb751c0bb8
commit
7d9259b63d
13 changed files with 157 additions and 54 deletions
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
namespace Audio {
|
namespace Audio {
|
||||||
|
|
||||||
HANDLE Thread;
|
|
||||||
|
|
||||||
IXAudio2 *pXAudio2 = NULL;
|
IXAudio2 *pXAudio2 = NULL;
|
||||||
IXAudio2MasteringVoice *MasterVoice = NULL;
|
IXAudio2MasteringVoice *MasterVoice = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(NiotsoClient)
|
project(NiotsoClient)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/Libraries/FileHandler)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(NIOTSOCLIENT_SOURCES
|
set(NIOTSOCLIENT_SOURCES
|
||||||
Client.cpp
|
Client.cpp
|
||||||
|
@ -13,5 +15,5 @@ if(WIN32)
|
||||||
System/System.cpp
|
System/System.cpp
|
||||||
)
|
)
|
||||||
add_executable(TSO WIN32 ${NIOTSOCLIENT_SOURCES})
|
add_executable(TSO WIN32 ${NIOTSOCLIENT_SOURCES})
|
||||||
target_link_libraries(TSO ole32 opengl32)
|
target_link_libraries(TSO FileHandler_shared ole32 opengl32)
|
||||||
endif()
|
endif()
|
|
@ -69,7 +69,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentScene = new LoginScreen();
|
CurrentScene = new LoginScreen();
|
||||||
if(CurrentScene == NULL){
|
if(System::SceneFailed || CurrentScene == NULL){
|
||||||
|
if(System::SceneFailed) delete CurrentScene;
|
||||||
Shutdown();
|
Shutdown();
|
||||||
return ERROR_INIT | ERROR_INIT_LOGIC | ERROR_LOGIC_CREATE_SCENE;
|
return ERROR_INIT | ERROR_INIT_LOGIC | ERROR_LOGIC_CREATE_SCENE;
|
||||||
}
|
}
|
||||||
|
@ -110,8 +111,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowWindow(Window::hWnd, SW_HIDE);
|
ShowWindow(Window::hWnd, SW_HIDE);
|
||||||
Audio::Shutdown();
|
delete CurrentScene;
|
||||||
Graphics::Shutdown();
|
|
||||||
|
|
||||||
Shutdown();
|
Shutdown();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -193,10 +193,12 @@ int CreateWindowInvisible(HINSTANCE hInst, unsigned Width, unsigned Height, bool
|
||||||
|
|
||||||
void Shutdown()
|
void Shutdown()
|
||||||
{
|
{
|
||||||
|
Audio::Shutdown();
|
||||||
|
Graphics::Shutdown();
|
||||||
|
|
||||||
if(Window::hWnd){
|
if(Window::hWnd){
|
||||||
DestroyWindow(Window::hWnd);
|
DestroyWindow(Window::hWnd);
|
||||||
Window::hWnd = NULL;
|
Window::hWnd = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnregisterClass("TSO_NIOTSO", System::hInst);
|
UnregisterClass("TSO_NIOTSO", System::hInst);
|
||||||
}
|
}
|
|
@ -23,13 +23,7 @@
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
|
|
||||||
#include "version.h"
|
#include "FileHandler.hpp"
|
||||||
#include "System/System.hpp"
|
|
||||||
#include "Resources/Resource.h"
|
|
||||||
|
|
||||||
#include "Audio/Audio.hpp"
|
|
||||||
#include "Graphics/Graphics.hpp"
|
|
||||||
#include "Scene/Scene.hpp"
|
|
||||||
|
|
||||||
//IsometricEngine.cpp
|
//IsometricEngine.cpp
|
||||||
namespace Window {
|
namespace Window {
|
||||||
|
@ -40,3 +34,11 @@ namespace Window {
|
||||||
|
|
||||||
//MessageHandler.cpp
|
//MessageHandler.cpp
|
||||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
|
#include "System/System.hpp"
|
||||||
|
#include "Resources/Resource.h"
|
||||||
|
|
||||||
|
#include "Audio/Audio.hpp"
|
||||||
|
#include "Graphics/Graphics.hpp"
|
||||||
|
#include "Scene/Scene.hpp"
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
namespace Graphics {
|
namespace Graphics {
|
||||||
|
|
||||||
HANDLE Thread;
|
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
HGLRC hRC;
|
HGLRC hRC;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define EXIT_SCENE() do { System::SceneFailed = true; delete this; return; } while(0)
|
||||||
|
#define SCENE_EXIT 0
|
||||||
|
#define SCENE_NEED_REDRAW 1
|
||||||
|
#define SCENE_NO_REDRAW -1
|
||||||
|
|
||||||
class Scene {
|
class Scene {
|
||||||
const float TickPeriod;
|
const float TickPeriod;
|
||||||
float TimeDelta;
|
float TimeDelta;
|
||||||
|
@ -45,15 +50,43 @@ class Scene {
|
||||||
};
|
};
|
||||||
|
|
||||||
class LoginScreen : public Scene {
|
class LoginScreen : public Scene {
|
||||||
public: LoginScreen() : Scene(1.0f/15) {}
|
public:
|
||||||
|
LoginScreen() : Scene(1.0f/15){
|
||||||
|
Image_t * Image = File::ReadImageFile("eagames.bmp");
|
||||||
|
if(!Image){
|
||||||
|
const char * Message;
|
||||||
|
switch(File::Error){
|
||||||
|
case FERR_NOT_FOUND:
|
||||||
|
Message = "%s does not exist.";
|
||||||
|
break;
|
||||||
|
case FERR_OPEN:
|
||||||
|
Message = "%s could not be opened for reading.";
|
||||||
|
break;
|
||||||
|
case FERR_BLANK:
|
||||||
|
case FERR_UNRECOGNIZED:
|
||||||
|
case FERR_INVALIDDATA:
|
||||||
|
Message = "%s is corrupt or invalid.";
|
||||||
|
break;
|
||||||
|
case FERR_MEMORY:
|
||||||
|
Message = "Memory for %s could not be allocated.";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Message = "%s could not be read.";
|
||||||
|
}
|
||||||
|
|
||||||
|
char Buffer[1024];
|
||||||
|
sprintf(Buffer, Message, "eagames.bmp");
|
||||||
|
MessageBox(Window::hWnd, Buffer, NULL, MB_OK | MB_ICONERROR);
|
||||||
|
EXIT_SCENE();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int Run(float){
|
int Run(float){
|
||||||
if(System::UserInput.CloseWindow){
|
if(System::UserInput.CloseWindow){
|
||||||
System::Shutdown = true;
|
return SCENE_EXIT;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
return 1;
|
return SCENE_NEED_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#include "../EngineInterface.hpp"
|
#include "../EngineInterface.hpp"
|
||||||
|
|
||||||
namespace System {
|
namespace System {
|
||||||
bool Shutdown = false;
|
|
||||||
HINSTANCE hInst = NULL;
|
HINSTANCE hInst = NULL;
|
||||||
HANDLE Process;
|
HANDLE Process;
|
||||||
HANDLE ProcessHeap;
|
HANDLE ProcessHeap;
|
||||||
LARGE_INTEGER ClockFreq;
|
LARGE_INTEGER ClockFreq;
|
||||||
float FramePeriod;
|
float FramePeriod;
|
||||||
UserInput_t UserInput;
|
UserInput_t UserInput;
|
||||||
|
bool SceneFailed = false;
|
||||||
|
|
||||||
int Initialize(){
|
int Initialize(){
|
||||||
memset(&UserInput, 0, sizeof(UserInput));
|
memset(&UserInput, 0, sizeof(UserInput));
|
||||||
|
|
|
@ -18,13 +18,11 @@
|
||||||
//System/System.cpp
|
//System/System.cpp
|
||||||
namespace System {
|
namespace System {
|
||||||
int Initialize();
|
int Initialize();
|
||||||
extern bool Shutdown;
|
|
||||||
extern HINSTANCE hInst;
|
extern HINSTANCE hInst;
|
||||||
extern HANDLE Process;
|
extern HANDLE Process;
|
||||||
extern HANDLE ProcessHeap;
|
extern HANDLE ProcessHeap;
|
||||||
extern LARGE_INTEGER ClockFreq;
|
extern LARGE_INTEGER ClockFreq;
|
||||||
extern float FramePeriod;
|
extern float FramePeriod;
|
||||||
extern bool Keys[256];
|
|
||||||
|
|
||||||
struct UserInput_t {
|
struct UserInput_t {
|
||||||
bool Keys[256];
|
bool Keys[256];
|
||||||
|
@ -33,6 +31,8 @@ namespace System {
|
||||||
};
|
};
|
||||||
extern UserInput_t UserInput;
|
extern UserInput_t UserInput;
|
||||||
|
|
||||||
|
extern bool SceneFailed;
|
||||||
|
|
||||||
//Constants
|
//Constants
|
||||||
enum {
|
enum {
|
||||||
SHUTDOWN = 0
|
SHUTDOWN = 0
|
||||||
|
|
|
@ -58,7 +58,6 @@ extern size_t FileSize;
|
||||||
|
|
||||||
uint8_t * ReadFile(const char * Filename);
|
uint8_t * ReadFile(const char * Filename);
|
||||||
Image_t * ReadImageFile(const char * Filename);
|
Image_t * ReadImageFile(const char * Filename);
|
||||||
uint8_t * ReadJPG(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,10 @@ enum ImageType {
|
||||||
FIMG_COUNT
|
FIMG_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t * ReadJPG(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
static uint8_t * ReadJPG(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
||||||
uint8_t * ReadBMP(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
static uint8_t * ReadBMP(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
||||||
uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
static uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
||||||
uint8_t * ReadTGA(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
static uint8_t * ReadTGA(Image_t * Image, const uint8_t * InData, size_t FileSize);
|
||||||
|
|
||||||
static const uint8_t Signature[] = {
|
static const uint8_t Signature[] = {
|
||||||
'B', //BMP
|
'B', //BMP
|
||||||
|
@ -87,7 +87,7 @@ Image_t * ReadImageFile(const char * Filename){
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t * ReadBMP(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
static uint8_t * ReadBMP(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
bmpheader_t BMPHeader;
|
bmpheader_t BMPHeader;
|
||||||
if(!bmp_read_header(&BMPHeader, InData, FileSize)){
|
if(!bmp_read_header(&BMPHeader, InData, FileSize)){
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -109,7 +109,7 @@ uint8_t * ReadBMP(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
return OutData;
|
return OutData;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t * ReadJPG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
static uint8_t * ReadJPG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
//Initialize
|
//Initialize
|
||||||
jpeg_decompress_struct cinfo;
|
jpeg_decompress_struct cinfo;
|
||||||
jpeg_error_mgr jerr;
|
jpeg_error_mgr jerr;
|
||||||
|
@ -170,7 +170,7 @@ static void user_read_data(png_structp png_ptr, png_bytep data, png_size_t lengt
|
||||||
pngdata->buffer += length;
|
pngdata->buffer += length;
|
||||||
pngdata->size -= length;
|
pngdata->size -= length;
|
||||||
}
|
}
|
||||||
uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
static uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
pngdata_t pngdata;
|
pngdata_t pngdata;
|
||||||
|
|
||||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||||
|
@ -203,7 +203,6 @@ uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t **Scanlines = png_get_rows(png_ptr, info_ptr);
|
uint8_t **Scanlines = png_get_rows(png_ptr, info_ptr);
|
||||||
printf("png:Now. %ux%u\n", width, height);
|
|
||||||
for(unsigned i=0; i<height; i++)
|
for(unsigned i=0; i<height; i++)
|
||||||
memcpy(OutData + i*width*3, Scanlines[height-i-1], width*3);
|
memcpy(OutData + i*width*3, Scanlines[height-i-1], width*3);
|
||||||
|
|
||||||
|
@ -215,7 +214,7 @@ uint8_t * ReadPNG(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
return OutData;
|
return OutData;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t * ReadTGA(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
static uint8_t * ReadTGA(Image_t * Image, const uint8_t * InData, size_t FileSize){
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,13 +25,54 @@ int iff_parse_chunk(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
!strcmp(ChunkInfo->Type, "FAMs") ||
|
!strcmp(ChunkInfo->Type, "FAMs") ||
|
||||||
!strcmp(ChunkInfo->Type, "TTAs") )
|
!strcmp(ChunkInfo->Type, "TTAs") )
|
||||||
return iff_parse_str(ChunkInfo, Buffer);
|
return iff_parse_str(ChunkInfo, Buffer);
|
||||||
|
if( !strcmp(ChunkInfo->Type, "BCON") )
|
||||||
|
return iff_parse_bcon(ChunkInfo, Buffer);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int iff_parse_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned IFFSize){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iff_parse_bcon(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
|
IFF_BCON *BCONData;
|
||||||
|
unsigned Size = ChunkInfo->Size - 76;
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
if(Size < 2)
|
||||||
|
return 0;
|
||||||
|
ChunkInfo->FormattedData = malloc(sizeof(IFF_BCON));
|
||||||
|
if(ChunkInfo->FormattedData == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
BCONData = (IFF_BCON*) ChunkInfo->FormattedData;
|
||||||
|
BCONData->ConstantCount = read_uint8le(Buffer);
|
||||||
|
BCONData->Flags = read_uint8le(Buffer + 1);
|
||||||
|
if(BCONData->ConstantCount == 0)
|
||||||
|
return 1;
|
||||||
|
if(BCONData->ConstantCount * 2 > 255*2){
|
||||||
|
free(ChunkInfo->FormattedData);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BCONData->Constants = malloc(BCONData->ConstantCount * sizeof(uint16_t));
|
||||||
|
if(BCONData->Constants == NULL){
|
||||||
|
free(ChunkInfo->FormattedData);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Buffer += 2;
|
||||||
|
for(i=0; i<BCONData->ConstantCount; i++, Buffer += 2)
|
||||||
|
BCONData->Constants[i] = read_uint16le(Buffer);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int iff_parse_str(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
int iff_parse_str(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
/* No bounds checking yet */
|
/* No bounds checking yet */
|
||||||
IFF_STR * StringData;
|
IFF_STR * StringData;
|
||||||
unsigned Size = ChunkInfo->Size - 76;
|
unsigned Size = ChunkInfo->Size - 76;
|
||||||
|
|
||||||
if(Size < 2)
|
if(Size < 2)
|
||||||
return 0;
|
return 0;
|
||||||
ChunkInfo->FormattedData = malloc(sizeof(IFF_STR));
|
ChunkInfo->FormattedData = malloc(sizeof(IFF_STR));
|
||||||
|
@ -254,9 +295,7 @@ int iff_parse_str(IFFChunk * ChunkInfo, const uint8_t * Buffer){
|
||||||
} return 1;
|
} return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(ChunkInfo->FormattedData);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iff_parse_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned IFFSize){
|
|
||||||
return 1;
|
|
||||||
}
|
|
|
@ -71,6 +71,15 @@ static const uint8_t Header_IFF[] = "IFF FILE 2.5:TYPE FOLLOWED BY SIZE\0 JAMIE
|
||||||
** IFF chunk structs
|
** IFF chunk structs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* BCON chunk */
|
||||||
|
|
||||||
|
typedef struct IFF_BCON_struct
|
||||||
|
{
|
||||||
|
uint8_t ConstantCount;
|
||||||
|
uint8_t Flags;
|
||||||
|
uint16_t * Constants;
|
||||||
|
} IFF_BCON;
|
||||||
|
|
||||||
/* STR# chunk */
|
/* STR# chunk */
|
||||||
|
|
||||||
enum IFFLanguage {
|
enum IFFLanguage {
|
||||||
|
@ -147,8 +156,9 @@ void iff_delete(IFFFile * IFFFileInfo);
|
||||||
** IFF chunk functions
|
** IFF chunk functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int iff_parse_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned IFFSize);
|
|
||||||
int iff_parse_chunk(IFFChunk * ChunkInfo, const uint8_t * Buffer);
|
int iff_parse_chunk(IFFChunk * ChunkInfo, const uint8_t * Buffer);
|
||||||
|
int iff_parse_rsmp(IFFChunk * ChunkInfo, const uint8_t * Buffer, unsigned IFFSize);
|
||||||
|
int iff_parse_bcon(IFFChunk * ChunkInfo, const uint8_t * Buffer);
|
||||||
int iff_parse_str(IFFChunk * ChunkInfo, const uint8_t * Buffer);
|
int iff_parse_str(IFFChunk * ChunkInfo, const uint8_t * Buffer);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -285,10 +285,10 @@ int main(int argc, char *argv[]){
|
||||||
!strcmp(ChunkNode->Chunk.Type, "CTSS") ||
|
!strcmp(ChunkNode->Chunk.Type, "CTSS") ||
|
||||||
!strcmp(ChunkNode->Chunk.Type, "FAMs") ||
|
!strcmp(ChunkNode->Chunk.Type, "FAMs") ||
|
||||||
!strcmp(ChunkNode->Chunk.Type, "TTAs") ){
|
!strcmp(ChunkNode->Chunk.Type, "TTAs") ){
|
||||||
|
|
||||||
/****
|
/****
|
||||||
** STR# parsing
|
** STR# parsing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fprintf(hFile, "<table>\n");
|
fprintf(hFile, "<table>\n");
|
||||||
fprintf(hFile, "<tr><td>Format:</td><td>");
|
fprintf(hFile, "<tr><td>Format:</td><td>");
|
||||||
switch(StringData->Format){
|
switch(StringData->Format){
|
||||||
|
@ -349,6 +349,26 @@ int main(int argc, char *argv[]){
|
||||||
|
|
||||||
fprintf(hFile, "</table>\n");
|
fprintf(hFile, "</table>\n");
|
||||||
}
|
}
|
||||||
|
}else if(!strcmp(ChunkNode->Chunk.Type, "BCON")){
|
||||||
|
/****
|
||||||
|
** BCON parsing
|
||||||
|
*/
|
||||||
|
|
||||||
|
IFF_BCON * BCONData = (IFF_BCON*) ChunkNode->Chunk.FormattedData;
|
||||||
|
fprintf(hFile, "<table>\n");
|
||||||
|
fprintf(hFile, "<tr><td>Flags:</td><td><tt>%02X</tt> (%d)</td></tr>\n", BCONData->Flags, BCONData->Flags);
|
||||||
|
fprintf(hFile, "<tr><td>Number of Constants:</td><td>%u</td></tr>\n", BCONData->ConstantCount);
|
||||||
|
fprintf(hFile, "</table>\n");
|
||||||
|
if(BCONData->ConstantCount > 0){
|
||||||
|
unsigned ConstantIndex;
|
||||||
|
|
||||||
|
fprintf(hFile, "<br />\n");
|
||||||
|
fprintf(hFile, "<table class=\"center\">\n");
|
||||||
|
fprintf(hFile, "<tr><th colspan=\"2\">Constant Value</th></tr>\n");
|
||||||
|
for(ConstantIndex=0; ConstantIndex<BCONData->ConstantCount; ConstantIndex++)
|
||||||
|
fprintf(hFile, "<tr><td>%u</td><td>%u</td></tr>\n", ConstantIndex+1, BCONData->Constants[ConstantIndex]);
|
||||||
|
fprintf(hFile, "</table>\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(hFile, "</div>\n\n");
|
fprintf(hFile, "</div>\n\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue