51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ACTIVEOBJECT_HEADER
-#define ACTIVEOBJECT_HEADER
+#pragma once
#include "irr_aabb3d.h"
#include <string>
protected:
u16 m_id; // 0 is invalid, "no id"
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef BAN_HEADER
-#define BAN_HEADER
+#pragma once
#include "util/string.h"
#include "threading/thread.h"
StringMap m_ips;
bool m_modified = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CAMERA_HEADER
-#define CAMERA_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "inventory.h"
std::list<Nametag *> m_nametags;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CAVEGEN_HEADER
-#define CAVEGEN_HEADER
+#pragma once
#define VMANIP_FLAG_CAVE VOXELFLAG_CHECKED1
inline s16 getSurfaceFromHeightmap(v3s16 p);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CHAT_HEADER
-#define CHAT_HEADER
+#pragma once
#include <string>
#include <vector>
ChatBuffer m_recent_buffer;
ChatPrompt m_prompt;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CHAT_INTERFACE_H
-#define CHAT_INTERFACE_H
+#pragma once
#include "util/container.h"
#include <string>
MutexedQueue<ChatEvent *> command_queue; // chat backend --> server
MutexedQueue<ChatEvent *> outgoing_queue; // server --> chat backend
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MT_CHATMESSAGE_H
-#define MT_CHATMESSAGE_H
+#pragma once
#include <string>
#include <ctime>
std::wstring sender = L"";
std::time_t timestamp = std::time(0);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENT_HEADER
-#define CLIENT_HEADER
+#pragma once
#include "network/connection.h"
#include "clientenvironment.h"
u64 m_csm_flavour_limits = CSMFlavourLimit::CSM_FL_NONE;
u32 m_csm_noderange_limit = 8;
};
-
-#endif // !CLIENT_HEADER
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __CLIENT_LAUNCHER_H__
-#define __CLIENT_LAUNCHER_H__
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "client/inputhandler.h"
std::string current_address = "does-not-exist";
int current_port = 0;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef INPUT_HANDLER_H
-#define INPUT_HANDLER_H
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "joystick_controller.h"
bool leftreleased = false;
bool rightreleased = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef JOYSTICK_HEADER
-#define JOYSTICK_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "keys.h"
std::bitset<KeyType::INTERNAL_ENUM_COUNT> m_past_pressed_keys;
std::bitset<KeyType::INTERNAL_ENUM_COUNT> m_past_released_keys;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef KEYS_HEADER
-#define KEYS_HEADER
+#pragma once
#include <list>
};
typedef KeyType::T GameKeyType;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TILE_HEADER
-#define TILE_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "irr_v3d.h"
//! The first is base texture, the second is overlay.
TileLayer layers[MAX_TILE_LAYERS];
};
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENT_ENVIRONMENT_HEADER
-#define CLIENT_ENVIRONMENT_HEADER
+#pragma once
#include <ISceneManager.h>
#include "environment.h"
std::list<std::string> m_player_names;
v3s16 m_camera_offset;
};
-
-#endif
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef _CLIENTIFACE_H_
-#define _CLIENTIFACE_H_
+
+#pragma once
#include "irr_v3d.h" // for irrlicht datatypes
static const char *statenames[];
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENTMAP_HEADER
-#define CLIENTMAP_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "map.h"
bool m_cache_bilinear_filter;
bool m_cache_anistropic_filter;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENTMEDIA_HEADER
-#define CLIENTMEDIA_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "filecache.h"
std::string m_name_bound = "";
};
-
-#endif // !CLIENTMEDIA_HEADER
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENTOBJECT_HEADER
-#define CLIENTOBJECT_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "activeobject.h"
return d < other.d;
}
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENTSIMPLEOBJECT_HEADER
-#define CLIENTSIMPLEOBJECT_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
class ClientEnvironment;
virtual void step(float dtime) {}
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLOUDPARAMS_HEADER
-#define CLOUDPARAMS_HEADER
+#pragma once
struct CloudParams
{
float height;
v2f speed;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLOUDS_HEADER
-#define CLOUDS_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include <iostream>
bool m_camera_inside_cloud = false;
};
-
-
-
-#endif
// Filled in by the build system
-#ifndef CMAKE_CONFIG_H
-#define CMAKE_CONFIG_H
+#pragma once
#define PROJECT_NAME "@PROJECT_NAME@"
#define PROJECT_NAME_C "@PROJECT_NAME_CAPITALIZED@"
#cmakedefine01 CURSES_HAVE_NCURSES_CURSES_H
#cmakedefine01 CURSES_HAVE_NCURSESW_NCURSES_H
#cmakedefine01 CURSES_HAVE_NCURSESW_CURSES_H
-
-#endif
-
// Filled in by the build system
// Separated from cmake_config.h to avoid excessive rebuilds on every commit
-#ifndef CMAKE_CONFIG_GITHASH_H
-#define CMAKE_CONFIG_GITHASH_H
+#pragma once
#define VERSION_GITHASH "@VERSION_GITHASH@"
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef COLLISION_HEADER
-#define COLLISION_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include <vector>
const std::vector<aabb3f> &staticboxes,
const aabb3f &movingbox,
f32 y_increase, f32 d);
-
-
-#endif
-
Otherwise use default values
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#define STRINGIFY(x) #x
#define STR(x) STRINGIFY(x)
" USE_FREETYPE=" STR(USE_FREETYPE) \
" USE_LUAJIT=" STR(USE_LUAJIT) \
" STATIC_SHAREDIR=" STR(STATIC_SHAREDIR)
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONSTANTS_HEADER
-#define CONSTANTS_HEADER
+#pragma once
/*
All kinds of constants.
#define TTF_DEFAULT_FONT_SIZE (16)
#endif
#define DEFAULT_FONT_SIZE (10)
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_CAO_HEADER
-#define CONTENT_CAO_HEADER
+#pragma once
#include <map>
#include "irrlichttypes_extrabloated.h"
return m_prop.infotext;
}
};
-
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_CSO_HEADER
-#define CONTENT_CSO_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "clientsimpleobject.h"
ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr,
ClientEnvironment *env, v3f pos, v2f size);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_MAPBLOCK_HEADER
-#define CONTENT_MAPBLOCK_HEADER
+#pragma once
#include "nodedef.h"
#include <IMeshManipulator.h>
MapblockMeshGenerator(MeshMakeData *input, MeshCollector *output);
void generate();
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_MAPNODE_HEADER
-#define CONTENT_MAPNODE_HEADER
+#pragma once
#include "mapnode.h"
// Get legacy node name mapping for loading old blocks
class NameIdMapping;
void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_NODEMETA_HEADER
-#define CONTENT_NODEMETA_HEADER
+#pragma once
#include <iostream>
void content_nodemeta_deserialize_legacy(std::istream &is,
NodeMetadataList *meta, NodeTimerList *timers,
IItemDefManager *item_def_mgr);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONTENT_SAO_HEADER
-#define CONTENT_SAO_HEADER
+#pragma once
#include <util/numeric.h>
#include "serverobject.h"
bool m_physics_override_new_move = true;
bool m_physics_override_sent = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __CONVERT_JSON_H__
-#define __CONVERT_JSON_H__
+#pragma once
#include <json/json.h>
-Json::Value fetchJsonValue(const std::string &url,
- std::vector<std::string> *extra_headers);
-
-#endif
+Json::Value fetchJsonValue(const std::string &url,
+ std::vector<std::string> *extra_headers);
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CRAFTDEF_HEADER
-#define CRAFTDEF_HEADER
+#pragma once
#include <string>
#include <iostream>
};
IWritableCraftDefManager* createCraftDefManager();
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_DUMMY_HEADER
-#define DATABASE_DUMMY_HEADER
+#pragma once
#include <map>
#include <string>
private:
std::map<s64, std::string> m_database;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_FILES_HEADER
-#define DATABASE_FILES_HEADER
+#pragma once
// !!! WARNING !!!
// This backend is intended to be used on Minetest 0.4.16 only for the transition backend
std::string m_savedir;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_LEVELDB_HEADER
-#define DATABASE_LEVELDB_HEADER
+#pragma once
#include "config.h"
};
#endif // USE_LEVELDB
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_POSTGRESQL_HEADER
-#define DATABASE_POSTGRESQL_HEADER
+#pragma once
#include <string>
#include <libpq-fe.h>
private:
bool playerDataExists(const std::string &playername);
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_REDIS_HEADER
-#define DATABASE_REDIS_HEADER
+#pragma once
#include "config.h"
};
#endif // USE_REDIS
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_SQLITE3_HEADER
-#define DATABASE_SQLITE3_HEADER
+#pragma once
#include <cstring>
#include <string>
sqlite3_stmt *m_stmt_player_metadata_remove = nullptr;
sqlite3_stmt *m_stmt_player_metadata_add = nullptr;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DATABASE_HEADER
-#define DATABASE_HEADER
+#pragma once
#include <string>
#include <vector>
virtual bool removePlayer(const std::string &name) = 0;
virtual void listPlayers(std::vector<std::string> &res) = 0;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DAYNIGHTRATIO_HEADER
-#define DAYNIGHTRATIO_HEADER
+#pragma once
inline u32 time_to_daynight_ratio(float time_of_day, bool smooth)
{
return 1000;
}
}
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DEBUG_HEADER
-#define DEBUG_HEADER
+#pragma once
#include <iostream>
#include <exception>
#define BEGIN_DEBUG_EXCEPTION_HANDLER
#define END_DEBUG_EXCEPTION_HANDLER
#endif
-
-#endif // DEBUG_HEADER
-
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DEFAULTSETTINGS_HEADER
-#define DEFAULTSETTINGS_HEADER
+#pragma once
class Settings;
* @param from source settings pointer
*/
void override_default_settings(Settings *settings, Settings *from);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DUNGEONGEN_HEADER
-#define DUNGEONGEN_HEADER
+#pragma once
#include "voxel.h"
#include "noise.h"
extern NoiseParams nparams_dungeon_density;
extern NoiseParams nparams_dungeon_alt_wall;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef EMERGE_HEADER
-#define EMERGE_HEADER
+#pragma once
#include <map>
#include <mutex>
friend class EmergeThread;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ENVIRONMENT_HEADER
-#define ENVIRONMENT_HEADER
+#pragma once
/*
This class is the game's environment.
private:
std::mutex m_time_lock;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef EVENT_HEADER
-#define EVENT_HEADER
+#pragma once
class MtEvent
{
virtual void reg(MtEventReceiver *r, const char *type) = 0;
virtual void dereg(MtEventReceiver *r, const char *type) = 0;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef EVENT_MANAGER_HEADER
-#define EVENT_MANAGER_HEADER
+#pragma once
#include "event.h"
#include <list>
dereg(type, EventManager::receiverReceive, r);
}
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef EXCEPTIONS_HEADER
-#define EXCEPTIONS_HEADER
+#pragma once
#include <exception>
#include <string>
BaseException(s)
{}
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef FACE_POSITION_CACHE_HEADER
-#define FACE_POSITION_CACHE_HEADER
+#pragma once
#include "irr_v3d.h"
static std::unordered_map<u16, std::vector<v3s16>> cache;
static std::mutex cache_mutex;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef FILECACHE_HEADER
-#define FILECACHE_HEADER
+#pragma once
#include <iostream>
#include <string>
bool loadByPath(const std::string &path, std::ostream &os);
bool updateByPath(const std::string &path, const std::string &data);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef FILESYS_HEADER
-#define FILESYS_HEADER
+#pragma once
#include <string>
#include <vector>
bool Rename(const std::string &from, const std::string &to);
} // namespace fs
-
-#endif
-
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __FONTENGINE_H__
-#define __FONTENGINE_H__
+
+#pragma once
#include <map>
#include <vector>
/** interface to access main font engine*/
extern FontEngine* g_fontengine;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GAME_HEADER
-#define GAME_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <string>
bool *reconnect_requested,
const SubgameSpec &gamespec, // Used for local game
bool simple_singleplayer_mode);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GAMEDEF_HEADER
-#define GAMEDEF_HEADER
+#pragma once
#include <string>
#include <vector>
virtual bool registerModStorage(ModMetadata *storage) = 0;
virtual void unregisterModStorage(const std::string &name) = 0;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GAME_PARAMS_H
-#define GAME_PARAMS_H
+#pragma once
#include "irrlichttypes.h"
SubgameSpec game_spec;
bool is_dedicated_server;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GENERICOBJECT_HEADER
-#define GENERICOBJECT_HEADER
+#pragma once
#include <string>
#include "irrlichttypes_bloated.h"
std::string gob_cmd_update_infant(u16 id, u8 type,
const std::string &client_initialization_data);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GETTEXT_HEADER
-#define GETTEXT_HEADER
+#pragma once
#include "config.h" // for USE_GETTEXT
#include <string>
{
return gettext(text.c_str());
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GETTIME_HEADER
-#define GETTIME_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <time.h>
strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm);
return cs;
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GUICHATCONSOLE_HEADER
-#define GUICHATCONSOLE_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "modalMenu.h"
gui::IGUIFont *m_font = nullptr;
v2u32 m_fontsize;
};
-
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GUI_ENGINE_H_
-#define GUI_ENGINE_H_
+#pragma once
/******************************************************************************/
/* Includes */
};
-
-#endif /* GUI_ENGINE_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
-#ifndef GUIINVENTORYMENU_HEADER
-#define GUIINVENTORYMENU_HEADER
+#pragma once
#include <utility>
#include <stack>
std::string m_formspec;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GUIKEYCHANGEMENU_HEADER
-#define GUIKEYCHANGEMENU_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "modalMenu.h"
gui::IGUIStaticText *key_used_text = nullptr;
std::vector<key_setting *> key_settings;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GUIMAINMENU_HEADER
-#define GUIMAINMENU_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "modalMenu.h"
MainMenuData() {}
};
-
-#endif
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef GUIPASSWORDCHANGE_HEADER
-#define GUIPASSWORDCHANGE_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "modalMenu.h"
std::wstring m_newpass = L"";
std::wstring m_newpass_confirm = L"";
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef GUIFILESELECTMENU_H_
-#define GUIFILESELECTMENU_H_
+#pragma once
#include <string>
std::string m_formname;
bool m_file_select_dialog;
};
-
-#endif /* GUIFILESELECTMENU_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
-#ifndef GUITABLE_HEADER
-#define GUITABLE_HEADER
+#pragma once
#include <map>
#include <set>
static void alignContent(Cell *cell, s32 xmax, s32 content_width,
s32 align);
};
-
-#endif
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef GUIVOLUMECHANGE_HEADER
-#define GUIVOLUMECHANGE_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "modalMenu.h"
bool pausesGame() { return true; }
};
-
-#endif
-
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef _GUI_SCALING_FILTER_H_
-#define _GUI_SCALING_FILTER_H_
+
+#pragma once
#include "irrlichttypes_extrabloated.h"
const core::rect<s32> &destrect, const core::rect<s32> &srcrect,
const core::rect<s32> *cliprect = 0, const video::SColor *const colors = 0,
bool usealpha = false);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef HTTPFETCH_HEADER
-#define HTTPFETCH_HEADER
+#pragma once
#include <vector>
#include "util/string.h"
// Performs a synchronous HTTP request. This blocks and therefore should
// only be used from background threads.
void httpfetch_sync(const HTTPFetchRequest &fetch_request, HTTPFetchResult &fetch_result);
-
-#endif // !HTTPFETCH_HEADER
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef HUD_HEADER
-#define HUD_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include <string>
ItemRotationKind rotation_kind);
#endif
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef _IMAGE_FILTERS_H_
-#define _IMAGE_FILTERS_H_
+#pragma once
#include "irrlichttypes_extrabloated.h"
* and downscaling.
*/
void imageScaleNNAA(video::IImage *src, const core::rect<s32> &srcrect, video::IImage *dest);
-
-#endif
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
-#ifndef __C_INTL_GUI_EDIT_BOX_H_INCLUDED__
-#define __C_INTL_GUI_EDIT_BOX_H_INCLUDED__
+#pragma once
#include "IrrCompileConfig.h"
//#ifdef _IRR_COMPILE_WITH_GUI_
} // end namespace irr
//#endif // _IRR_COMPILE_WITH_GUI_
-#endif // __C_GUI_EDIT_BOX_H_INCLUDED__
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef INVENTORY_HEADER
-#define INVENTORY_HEADER
+#pragma once
#include "debug.h"
#include "itemdef.h"
IItemDefManager *m_itemdef;
bool m_dirty = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef INVENTORYMANAGER_HEADER
-#define INVENTORYMANAGER_HEADER
+#pragma once
#include "inventory.h"
#include <iostream>
bool getCraftingResult(Inventory *inv, ItemStack &result,
std::vector<ItemStack> &output_replacements,
bool decrementInput, IGameDef *gamedef);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRR_AABB3D_HEADER
-#define IRR_AABB3D_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <aabbox3d.h>
typedef core::aabbox3d<f32> aabb3f;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRR_V2D_HEADER
-#define IRR_V2D_HEADER
+#pragma once
#include "irrlichttypes.h"
typedef core::vector2d<s32> v2s32;
typedef core::vector2d<u32> v2u32;
typedef core::vector2d<f32> v2f32;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRR_V3D_HEADER
-#define IRR_V3D_HEADER
+#pragma once
#include "irrlichttypes.h"
typedef core::vector3d<s16> v3s16;
typedef core::vector3d<u16> v3u16;
typedef core::vector3d<s32> v3s32;
-
-#endif
john@suckerfreegames.com
*/
-#ifndef __C_GUI_TTFONT_H_INCLUDED__
-#define __C_GUI_TTFONT_H_INCLUDED__
+#pragma once
#include <irrlicht.h>
#include <ft2build.h>
} // end namespace gui
} // end namespace irr
-
-#endif // __C_GUI_TTFONT_H_INCLUDED__
john@suckerfreegames.com
*/
-#ifndef __IRR_USTRING_H_INCLUDED__
-#define __IRR_USTRING_H_INCLUDED__
+#pragma once
#if (__cplusplus > 199711L) || (_MSC_VER >= 1600) || defined(__GXX_EXPERIMENTAL_CXX0X__)
# define USTRING_CPP0X
} // end namespace core
} // end namespace irr
-
-#endif
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
-#ifndef __C_GUI_STATIC_TEXT_H_INCLUDED__
-#define __C_GUI_STATIC_TEXT_H_INCLUDED__
+#pragma once
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_GUI_
}
#endif // _IRR_COMPILE_WITH_GUI_
-
-#endif // C_GUI_STATIC_TEXT_H_INCLUDED
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRRLICHTTYPES_HEADER
-#define IRRLICHTTYPES_HEADER
+#pragma once
/* Ensure that <stdint.h> is included before <irrTypes.h>, unless building on
* MSVC, to address an irrlicht issue: https://sourceforge.net/p/irrlicht/bugs/433/
#define U16_MAX 0xFFFF
#define U32_MAX 0xFFFFFFFF
#define U64_MAX 0xFFFFFFFFFFFFFFFF
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRRLICHTTYPES_BLOATED_HEADER
-#define IRRLICHTTYPES_BLOATED_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "irr_aabb3d.h"
#include <SColor.h>
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef IRRLICHTTYPES_EXTRABLOATED_HEADER
-#define IRRLICHTTYPES_EXTRABLOATED_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include <IGUIElement.h>
#include <IGUIEnvironment.h>
#endif
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ITEMDEF_HEADER
-#define ITEMDEF_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include <string>
};
IWritableItemDefManager* createItemDefManager();
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ITEMGROUP_HEADER
-#define ITEMGROUP_HEADER
+#pragma once
#include <string>
#include <unordered_map>
return 0;
return i->second;
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ITEMSTACKMETADATA_HEADER
-#define ITEMSTACKMETADATA_HEADER
+#pragma once
#include "metadata.h"
void serialize(std::ostream &os) const;
void deSerialize(std::istream &is);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef KEYCODE_HEADER
-#define KEYCODE_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "Keycodes.h"
void clearKeyCache();
irr::EKEY_CODE keyname_to_keycode(const char *name);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef LIGHT_HEADER
-#define LIGHT_HEADER
+#pragma once
#include "irrlichttypes.h"
l = LIGHT_SUN;
return l;
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef LOCALPLAYER_HEADER
-#define LOCALPLAYER_HEADER
+#pragma once
#include "player.h"
#include "environment.h"
GenericCAO *m_cao = nullptr;
Client *m_client;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef LOG_HEADER
-#define LOG_HEADER
+#pragma once
#include <map>
#include <queue>
#define dout_client (*dout_client_ptr)
#define derr_client (*derr_client_ptr)
#endif
-
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAINMENUMANAGER_HEADER
-#define MAINMENUMANAGER_HEADER
+#pragma once
/*
All kinds of stuff that needs to be exposed from main.cpp
};
extern MainGameCallback *g_gamecallback;
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAP_HEADER
-#define MAP_HEADER
+#pragma once
#include <iostream>
#include <sstream>
*/
std::map<v3s16, u8> m_loaded_blocks;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAP_SETTINGS_MANAGER_HEADER
-#define MAP_SETTINGS_MANAGER_HEADER
+#pragma once
#include <string>
Settings *m_map_settings;
Settings *m_user_settings;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPBLOCK_HEADER
-#define MAPBLOCK_HEADER
+#pragma once
#include <set>
#include "debug.h"
Get a quick string to describe what a block actually contains
*/
std::string analyze_block(MapBlock *block);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPBLOCK_MESH_HEADER
-#define MAPBLOCK_MESH_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "client/tile.h"
// TileFrame vector copy cost very much to client
void getNodeTileN(MapNode mn, v3s16 p, u8 tileindex, MeshMakeData *data, TileSpec &tile);
void getNodeTile(MapNode mn, v3s16 p, v3s16 dir, MeshMakeData *data, TileSpec &tile);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_HEADER
-#define MAPGEN_HEADER
+#pragma once
#include "noise.h"
#include "nodedef.h"
float cavern_threshold;
int lava_depth;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_CARPATHIAN_HEADER
-#define MAPGEN_CARPATHIAN_HEADER
+#pragma once
#include "mapgen.h"
float terrainLevelAtPoint(s16 x, s16 z);
int generateTerrain();
};
-
-#endif
\ No newline at end of file
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_FLAT_HEADER
-#define MAPGEN_FLAT_HEADER
+#pragma once
#include "mapgen.h"
float hill_steepness;
Noise *noise_terrain;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_FRACTAL_HEADER
-#define MAPGEN_FRACTAL_HEADER
+#pragma once
#include "mapgen.h"
float julia_w;
Noise *noise_seabed;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_SINGLENODE_HEADER
-#define MAPGEN_SINGLENODE_HEADER
+#pragma once
#include "mapgen.h"
void makeChunk(BlockMakeData *data);
int getSpawnLevelAtPoint(v2s16 p);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_V5_HEADER
-#define MAPGEN_V5_HEADER
+#pragma once
#include "mapgen.h"
Noise *noise_height;
Noise *noise_ground;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGENV6_HEADER
-#define MAPGENV6_HEADER
+#pragma once
#include "mapgen.h"
#include "noise.h"
void placeTreesAndJungleGrass();
virtual void generateCaves(int max_stone_y);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_V7_HEADER
-#define MAPGEN_V7_HEADER
+#pragma once
#include "mapgen.h"
Noise *noise_mountain;
Noise *noise_ridge;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPGEN_VALLEYS_HEADER
-#define MAPGEN_VALLEYS_HEADER
+#pragma once
#include "mapgen.h"
virtual void generateCaves(s16 max_stone_y, s16 large_cave_depth);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPNODE_HEADER
-#define MAPNODE_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include "light.h"
// Deprecated serialization methods
void deSerialize_pre22(u8 *source, u8 version);
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAPSECTOR_HEADER
-#define MAPSECTOR_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "irr_v2d.h"
private:
};
#endif
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MESH_HEADER
-#define MESH_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "nodedef.h"
*/
void rotateMeshXYby (scene::IMesh *mesh, f64 degrees);
void rotateMeshXZby (scene::IMesh *mesh, f64 degrees);
-void rotateMeshYZby (scene::IMesh *mesh, f64 degrees);
+void rotateMeshYZby (scene::IMesh *mesh, f64 degrees);
/*
* Clone the mesh buffer.
* The returned pointer should be dropped.
*/
scene::IMeshBuffer* cloneMeshBuffer(scene::IMeshBuffer *mesh_buffer);
-
+
/*
Clone the mesh.
*/
Ported from irrlicht 1.8
*/
scene::IMesh* createForsythOptimizedMesh(const scene::IMesh *mesh);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MESH_GENERATOR_THREAD_HEADER
-#define MESH_GENERATOR_THREAD_HEADER
+#pragma once
#include <ctime>
#include <mutex>
protected:
virtual void doUpdate();
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef METADATA_HEADER
-#define METADATA_HEADER
+#pragma once
#include "irr_v3d.h"
#include <iostream>
StringMap m_stringvars;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MG_BIOME_HEADER
-#define MG_BIOME_HEADER
+#pragma once
#include "objdef.h"
#include "nodedef.h"
Server *m_server;
};
-
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MG_DECORATION_HEADER
-#define MG_DECORATION_HEADER
+#pragma once
#include <unordered_set>
#include "objdef.h"
size_t placeAllDecos(Mapgen *mg, u32 blockseed,
v3s16 nmin, v3s16 nmax, s16 deco_zero_level = 0);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MG_ORE_HEADER
-#define MG_ORE_HEADER
+#pragma once
#include <unordered_set>
#include "objdef.h"
size_t placeAllOres(Mapgen *mg, u32 blockseed,
v3s16 nmin, v3s16 nmax, s16 ore_zero_level = 0);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MG_SCHEMATIC_HEADER
-#define MG_SCHEMATIC_HEADER
+#pragma once
#include <map>
#include "mg_decoration.h"
void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount,
std::vector<std::string> *usednodes, INodeDefManager *ndef);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MINIMAP_HEADER
-#define MINIMAP_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#include "util/thread.h"
std::mutex m_mutex;
std::list<v2f> m_active_markers;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MODALMENU_HEADER
-#define MODALMENU_HEADER
+#pragma once
#include "irrlichttypes_extrabloated.h"
#ifdef HAVE_TOUCHSCREENGUI
// wants to launch other menus
bool m_allow_focus_removal = false;
};
-
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MODIFIEDSTATE_HEADER
-#define MODIFIEDSTATE_HEADER
+#pragma once
enum ModifiedState
{
MOD_STATE_WRITE_NEEDED = 4,
MOD_RESERVED5 = 5,
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MODS_HEADER
-#define MODS_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <list>
std::string m_mod_name;
bool m_modified = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef NAMEIDMAPPING_HEADER
-#define NAMEIDMAPPING_HEADER
+#pragma once
#include <string>
#include <iostream>
IdToNameMap m_id_to_name;
NameToIdMap m_name_to_id;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENTOPCODES_HEADER
-#define CLIENTOPCODES_HEADER
+#pragma once
#include "client.h"
#include "networkprotocol.h"
extern const ToClientCommandHandler toClientCommandTable[TOCLIENT_NUM_MSG_TYPES];
extern const ServerCommandFactory serverCommandFactoryTable[TOSERVER_NUM_MSG_TYPES];
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CONNECTION_HEADER
-#define CONNECTION_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include "socket.h"
};
} // namespace
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef NETWORKPACKET_HEADER
-#define NETWORKPACKET_HEADER
+#pragma once
#include <SColor.h>
#include "util/pointer.h"
u16 m_command = 0;
u16 m_peer_id = 0;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERVEROPCODES_HEADER
-#define SERVEROPCODES_HEADER
+#pragma once
#include "server.h"
#include "networkprotocol.h"
extern const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES];
extern const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES];
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef NODEDEF_HEADER
-#define NODEDEF_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include <string>
INodeDefManager *m_ndef = nullptr;
bool m_resolve_done = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef NODEMETADATA_HEADER
-#define NODEMETADATA_HEADER
+#pragma once
#include <unordered_set>
#include "metadata.h"
std::map<v3s16, NodeMetadata *> m_data;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef NODETIMER_HEADER
-#define NODETIMER_HEADER
+#pragma once
#include "irr_v3d.h"
#include <iostream>
double m_next_trigger_time = -1.0;
double m_time = 0.0;
};
-
-#endif
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NOISE_HEADER
-#define NOISE_HEADER
+#pragma once
#include "irr_v3d.h"
#include "exceptions.h"
}
float contour(float v);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef OBJDEF_HEADER
-#define OBJDEF_HEADER
+#pragma once
#include "util/basic_macros.h"
#include "porting.h"
std::vector<ObjDef *> m_objects;
ObjDefType m_objtype;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef OBJECT_PROPERTIES_HEADER
-#define OBJECT_PROPERTIES_HEADER
+#pragma once
#include <string>
#include "irrlichttypes_bloated.h"
void serialize(std::ostream &os) const;
void deSerialize(std::istream &is);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef PARTICLES_HEADER
-#define PARTICLES_HEADER
+#pragma once
#include <iostream>
#include "irrlichttypes_extrabloated.h"
std::mutex m_particle_list_lock;
std::mutex m_spawner_list_lock;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef PATHFINDER_H_
-#define PATHFINDER_H_
+#pragma once
/******************************************************************************/
/* Includes */
unsigned int max_jump,
unsigned int max_drop,
PathAlgorithm algo);
-
-#endif /* PATHFINDER_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef PLAYER_HEADER
-#define PLAYER_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include "inventory.h"
// and ServerThread
std::mutex m_mutex;
};
-
-#endif
-
Random portability stuff
*/
-#ifndef PORTING_HEADER
-#define PORTING_HEADER
+#pragma once
#ifdef _WIN32
#ifdef _WIN32_WINNT
#ifdef __ANDROID__
#include "porting_android.h"
#endif
-
-#endif // PORTING_HEADER
-
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __PORTING_ANDROID_H__
-#define __PORTING_ANDROID_H__
+
+#pragma once
#ifndef __ANDROID__
#error this include has to be included on android port only!
std::string getInputDialogValue();
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef PROFILER_HEADER
-#define PROFILER_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <string>
TimeTaker *m_timer = nullptr;
enum ScopeProfilerType m_type;
};
-
-#endif
-
Eg. if you have this constant somewhere that you just can't get right
by changing it and recompiling all over again:
v3f wield_position = v3f(55, -35, 65);
-
+
Make it look like this:
v3f wield_position = v3f(55, -35, 65);
QUICKTUNE_AUTONAME(QVT_FLOAT, wield_position.X, 0, 100);
keymap_quicktune_next
keymap_quicktune_dec
keymap_quicktune_inc
-
+
Once you have modified the values at runtime and then quit, the game
will print out all the modified values at the end:
Modified quicktune values:
wield_position.X = 60
wield_position.Y = -30
wield_position.Z = 65
-
+
The QUICKTUNE macros shouldn't generally be left in committed code.
*/
-#ifndef QUICKTUNE_HEADER
-#define QUICKTUNE_HEADER
+#pragma once
#include <string>
#include <map>
#define QUICKTUNE_AUTONAME(type_, var, min_, max_)\
QUICKTUNE(type_, var, min_, max_, #var)
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef QVT_SHORTCUTTER_HEADER
-#define QVT_SHORTCUTTER_HEADER
+#pragma once
#include "quicktune.h"
setQuicktuneValue(getSelectedName(), val);
}
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SRC_RAYCAST_H_
-#define SRC_RAYCAST_H_
+#pragma once
#include "voxelalgorithms.h"
#include "util/pointedthing.h"
*/
bool boxLineCollision(const aabb3f &box, const v3f &start, const v3f &dir,
v3f *collision_point, v3s16 *collision_normal);
-
-
-#endif /* SRC_RAYCAST_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef REFLOWSCAN_H
-#define REFLOWSCAN_H
+#pragma once
#include "util/container.h"
#include "irrlichttypes_bloated.h"
MapBlock *m_lookup[3 * 3 * 3];
u32 m_lookup_state_bitset;
};
-
-#endif // REFLOWSCAN_H
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef REMOTEPLAYER_HEADER
-#define REMOTEPLAYER_HEADER
+#pragma once
#include "player.h"
#include "cloudparams.h"
CloudParams m_cloud_params;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ROLLBACK_HEADER
-#define ROLLBACK_HEADER
+#pragma once
#include <string>
#include "irr_v3d.h"
std::vector<Entity> knownActors;
std::vector<Entity> knownNodes;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ROLLBACK_INTERFACE_HEADER
-#define ROLLBACK_INTERFACE_HEADER
+#pragma once
#include "irr_v3d.h"
#include <string>
std::string old_actor;
bool old_actor_guess;
};
-
-#endif
/******************************************************************************/
/******************************************************************************/
-#ifndef C_CONTENT_H_
-#define C_CONTENT_H_
+#pragma once
extern "C" {
#include <lua.h>
void push_objectRef (lua_State *L, const u16 id);
extern struct EnumString es_TileAnimationType[];
-
-#endif /* C_CONTENT_H_ */
/* not being a script/modapi file!!!!!!!! */
/******************************************************************************/
/******************************************************************************/
-#ifndef C_CONVERTER_H_
-#define C_CONVERTER_H_
+#pragma once
#include <vector>
#include <unordered_map>
v3u16 data_size, v3u16 slice_offset, v3u16 slice_size);
size_t write_array_slice_u16(lua_State *L, int table_index, u16 *data,
v3u16 data_size, v3u16 slice_offset, v3u16 slice_size);
-
-#endif /* C_CONVERTER_H_ */
/******************************************************************************/
/******************************************************************************/
-#ifndef C_INTERNAL_H_
-#define C_INTERNAL_H_
+#pragma once
extern "C" {
#include <lua.h>
void script_run_callbacks_f(lua_State *L, int nargs,
RunCallbacksMode mode, const char *fxn);
void log_deprecated(lua_State *L, const std::string &message);
-
-#endif /* C_INTERNAL_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef C_TYPES_H_
-#define C_TYPES_H_
+#pragma once
extern "C" {
#include "lua.h"
extern EnumString es_ItemType[];
-
-#endif /* C_TYPES_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CPP_API_ASYNC_EVENTS_HEADER
-#define CPP_API_ASYNC_EVENTS_HEADER
+#pragma once
#include <vector>
#include <deque>
// Counter semaphore for job dispatching
Semaphore jobQueueCounter;
};
-
-#endif // CPP_API_ASYNC_EVENTS_HEADER
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_BASE_H_
-#define S_BASE_H_
+#pragma once
#include <iostream>
#include <string>
GUIEngine *m_guiengine = nullptr;
ScriptingType m_type;
};
-
-#endif /* S_BASE_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_CLIENT_H_
-#define S_CLIENT_H_
+#pragma once
#include "util/pointedthing.h"
#include "cpp_api/s_base.h"
void setEnv(ClientEnvironment *env);
};
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_ENTITY_H_
-#define S_ENTITY_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "irr_v3d.h"
void luaentity_Rightclick(u16 id,
ServerActiveObject *clicker);
};
-
-
-
-#endif /* S_ENTITY_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_ENV_H_
-#define S_ENV_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "irr_v3d.h"
void initializeEnvironment(ServerEnvironment *env);
};
-
-#endif /* S_ENV_H_ */
/******************************************************************************/
/******************************************************************************/
-#ifndef S_INTERNAL_H_
-#define S_INTERNAL_H_
+#pragma once
#include <thread>
#include "common/c_internal.h"
lua_State *L = getStack(); \
assert(lua_checkstack(L, 20)); \
StackUnroller stack_unroller(L);
-
-#endif /* S_INTERNAL_H_ */
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_INVENTORY_H_
-#define S_INVENTORY_H_
+#pragma once
#include "cpp_api/s_base.h"
bool getDetachedInventoryCallback(
const std::string &name, const char *callbackname);
};
-
-
-
-#endif /* S_INVENTORY_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_ITEM_H_
-#define S_ITEM_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "irr_v3d.h"
void pushPointedThing(const PointedThing& pointed);
};
-
-
-#endif /* S_ITEM_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_MAINMENU_H_
-#define S_MAINMENU_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "util/string.h"
*/
void handleMainMenuButtons(const StringMap &fields);
};
-
-#endif /* S_MAINMENU_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_NODE_H_
-#define S_NODE_H_
+#pragma once
#include "irr_v3d.h"
#include "cpp_api/s_base.h"
static struct EnumString es_LiquidType[];
static struct EnumString es_NodeBoxType[];
};
-
-
-
-#endif /* S_NODE_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_NODEMETA_H_
-#define S_NODEMETA_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "cpp_api/s_item.h"
private:
};
-
-#endif /* S_NODEMETA_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_PLAYER_H_
-#define S_PLAYER_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "irr_v3d.h"
void on_playerReceiveFields(ServerActiveObject *player,
const std::string &formname, const StringMap &fields);
};
-
-#endif /* S_PLAYER_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_SECURITY_H
-#define S_SECURITY_H
+#pragma once
#include "cpp_api/s_base.h"
static int sl_os_rename(lua_State *L);
static int sl_os_remove(lua_State *L);
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef S_SERVER_H_
-#define S_SERVER_H_
+#pragma once
#include "cpp_api/s_base.h"
#include <set>
void getAuthHandler();
void readPrivileges(int index, std::set<std::string> &result);
};
-
-
-
-#endif /* S_SERVER_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_AREA_STORE_H_
-#define L_AREA_STORE_H_
+#pragma once
#include "lua_api/l_base.h"
static void Register(lua_State *L);
};
-
-#endif // L_AREA_STORE_H_
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_BASE_H_
-#define L_BASE_H_
+#pragma once
#include "common/c_types.h"
#include "common/c_internal.h"
lua_CFunction func,
int top);
};
-
-#endif /* L_BASE_H_ */
-#ifndef L_CAMERA_H
-#define L_CAMERA_H
+/*
+Minetest
+Copyright (C) 2013-2017 celeron55, Perttu Ahola <celeron55@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#pragma once
#include "l_base.h"
static void Register(lua_State *L);
};
-
-#endif // L_CAMERA_H
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_CLIENT_H_
-#define L_CLIENT_H_
+#pragma once
#include "lua_api/l_base.h"
#include "itemdef.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_CRAFT_H_
-#define L_CRAFT_H_
+#pragma once
#include <string>
#include <vector>
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_CRAFT_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_ENV_H_
-#define L_ENV_H_
+#pragma once
#include "lua_api/l_base.h"
#include "serverenvironment.h"
unsigned int refcount;
std::string origin;
};
-
-#endif /* L_ENV_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_HTTP_H_
-#define L_HTTP_H_
+#pragma once
#include "lua_api/l_base.h"
#include "config.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_HTTP_H_ */
/******************************************************************************/
/******************************************************************************/
-#ifndef L_INTERNAL_H_
-#define L_INTERNAL_H_
+#pragma once
#include "common/c_internal.h"
#define GET_ENV_PTR \
MAP_LOCK_REQUIRED; \
GET_ENV_PTR_NO_MAP_LOCK
-
-#endif /* L_INTERNAL_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_INVENTORY_H_
-#define L_INVENTORY_H_
+#pragma once
#include "lua_api/l_base.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_INVENTORY_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_ITEM_H_
-#define L_ITEM_H_
+#pragma once
#include "lua_api/l_base.h"
#include "inventory.h" // ItemStack
public:
static void Initialize(lua_State *L, int top);
};
-
-
-
-#endif /* L_ITEM_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_ITEMSTACKMETA_H_
-#define L_ITEMSTACKMETA_H_
+#pragma once
#include "lua_api/l_base.h"
#include "lua_api/l_metadata.h"
static void Register(lua_State *L);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MINETEST_L_LOCALPLAYER_H
-#define MINETEST_L_LOCALPLAYER_H
+#pragma once
#include "l_base.h"
static void Register(lua_State *L);
};
-
-#endif // MINETEST_L_LOCALPLAYER_H
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_MAINMENU_H_
-#define L_MAINMENU_H_
+#pragma once
#include "lua_api/l_base.h"
static void InitializeAsync(lua_State *L, int top);
};
-
-#endif /* L_MAINMENU_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_MAPGEN_H_
-#define L_MAPGEN_H_
+#pragma once
#include "lua_api/l_base.h"
static struct EnumString es_SchematicFormatType[];
static struct EnumString es_NodeResolveMethod[];
};
-
-#endif /* L_MAPGEN_H_ */
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_METADATA_H_
-#define L_METADATA_H_
+
+#pragma once
#include "irrlichttypes_bloated.h"
#include "lua_api/l_base.h"
// equals(self, other)
static int l_equals(lua_State *L);
};
-
-#endif /* L_NODEMETA_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_MINIMAP_H_
-#define L_MINIMAP_H_
+#pragma once
#include "l_base.h"
static void Register(lua_State *L);
};
-
-#endif // L_MINIMAP_H_
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_NODEMETA_H_
-#define L_NODEMETA_H_
+
+#pragma once
#include "lua_api/l_base.h"
#include "lua_api/l_metadata.h"
static void Register(lua_State *L);
static void RegisterClient(lua_State *L);
};
-
-#endif /* L_NODEMETA_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_NODETIMER_H_
-#define L_NODETIMER_H_
+#pragma once
#include "irr_v3d.h"
#include "lua_api/l_base.h"
static void Register(lua_State *L);
};
-
-#endif /* L_NODETIMER_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_NOISE_H_
-#define L_NOISE_H_
+#pragma once
#include "irr_v3d.h"
#include "lua_api/l_base.h"
static void Register(lua_State *L);
};
-
-#endif /* L_NOISE_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_OBJECT_H_
-#define L_OBJECT_H_
+#pragma once
#include "lua_api/l_base.h"
#include "irrlichttypes.h"
static int l_get_nametag_attributes(lua_State *L);
};
-
-#endif /* L_OBJECT_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_PARTICLES_H_
-#define L_PARTICLES_H_
+#pragma once
#include "lua_api/l_base.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-
-
-#endif /* L_PARTICLES_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_ROLLBACK_H_
-#define L_ROLLBACK_H_
+#pragma once
#include "lua_api/l_base.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_ROLLBACK_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_SERVER_H_
-#define L_SERVER_H_
+#pragma once
#include "lua_api/l_base.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif /* L_SERVER_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_SETTINGS_H_
-#define L_SETTINGS_H_
+#pragma once
#include "lua_api/l_base.h"
static void Register(lua_State *L);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_SOUND_H_
-#define L_SOUND_H_
+#pragma once
#include "lua_api/l_base.h"
public:
static void Initialize(lua_State *L, int top);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __L_STORAGE_H__
-#define __L_STORAGE_H__
+#pragma once
#include "l_metadata.h"
#include "lua_api/l_base.h"
static StorageRef *checkobject(lua_State *L, int narg);
static ModMetadata *getobject(StorageRef *ref);
};
-
-#endif /* __L_STORAGE_H__ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_UTIL_H_
-#define L_UTIL_H_
+#pragma once
#include "lua_api/l_base.h"
static void InitializeAsync(AsyncEngine &engine);
};
-
-#endif /* L_UTIL_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef L_VMANIP_H_
-#define L_VMANIP_H_
+#pragma once
#include <map>
#include "irr_v3d.h"
static void Register(lua_State *L);
};
-
-#endif /* L_VMANIP_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef CLIENT_SCRIPTING_H_
-#define CLIENT_SCRIPTING_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "cpp_api/s_client.h"
private:
virtual void InitializeModApi(lua_State *L, int top);
};
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SCRIPTING_MAINMENU_H_
-#define SCRIPTING_MAINMENU_H_
+#pragma once
#include "cpp_api/s_base.h"
#include "cpp_api/s_mainmenu.h"
AsyncEngine asyncEngine;
};
-
-
-#endif /* SCRIPTING_MAINMENU_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERVER_SCRIPTING_H_
-#define SERVER_SCRIPTING_H_
-
+#pragma once
#include "cpp_api/s_base.h"
#include "cpp_api/s_entity.h"
#include "cpp_api/s_env.h"
};
void log_deprecated(const std::string &message);
-
-#endif /* SCRIPTING_GAME_H_ */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERIALIZATION_HEADER
-#define SERIALIZATION_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "exceptions.h"
void compress(const SharedBuffer<u8> &data, std::ostream &os, u8 version);
//void compress(const std::string &data, std::ostream &os, u8 version);
void decompress(std::istream &is, std::ostream &os, u8 version);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERVER_HEADER
-#define SERVER_HEADER
+#pragma once
#include "network/connection.h"
#include "irr_v3d.h"
Shuts down when kill is set to true.
*/
void dedicated_server_loop(Server &server, bool &kill);
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERVER_ENVIRONMENT_HEADER
-#define SERVER_ENVIRONMENT_HEADER
+#pragma once
#include "environment.h"
#include "mapnode.h"
std::unordered_map<u32, float> m_particle_spawners;
std::unordered_map<u32, u16> m_particle_spawner_attachments;
};
-
-#endif
#include "mods.h"
#include <json/json.h>
-#ifndef SERVERLIST_HEADER
-#define SERVERLIST_HEADER
+#pragma once
typedef Json::Value ServerListSpec;
#endif
} // namespace ServerList
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERVEROBJECT_HEADER
-#define SERVEROBJECT_HEADER
+#pragma once
#include <unordered_set>
#include "irrlichttypes_bloated.h"
// Used for creating objects based on type
static std::map<u16, Factory> m_types;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SETTINGS_HEADER
-#define SETTINGS_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include "util/string.h"
mutable std::mutex m_mutex;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SHADER_HEADER
-#define SHADER_HEADER
+#pragma once
#include <IMaterialRendererServices.h>
#include "irrlichttypes_bloated.h"
void dumpShaderProgram(std::ostream &output_stream,
const std::string &program_type, const std::string &program);
-
-#endif
#include "camera.h"
#include "irrlichttypes_extrabloated.h"
-#ifndef SKY_HEADER
-#define SKY_HEADER
+#pragma once
#define SKY_MATERIAL_COUNT 5
#define SKY_STAR_COUNT 200
video::ITexture *m_sun_tonemap;
video::ITexture *m_moon_tonemap;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SOCKET_HEADER
-#define SOCKET_HEADER
+#pragma once
#ifdef _WIN32
#ifndef _WIN32_WINNT
int m_timeout_ms;
int m_addr_family;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SOUND_HEADER
-#define SOUND_HEADER
+#pragma once
#include <set>
#include <string>
// Global DummySoundManager singleton
extern DummySoundManager dummySoundManager;
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SOUND_OPENAL_HEADER
-#define SOUND_OPENAL_HEADER
+#pragma once
#include "sound.h"
ISoundManager *createOpenALSoundManager(OnDemandSoundFetcher *fetcher);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef STATICOBJECT_HEADER
-#define STATICOBJECT_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include <string>
private:
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SUBGAME_HEADER
-#define SUBGAME_HEADER
+#pragma once
#include <string>
#include <set>
// loads the subgame's config and creates world directory
// and world.mt if they don't exist
bool loadGameConfAndInitWorld(const std::string &path, const SubgameSpec &gamespec);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TERMINAL_CHAT_CONSOLE_H
-#define TERMINAL_CHAT_CONSOLE_H
+#pragma once
#include "chat.h"
#include "threading/thread.h"
};
extern TerminalChatConsole g_term_console;
-
-#endif
DEALINGS IN THE SOFTWARE.
*/
-#ifndef THREADING_EVENT_H
-#define THREADING_EVENT_H
+#pragma once
#include <condition_variable>
std::mutex mutex;
bool notified = false;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef THREADING_SEMAPHORE_H
-#define THREADING_SEMAPHORE_H
+#pragma once
#if defined(_WIN32)
#include <windows.h>
DISABLE_CLASS_COPY(Semaphore);
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TILEANIMATION_HEADER
-#define TILEANIMATION_HEADER
+#pragma once
#include <iostream>
#include "irrlichttypes_bloated.h"
void getTextureModifer(std::ostream &os, v2u32 texture_size, int frame) const;
v2f getTextureCoords(v2u32 texture_size, int frame) const;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TOOL_HEADER
-#define TOOL_HEADER
+#pragma once
#include "irrlichttypes.h"
#include <string>
const ItemStack *punchitem,
float time_from_last_punch
);
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TOUCHSCREENGUI_HEADER
-#define TOUCHSCREENGUI_HEADER
+#pragma once
#include <IEventReceiver.h>
#include <IGUIButton.h>
AutoHideButtonBar m_rarecontrolsbar;
};
extern TouchScreenGUI *g_touchscreengui;
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TREEGEN_HEADER
-#define TREEGEN_HEADER
+#pragma once
#include <matrix4.h>
#include "noise.h"
v3f transposeMatrix(irr::core::matrix4 M ,v3f v);
}; // namespace treegen
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef TEST_HEADER
-#define TEST_HEADER
+#pragma once
#include <exception>
#include <vector>
extern content_t t_CONTENT_BRICK;
bool run_tests();
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef AREA_STORE_H_
-#define AREA_STORE_H_
+#pragma once
#include "irr_v3d.h"
#include "noise.h" // for PcgRandom
};
#endif // USE_SPATIAL
-
-#endif // AREA_STORE_H_
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef AUTH_H
-#define AUTH_H
+#pragma once
/// Gets the base64 encoded legacy password db entry.
std::string translate_password(const std::string &name,
/// and salt components.
bool decode_srp_verifier_and_salt(const std::string &encoded,
std::string *verifier, std::string *salt);
-
-#endif
-#ifndef BASE64_HEADER
-#define BASE64_HEADER
+/*
+Minetest
+Copyright (C) 2013-2017 celeron55, Perttu Ahola <celeron55@gmail.com>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#pragma once
#include <string>
bool base64_is_valid(std::string const& s);
std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);
-
-#endif // BASE64_HEADER
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef BASICMACROS_HEADER
-#define BASICMACROS_HEADER
+#pragma once
#define ARRLEN(x) (sizeof(x) / sizeof((x)[0]))
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
#define PP2(x) "("<<(x).X<<","<<(x).Y<<")"
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_CONTAINER_HEADER
-#define UTIL_CONTAINER_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../exceptions.h"
// we can't use std::deque here, because its iterators get invalidated
std::list<K> m_queue;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_DIRECTIONTABLES_HEADER
-#define UTIL_DIRECTIONTABLES_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../irr_v3d.h"
DWM_ZP,
DWM_ZN,
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ENRICHEDSTRING_HEADER
-#define ENRICHEDSTRING_HEADER
+#pragma once
#include <string>
#include <vector>
bool m_has_background = false;
irr::video::SColor m_background;
};
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef HEX_HEADER
-#define HEX_HEADER
+#pragma once
#include <string>
return false;
return true;
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_NUMERIC_HEADER
-#define UTIL_NUMERIC_HEADER
+#pragma once
#include "basic_macros.h"
#include "../irrlichttypes.h"
orig |= orig >> 16;
return orig + 1;
}
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_POINTEDTHING_HEADER
-#define UTIL_POINTEDTHING_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../irr_v3d.h"
bool operator==(const PointedThing &pt2) const;
bool operator!=(const PointedThing &pt2) const;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_POINTER_HEADER
-#define UTIL_POINTER_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../debug.h" // For assert()
SharedBuffer<u8> b((u8*)string, strlen(string)+1);
return b;
}
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_SERIALIZE_HEADER
-#define UTIL_SERIALIZE_HEADER
+#pragma once
#include "../irrlichttypes_bloated.h"
#include "../exceptions.h" // for SerializationError
{
dest->insert(dest->end(), (u8 *)src, (u8 *)src + len);
}
-
-#endif
*/
-#ifndef SHA1_HEADER
+#pragma once
+
typedef unsigned int Uint32;
class SHA1
static void storeBigEndianUint32(unsigned char *byte, Uint32 num);
static void hexPrinter(unsigned char *c, int l);
};
-
-#define SHA1_HEADER
-#endif
* [including the GNU Public Licence.]
*/
-#ifndef HEADER_SHA_H
-#define HEADER_SHA_H
+#pragma once
#include <stddef.h>
#ifdef __cplusplus
}
#endif
-
-#endif
* hash & prime number pairings.
*/
-#ifndef SRP_H
-#define SRP_H
+#pragma once
struct SRPVerifier;
struct SRPUser;
/* bytes_HAMK must be exactly srp_user_get_session_key_length() bytes in size */
void srp_user_verify_session(struct SRPUser *usr, const unsigned char *bytes_HAMK);
-
-#endif /* Include Guard */
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef STRFND_HEADER
-#define STRFND_HEADER
+#pragma once
#include <string>
typedef BasicStrfnd<char> Strfnd;
typedef BasicStrfnd<wchar_t> WStrfnd;
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_STRING_HEADER
-#define UTIL_STRING_HEADER
+#pragma once
#include "irrlichttypes_bloated.h"
#include <stdlib.h>
return ss.str();
}
-
-
-#endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_THREAD_HEADER
-#define UTIL_THREAD_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../threading/thread.h"
private:
Semaphore m_update_sem;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef UTIL_TIMETAKER_HEADER
-#define UTIL_TIMETAKER_HEADER
+#pragma once
#include "../irrlichttypes.h"
#include "../gettime.h"
TimePrecision m_precision;
u64 *m_result = nullptr;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef VERSION_HEADER
-#define VERSION_HEADER
+#pragma once
extern const char *g_version_string;
extern const char *g_version_hash;
extern const char *g_build_info;
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef VOXEL_HEADER
-#define VOXEL_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "irr_v3d.h"
static const MapNode ContentIgnoreNode;
};
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef VOXELALGORITHMS_HEADER
-#define VOXELALGORITHMS_HEADER
+#pragma once
#include "voxel.h"
#include "mapnode.h"
};
} // namespace voxalgo
-
-
-
-#endif
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef WIELDMESH_HEADER
-#define WIELDMESH_HEADER
+#pragma once
#include <string>
#include "irrlichttypes_extrabloated.h"
void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f, bool use_shaders,
bool set_material, video::E_MATERIAL_TYPE *mattype,
std::vector<ItemPartColor> *colors);
-#endif