Commit f5dbad31 authored by bitplane's avatar bitplane

Added Silicon Graphics RGB texture loader by Gary Conway.

Added dummy os::Byteswap methods to prevent implicit byte swapping on char types.
Updated meshviewer config.xml to include PLY files, also removed the statement that the combo box has no function as it has worked for some time. 
Fixed some comments in CNullDriver.cpp.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2262 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 229ff7da
Changes in 1.6 Changes in 1.6
- Added SGI RGB file reader by Gary Conway, for loading Silicon Graphics .rgb, .rgba, .sgi, .int and .inta textures
- Renamed setResizeAble to setResizeable - Renamed setResizeAble to setResizeable
- Added new device method minimizeWindow which minimizes the window (just as if the minimize button has been clicked). - Added new device method minimizeWindow which minimizes the window (just as if the minimize button has been clicked).
......
...@@ -297,6 +297,8 @@ B3D, MS3D or X meshes */ ...@@ -297,6 +297,8 @@ B3D, MS3D or X meshes */
#define _IRR_COMPILE_WITH_TGA_LOADER_ #define _IRR_COMPILE_WITH_TGA_LOADER_
//! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files //! Define _IRR_COMPILE_WITH_WAL_LOADER_ if you want to load .wal files
#define _IRR_COMPILE_WITH_WAL_LOADER_ #define _IRR_COMPILE_WITH_WAL_LOADER_
//! Define _IRR_COMPILE_WITH_RGB_LOADER_ if you want to load Silicon Graphics .rgb/.rgba/.sgi/.int/.inta/.bw files
#define _IRR_COMPILE_WITH_RGB_LOADER_
//! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files //! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files
#define _IRR_COMPILE_WITH_BMP_WRITER_ #define _IRR_COMPILE_WITH_BMP_WRITER_
......
<?xml version="1.0"?> <?xml version="1.0"?>
<config> <config>
<!--This is a config file for the Irrlicht Engine Mesh Viewer.--> <!--This is a config file for the Irrlicht Engine Mesh Viewer.-->
<startUpModel file="dwarf.x" /> <startUpModel file="dwarf.x" />
<messageText caption="Irrlicht Engine Mesh Viewer">Welcome to the Mesh Viewer of the &quot;Irrlicht Engine&quot;!. <messageText caption="Irrlicht Engine Mesh Viewer">Welcome to the Mesh Viewer of the &quot;Irrlicht Engine&quot;!.
This program is able to load and display all 3D geometry and models the Irrlicht Engine can. This program is able to load and display all 3D geometry and models the Irrlicht Engine can.
Controls: Left mouse to rotate, right mouse to move, both buttons to zoom. Escape to Stop FPS Camera Controls: Left mouse to rotate, right mouse to move, both buttons to zoom. Escape to Stop FPS Camera
Supported formats are: Supported formats are:
- Irrlicht scene and mesh formats (.irr, .irrmesh, .xml) - Irrlicht scene and mesh formats (.irr, .irrmesh, .xml)
- 3D Studio (.3ds) - 3D Studio (.3ds)
- Blitz3D (.b3d) - Blitz3D (.b3d)
- COLLADA 1.2/1.3 (.dae, .xml) - COLLADA 1.2/1.3 (.dae, .xml)
- Cartography shop 4 (.csm) - Cartography shop 4 (.csm)
- DirectX (.x) - DirectX (.x)
- DeleD (.dmf) - DeleD (.dmf)
- Maya (.obj) - Maya (.obj)
- Milkshape (.ms3d) - Milkshape (.ms3d)
- My3D (.my3D) - My3D (.my3D)
- OCT (.oct) - OCT (.oct)
- Ogre3d (.mesh) - Ogre3d (.mesh)
- Pulsar LMTools (.lmts) - Pulsar LMTools (.lmts)
- Quake 3 levels (.bsp) - Quake 3 levels (.bsp)
- Quake 2 models (.md2) - Quake 2 models (.md2)
- Stereolithography format (.stl) - Stanford Triangle (.ply)
- Stereolithography format (.stl)
Please note that this program is also a demo of the user interface capabilities of the engine, so for example the combo box in the toolbar has no function.
</messageText> </messageText>
</config> </config>
This diff is collapsed.
// Copyright (C) 2009 Gary Conway
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
/*
Author: Gary Conway (Viper) - co-author of the ZIP file format, Feb 1989,
see the story at http://www.idcnet.us/ziphistory.html
Website: http://idcnet.us
Email: codeslinger@vipergc.com
Created: March 1, 2009
Version: 1.0
Updated:
*/
#ifndef __C_IMAGE_LOADER_RGB_H_INCLUDED__
#define __C_IMAGE_LOADER_RGB_H_INCLUDED__
// define _IRR_RGB_FILE_INVERTED_IMAGE_ to preserve the inverted format of the RGB file
// commenting this out will invert the inverted image,resulting in the image being upright
#define _IRR_RGB_FILE_INVERTED_IMAGE_
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_RGB_LOADER_
#include "IImageLoader.h"
namespace irr
{
namespace video
{
// byte-align structures
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( push, packing )
# pragma pack( 1 )
# define PACK_STRUCT
#elif defined( __GNUC__ )
# define PACK_STRUCT __attribute__((packed))
#else
# error compiler not supported
#endif
// the RGB image file header structure
struct SRGBHeader
{
u16 Magic; // IRIS image file magic number
u8 Storage; // Storage format
u8 BPC; // Number of bytes per pixel channel
u16 Dimension; // Number of dimensions
u16 Xsize; // X size in pixels
u16 Ysize; // Y size in pixels
u16 Zsize; // Z size in pixels
u32 Pixmin; // Minimum pixel value
u32 Pixmax; // Maximum pixel value
u32 Dummy1; // ignored
char Imagename[80]; // Image name
u32 Colormap; // Colormap ID
char Dummy2[404]; // Ignored
} PACK_STRUCT;
// Default alignment
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( pop, packing )
#endif
#undef PACK_STRUCT
// this structure holds context specific data about the file being loaded.
typedef struct _RGBdata
{
u8 *tmp,
*tmpR,
*tmpG,
*tmpB,
*tmpA;
u32 *StartTable; // compressed data table, holds file offsets
u32 *LengthTable; // length for the above data, hold lengths for above
u32 TableLen; // len of above tables
//bool swapFlag;
SRGBHeader header; // define the .rgb file header
u32 ImageSize;
u8 *rgbData;
public:
_RGBdata() : tmp(0), tmpR(0), tmpG(0), tmpB(0), tmpA(0),
StartTable(0), LengthTable(0), TableLen(0), ImageSize(0), rgbData(0)
{
}
~_RGBdata()
{
if (tmp) delete [] tmp;
if (tmpR) delete [] tmpR;
if (tmpG) delete [] tmpG;
if (tmpB) delete [] tmpB;
if (tmpA) delete [] tmpA;
if (StartTable) delete [] StartTable;
if (LengthTable) delete [] LengthTable;
if (rgbData) delete [] rgbData;
}
bool allocateTemps()
{
tmp = tmpR = tmpG = tmpB = tmpA = 0;
tmp = new u8 [header.Xsize * 256 * header.BPC];
if (!tmp)
return false;
if (header.Zsize >= 1)
{
if ( !(tmpR = new u8 [header.Xsize * header.BPC]) )
return false;
}
if (header.Zsize >= 2)
{
if ( !(tmpG = new u8 [header.Xsize * header.BPC]) )
return false;
}
if (header.Zsize >= 3)
{
if ( !(tmpB = new u8 [header.Xsize * header.BPC]) )
return false;
}
if (header.Zsize >= 4)
{
if ( !(tmpA = new u8 [header.Xsize * header.BPC]) )
return false;
}
return true;
}
//typedef unsigned char * BytePtr;
/*
template <class T>
inline void swapBytes( T &s )
{
if( sizeof( T ) == 1 )
return;
T d = s;
BytePtr sptr = (BytePtr)&s;
BytePtr dptr = &(((BytePtr)&d)[sizeof(T)-1]);
for( unsigned int i = 0; i < sizeof(T); i++ )
*(sptr++) = *(dptr--);
}
*/
} rgbStruct;
//! Surface Loader for Silicon Graphics RGB files
class CImageLoaderRGB : public IImageLoader
{
public:
//! constructor
CImageLoaderRGB();
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".tga")
virtual bool isALoadableFileExtension(const irr::core::stringc &fileName) const;
//! returns true if the file maybe is able to be loaded by this class
virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const;
private:
bool readHeader(io::IReadFile* file, rgbStruct* rgb) const;
void readRGBrow( u8 *buf, int y, int z, io::IReadFile* file, rgbStruct* rgb) const;
void convertLong(u32 *array, long length) const;
void convertShort(u16 *array, long length) const;
void processFile(rgbStruct *rgb, io::IReadFile *file) const;
bool checkFormat(io::IReadFile *file, rgbStruct *rgb) const;
bool readOffsetTables(io::IReadFile* file, rgbStruct *rgb) const;
void converttoARGB(u8* in, rgbStruct *rgb) const;
};
} // end namespace video
} // end namespace irr
#endif
#endif
...@@ -44,29 +44,32 @@ IImageLoader* createImageLoaderWAL(); ...@@ -44,29 +44,32 @@ IImageLoader* createImageLoaderWAL();
//! creates a loader which is able to load ppm/pgm/pbm images //! creates a loader which is able to load ppm/pgm/pbm images
IImageLoader* createImageLoaderPPM(); IImageLoader* createImageLoaderPPM();
//! creates a loader which is able to load bmp images //! creates a loader which is able to load rgb images
IImageLoader* createImageLoaderRGB();
//! creates a writer which is able to save bmp images
IImageWriter* createImageWriterBMP(); IImageWriter* createImageWriterBMP();
//! creates a loader which is able to load jpg images //! creates a writer which is able to save jpg images
IImageWriter* createImageWriterJPG(); IImageWriter* createImageWriterJPG();
//! creates a loader which is able to load tga images //! creates a writer which is able to save tga images
IImageWriter* createImageWriterTGA(); IImageWriter* createImageWriterTGA();
//! creates a loader which is able to load psd images //! creates a writer which is able to save psd images
IImageWriter* createImageWriterPSD(); IImageWriter* createImageWriterPSD();
//! creates a loader which is able to load pcx images //! creates a writer which is able to save pcx images
IImageWriter* createImageWriterPCX(); IImageWriter* createImageWriterPCX();
//! creates a loader which is able to load png images //! creates a writer which is able to save png images
IImageWriter* createImageWriterPNG(); IImageWriter* createImageWriterPNG();
//! creates a loader which is able to load ppm images //! creates a writer which is able to save ppm images
IImageWriter* createImageWriterPPM(); IImageWriter* createImageWriterPPM();
//! constructor //! constructor
CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize) CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize)
: FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize), : FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize),
...@@ -116,6 +119,10 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre ...@@ -116,6 +119,10 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre
#ifdef _IRR_COMPILE_WITH_PPM_LOADER_ #ifdef _IRR_COMPILE_WITH_PPM_LOADER_
SurfaceLoader.push_back(video::createImageLoaderPPM()); SurfaceLoader.push_back(video::createImageLoaderPPM());
#endif #endif
#ifdef _IRR_COMPILE_WITH_RGB_LOADER_
SurfaceLoader.push_back(video::createImageLoaderRGB());
#endif
#ifdef _IRR_COMPILE_WITH_BMP_WRITER_ #ifdef _IRR_COMPILE_WITH_BMP_WRITER_
SurfaceWriter.push_back(video::createImageWriterBMP()); SurfaceWriter.push_back(video::createImageWriterBMP());
......
...@@ -494,6 +494,8 @@ ...@@ -494,6 +494,8 @@
<Unit filename="CImageLoaderPPM.h" /> <Unit filename="CImageLoaderPPM.h" />
<Unit filename="CImageLoaderPSD.cpp" /> <Unit filename="CImageLoaderPSD.cpp" />
<Unit filename="CImageLoaderPSD.h" /> <Unit filename="CImageLoaderPSD.h" />
<Unit filename="CImageLoaderRGB.cpp" />
<Unit filename="CImageLoaderRGB.h" />
<Unit filename="CImageLoaderTGA.cpp" /> <Unit filename="CImageLoaderTGA.cpp" />
<Unit filename="CImageLoaderTGA.h" /> <Unit filename="CImageLoaderTGA.h" />
<Unit filename="CImageLoaderWAL.cpp" /> <Unit filename="CImageLoaderWAL.cpp" />
......
This diff is collapsed.
...@@ -1220,6 +1220,12 @@ ...@@ -1220,6 +1220,12 @@
<File <File
RelativePath="CImageLoaderPSD.h"> RelativePath="CImageLoaderPSD.h">
</File> </File>
<File
RelativePath="CImageLoaderRGB.cpp">
</File>
<File
RelativePath="CImageLoaderRGB.h">
</File>
<File <File
RelativePath="CImageLoaderTGA.cpp"> RelativePath="CImageLoaderTGA.cpp">
</File> </File>
......
...@@ -1737,6 +1737,14 @@ ...@@ -1737,6 +1737,14 @@
RelativePath="CImageLoaderPSD.h" RelativePath="CImageLoaderPSD.h"
> >
</File> </File>
<File
RelativePath="CImageLoaderRGB.cpp"
>
</File>
<File
RelativePath="CImageLoaderRGB.h"
>
</File>
<File <File
RelativePath="CImageLoaderTGA.cpp" RelativePath="CImageLoaderTGA.cpp"
> >
......
...@@ -1709,6 +1709,14 @@ ...@@ -1709,6 +1709,14 @@
RelativePath="CImageLoaderPSD.h" RelativePath="CImageLoaderPSD.h"
> >
</File> </File>
<File
RelativePath=".\CImageLoaderRGB.cpp"
>
</File>
<File
RelativePath=".\CImageLoaderRGB.h"
>
</File>
<File <File
RelativePath="CImageLoaderTGA.cpp" RelativePath="CImageLoaderTGA.cpp"
> >
......
...@@ -1384,6 +1384,14 @@ ...@@ -1384,6 +1384,14 @@
RelativePath="CImageLoaderPSD.h" RelativePath="CImageLoaderPSD.h"
> >
</File> </File>
<File
RelativePath="CImageLoaderRGB.cpp"
>
</File>
<File
RelativePath="CImageLoaderRGB.h"
>
</File>
<File <File
RelativePath="CImageLoaderTGA.cpp" RelativePath="CImageLoaderTGA.cpp"
> >
......
...@@ -1478,6 +1478,12 @@ ...@@ -1478,6 +1478,12 @@
<File <File
RelativePath=".\CImageLoaderPSD.h"> RelativePath=".\CImageLoaderPSD.h">
</File> </File>
<File
RelativePath=".\CImageLoaderRGB.cpp">
</File>
<File
RelativePath=".\CImageLoaderRGB.h">
</File>
<File <File
RelativePath=".\CImageLoaderTGA.cpp"> RelativePath=".\CImageLoaderTGA.cpp">
</File> </File>
......
...@@ -29,7 +29,7 @@ IRROBJ = CBillboardSceneNode.o CCameraSceneNode.o CDummyTransformationSceneNode. ...@@ -29,7 +29,7 @@ IRROBJ = CBillboardSceneNode.o CCameraSceneNode.o CDummyTransformationSceneNode.
IRRPARTICLEOBJ = CParticleAnimatedMeshSceneNodeEmitter.o CParticleBoxEmitter.o CParticleCylinderEmitter.o CParticleMeshEmitter.o CParticlePointEmitter.o CParticleRingEmitter.o CParticleSphereEmitter.o CParticleAttractionAffector.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticleRotationAffector.o CParticleSystemSceneNode.o CParticleScaleAffector.o IRRPARTICLEOBJ = CParticleAnimatedMeshSceneNodeEmitter.o CParticleBoxEmitter.o CParticleCylinderEmitter.o CParticleMeshEmitter.o CParticlePointEmitter.o CParticleRingEmitter.o CParticleSphereEmitter.o CParticleAttractionAffector.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticleRotationAffector.o CParticleSystemSceneNode.o CParticleScaleAffector.o
IRRANIMOBJ = CSceneNodeAnimatorCameraFPS.o CSceneNodeAnimatorCameraMaya.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o IRRANIMOBJ = CSceneNodeAnimatorCameraFPS.o CSceneNodeAnimatorCameraMaya.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o
IRRDRVROBJ = CNullDriver.o COpenGLDriver.o COpenGLNormalMapRenderer.o COpenGLParallaxMapRenderer.o COpenGLShaderMaterialRenderer.o COpenGLTexture.o COpenGLSLMaterialRenderer.o COpenGLExtensionHandler.o CD3D8Driver.o CD3D8NormalMapRenderer.o CD3D8ParallaxMapRenderer.o CD3D8ShaderMaterialRenderer.o CD3D8Texture.o CD3D9Driver.o CD3D9HLSLMaterialRenderer.o CD3D9NormalMapRenderer.o CD3D9ParallaxMapRenderer.o CD3D9ShaderMaterialRenderer.o CD3D9Texture.o IRRDRVROBJ = CNullDriver.o COpenGLDriver.o COpenGLNormalMapRenderer.o COpenGLParallaxMapRenderer.o COpenGLShaderMaterialRenderer.o COpenGLTexture.o COpenGLSLMaterialRenderer.o COpenGLExtensionHandler.o CD3D8Driver.o CD3D8NormalMapRenderer.o CD3D8ParallaxMapRenderer.o CD3D8ShaderMaterialRenderer.o CD3D8Texture.o CD3D9Driver.o CD3D9HLSLMaterialRenderer.o CD3D9NormalMapRenderer.o CD3D9ParallaxMapRenderer.o CD3D9ShaderMaterialRenderer.o CD3D9Texture.o
IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o \ IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o CImageLoaderRGB.o \
CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o
IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ) IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
......
...@@ -46,6 +46,9 @@ namespace os ...@@ -46,6 +46,9 @@ namespace os
u32 Byteswap::byteswap(u32 num) {return bswap_32(num);} u32 Byteswap::byteswap(u32 num) {return bswap_32(num);}
s32 Byteswap::byteswap(s32 num) {return bswap_32(num);} s32 Byteswap::byteswap(s32 num) {return bswap_32(num);}
f32 Byteswap::byteswap(f32 num) {u32 tmp=bswap_32(*((u32*)&num)); return *((f32*)&tmp);} f32 Byteswap::byteswap(f32 num) {u32 tmp=bswap_32(*((u32*)&num)); return *((f32*)&tmp);}
// prevent accidental byte swapping of chars
u8 Byteswap::byteswap(u8 num) {return num;}
c8 Byteswap::byteswap(c8 num) {return num;}
} }
} }
......
...@@ -23,6 +23,9 @@ namespace os ...@@ -23,6 +23,9 @@ namespace os
static u32 byteswap(u32 num); static u32 byteswap(u32 num);
static s32 byteswap(s32 num); static s32 byteswap(s32 num);
static f32 byteswap(f32 num); static f32 byteswap(f32 num);
// prevent accidental swapping of chars
static u8 byteswap(u8 num);
static c8 byteswap(c8 num);
}; };
class Printer class Printer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment