Squash a lot of missing prototype warnings

This commit is contained in:
2014-04-15 03:39:21 -04:00
parent 2d69851746
commit ac3ac31f04
18 changed files with 83 additions and 91 deletions

View File

@@ -10,7 +10,7 @@
#import "cursors.h"
NSAutoreleasePool *pool;
NSImage* ImageFromURL(CFURLRef url){
static NSImage* ImageFromURL(CFURLRef url){
CGImageSourceRef imageSource = CGImageSourceCreateWithURL(url, NULL);
CGImageRef theImage = nil;
@@ -75,14 +75,6 @@ void SetNSCursor(CursorRef cursor){
void SetNSCursorWatch() {
}
void HideNSCursor(){
[NSCursor hide];
}
void ShowNSCursor(){
[NSCursor unhide];
}
void CleanUp(){
// [pool release];
}

View File

@@ -61,7 +61,7 @@ struct header_posix_ustar {
#include <stdexcept>
header_posix_ustar generateTarHeader(const std::string& fileName, unsigned long long fileSize,bool directory=false){
static header_posix_ustar generateTarHeader(const std::string& fileName, unsigned long long fileSize,bool directory=false){
if(fileSize>077777777777LL)
throw std::length_error("Specified file size >= 8 GB");
if(fileName.length()>=100)
@@ -210,7 +210,7 @@ bool load_scenario(fs::path file_to_load){
return true;
}
long get_town_offset(short which_town){
static long get_town_offset(short which_town){
int i,j;
long len_to_jump,store;
@@ -547,7 +547,7 @@ bool load_town_str(short which_town, cTown*& t){
return true;
}
long get_outdoors_offset(location& which_out){
static long get_outdoors_offset(location& which_out){
int i,j,out_sec_num;
long len_to_jump,store;
out_sec_num = scenario.out_width * which_out.y + which_out.x;

View File

@@ -885,14 +885,14 @@ public:
// TODO: Additional functions?
};
void fill_shape(sf::RenderTarget& target, sf::Shape& shape, int x, int y, sf::Color colour) {
static void fill_shape(sf::RenderTarget& target, sf::Shape& shape, int x, int y, sf::Color colour) {
shape.setPosition(x, y);
shape.setFillColor(colour);
target.draw(shape);
}
void frame_shape(sf::RenderTarget& target, sf::Shape& shape, int x, int y, sf::Color colour) {
static void frame_shape(sf::RenderTarget& target, sf::Shape& shape, int x, int y, sf::Color colour) {
shape.setPosition(x, y);
shape.setOutlineColor(colour);
shape.setFillColor(sf::Color::Transparent);

View File

@@ -41,7 +41,7 @@ void port_town(legacy::town_record_type* dummy_town_ptr){
}
void port_dummy_t_d(short size,char *buffer)
static void port_dummy_t_d(short size,char *buffer)
{
short i;
legacy::big_tr_type *d1;
@@ -473,7 +473,7 @@ void flip_long(int32_t *s)
}
// TODO: This was because Windows stored its rect members in a different order, but since we now have our own rect class, it shouldn't be needed.
void alter_rect(legacy::Rect *r)
static void alter_rect(legacy::Rect *r)
{
short a;

View File

@@ -12,7 +12,7 @@
//static const CFStringRef prefsID = CFSTR("com.spidweb.bladesofexile");
NSString* convertKey(std::string keypath) {
static NSString* convertKey(std::string keypath) {
NSString* key = [NSString stringWithCString: keypath.c_str() encoding: NSASCIIStringEncoding];
return key;
}

View File

@@ -64,7 +64,7 @@ public:
T* operator->() {return the_ptr;}
};
void loadColourTable(ptr_guard<char>& picData, sf::Color(& clut)[256], int numColours) {
static void loadColourTable(ptr_guard<char>& picData, sf::Color(& clut)[256], int numColours) {
while(numColours >= 0) {
int i = extract_word(picData);
if(i > 256) oopsError(5);
@@ -80,7 +80,7 @@ void loadColourTable(ptr_guard<char>& picData, sf::Color(& clut)[256], int numCo
}
}
void loadUnpackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixels,sf::Color(& clut)[256],legacy::Rect& bounds,int rowBytes) {
static void loadUnpackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixels,sf::Color(& clut)[256],legacy::Rect& bounds,int rowBytes) {
for(int i = 0; i < bounds.bottom - bounds.top; i++) {
for(int j = 0; j < bounds.right - bounds.left; j++) {
size_t pixel = i * rowBytes + j;
@@ -93,7 +93,7 @@ void loadUnpackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixel
}
}
void loadPackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixels,sf::Color(& clut)[256],legacy::Rect& bounds,int rowBytes) {
static void loadPackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixels,sf::Color(& clut)[256],legacy::Rect& bounds,int rowBytes) {
// Packed data
int countSize = rowBytes > 250 ? 2 : 1;
for(int i = 0; i < bounds.bottom - bounds.top; i++) {
@@ -133,7 +133,7 @@ void loadPackedPixels(ptr_guard<char>& picData,ptr_guard<unsigned char>& pixels,
}
}
legacy::Rect loadPixMapData(ptr_guard<char>& picData, ptr_guard<unsigned char>& pixels, int pixMapType) {
static legacy::Rect loadPixMapData(ptr_guard<char>& picData, ptr_guard<unsigned char>& pixels, int pixMapType) {
int rowBytes = extract_word(picData) & 0x7fff;
picData += 2; // Skip rowBytes; assume we have a v2 (colour) bitmap
legacy::Rect bounds = *(legacy::Rect*)picData;
@@ -166,7 +166,7 @@ legacy::Rect loadPixMapData(ptr_guard<char>& picData, ptr_guard<unsigned char>&
return bounds;
}
rectangle loadFromPictResource(Handle resHandle, unsigned char*& pixelStore) {
static rectangle loadFromPictResource(Handle resHandle, unsigned char*& pixelStore) {
HLock(resHandle);
// TODO: Use picSize to ensure I don't go out of bounds
size_t picSize = GetHandleSize(resHandle);

View File

@@ -72,7 +72,7 @@ short sound_delay[100] = {
};
short store_last_sound_played;
bool sound_going(short which_s) {
static bool sound_going(snd_num_t which_s) {
short i;
for (i = 0; i < 4; i++)
@@ -81,7 +81,7 @@ bool sound_going(short which_s) {
return false;
}
std::string sound_to_fname_map(int snd_num) {
static std::string sound_to_fname_map(snd_num_t snd_num) {
std::ostringstream sout;
sout << "SND" << snd_num;
return sout.str();