mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 22:45:36 +00:00
Changed "int" to "int32_t" in all extern "C" calls in C++.
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@6 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
13394f17c4
commit
ab0f3cd03f
5 changed files with 18 additions and 18 deletions
|
@ -29,11 +29,11 @@
|
|||
// Callbacks to D code
|
||||
|
||||
// Does the file exist in the archives?
|
||||
extern "C" int d_bsaExists(const char *filename);
|
||||
extern "C" int32_t d_bsaExists(const char *filename);
|
||||
|
||||
// Open a file. Return the pointer and size.
|
||||
extern "C" void d_bsaOpenFile(const char *filename,
|
||||
void **retPtr, unsigned int *retSize);
|
||||
void **retPtr, uint32_t *retSize);
|
||||
|
||||
|
||||
// This archive does not cover one .bsa file, instead it interacts
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
{
|
||||
//std::cout << "open(" << filename << ")\n";
|
||||
void *ptr;
|
||||
unsigned int size;
|
||||
uint32_t size;
|
||||
|
||||
// Open the file
|
||||
d_bsaOpenFile(filename.c_str(), &ptr, &size);
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
// Callbacks to D code.
|
||||
|
||||
// Called once each frame
|
||||
extern "C" int d_frameStarted(float time);
|
||||
extern "C" int32_t d_frameStarted(float time);
|
||||
|
||||
// Handle events
|
||||
extern "C" void d_handleKey(int keycode, unsigned int text);
|
||||
extern "C" void d_handleKey(int keycode, uint32_t text);
|
||||
extern "C" void d_handleMouseMove(const OIS::MouseState *state);
|
||||
extern "C" void d_handleMouseButton(const OIS::MouseState *state, int button);
|
||||
extern "C" void d_handleMouseButton(const OIS::MouseState *state, int32_t button);
|
||||
|
||||
// Frame listener, passed to Ogre. The only thing we use this for is
|
||||
// to capture input and pass control to D code.
|
||||
|
@ -101,7 +101,7 @@ InputListener mInput;
|
|||
|
||||
// Functions called from D during event handling
|
||||
|
||||
extern "C" int cpp_isPressed(int keysym)
|
||||
extern "C" int32_t cpp_isPressed(int32_t keysym)
|
||||
{
|
||||
return mKeyboard->isKeyDown((OIS::KeyCode)keysym);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ extern "C" void cpp_cleanup()
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" int cpp_configure()
|
||||
extern "C" int32_t cpp_configure()
|
||||
{
|
||||
mRoot = new Root();
|
||||
|
||||
|
@ -345,13 +345,13 @@ String LASTNAME;
|
|||
// Load the contents of a mesh
|
||||
extern "C" void cpp_createMesh(
|
||||
char* name, // Name of the mesh
|
||||
int numVerts, // Number of vertices
|
||||
int32_t numVerts, // Number of vertices
|
||||
float* vertices, // Vertex list
|
||||
float* normals, // Normal list
|
||||
float* colors, // Vertex colors
|
||||
float* uvs, // Texture coordinates
|
||||
int numFaces, // Number of faces*3
|
||||
unsigned short* faces, // Faces
|
||||
int32_t numFaces, // Number of faces*3
|
||||
uint16_t* faces, // Faces
|
||||
float radius, // Bounding sphere
|
||||
char* material, // Material
|
||||
// Bounding box
|
||||
|
@ -560,7 +560,7 @@ extern "C" SceneNode* cpp_createNode(
|
|||
char *name,
|
||||
float *trafo,
|
||||
SceneNode *parent,
|
||||
int noRot)
|
||||
int32_t noRot)
|
||||
{
|
||||
//std::cout << "cpp_createNode(" << name << ")";
|
||||
SceneNode *node = parent->createChildSceneNode(name);
|
||||
|
@ -650,7 +650,7 @@ extern "C" void cpp_loadMemImage(
|
|||
char* name, // Name to give the resource
|
||||
char* type, // Image type (eg. "dds")
|
||||
void* data, // Pointer to file data
|
||||
unsigned int size, // Size
|
||||
uint32_t size,// Size
|
||||
Texture* txt)// Texture
|
||||
{
|
||||
|
||||
|
@ -704,7 +704,7 @@ extern "C" void* cpp_setupSkeleton(char* name)
|
|||
}
|
||||
|
||||
// Use this later when loading textures directly from NIF files
|
||||
extern "C" void cpp_createTexture(char* name, uint width, uint height)
|
||||
extern "C" void cpp_createTexture(char* name, uint32_t width, uint32_t height)
|
||||
{
|
||||
TexturePtr texture = TextureManager::getSingleton().createManual(
|
||||
name, // name
|
||||
|
@ -748,7 +748,7 @@ extern "C" void cpp_createTexture(char* name, uint width, uint height)
|
|||
material->getTechnique(0)->getPass(0)->setSceneBlending(SBT_TRANSPARENT_ALPHA);
|
||||
}
|
||||
|
||||
extern "C" void *cpp_insertBone(char* name, void* rootBone, int index)
|
||||
extern "C" void *cpp_insertBone(char* name, void* rootBone, int32_t index)
|
||||
{
|
||||
return (void*) ( ((Bone*)rootBone)->createChild(index) );
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ void crap(char *p, ColourValue v)
|
|||
std::cerr << p << ": " << v.getAsRGBA() << "\n";
|
||||
}
|
||||
|
||||
extern "C" void cpp_debug(int i)
|
||||
extern "C" void cpp_debug(int32_t i)
|
||||
{
|
||||
std::cerr << "Running cpp_debug(" << i << ")\n";
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ using namespace std;
|
|||
|
||||
AudioDevicePtr device;
|
||||
|
||||
extern "C" int cpp_openDevice()
|
||||
extern "C" int32_t cpp_openDevice()
|
||||
{
|
||||
device = OpenDevice("");
|
||||
if (!device) return 1;
|
||||
|
@ -86,7 +86,7 @@ extern "C" void cpp_destroyInstance(OutputStream *sound)
|
|||
sound->unref();
|
||||
}
|
||||
|
||||
extern "C" int cpp_isPlaying(OutputStream *sound)
|
||||
extern "C" int32_t cpp_isPlaying(OutputStream *sound)
|
||||
{
|
||||
if(sound && sound->isPlaying()) return 1;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue