aboutsummaryrefslogtreecommitdiff
path: root/src/content_mapnode.cpp
Commit message (Expand)AuthorAge
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Fix map deserialization and remove old serialization codePerttu Ahola2012-07-23
* Optimize headersPerttu Ahola2012-06-17
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Node placement / mineral / serialization / iron freq / node_dig callbackKahrl2012-01-22
* The huge item definition and item namespace unification patch (itemdef), see ...Kahrl2012-01-12
* Add node definitions in Lua and do not use content_mapnode_init anymore (exce...Kahrl2011-11-29
* Make liquid_alternative_* to be stringsPerttu Ahola2011-11-29
* Store metadata as metadata name in node definitionPerttu Ahola2011-11-29
* Actually fill in the NewNameGetter names to allow map generator operation and...Perttu Ahola2011-11-29
* Do not expose CONTENT_* stuff in content_mapnode.h and use a name converter w...Perttu Ahola2011-11-29
* Node definition namesPerttu Ahola2011-11-29
* Add name field to ContentFeaturesPerttu Ahola2011-11-29
* Remove burn time definitions from FurnaceNodeMetadataPerttu Ahola2011-11-29
* Move cook result properly to ContentFeaturesPerttu Ahola2011-11-29
* Saner sized saplingPerttu Ahola2011-11-29
* Clean nodefeat and content_mapnode a bitPerttu Ahola2011-11-29
* Fix NDT_PLANTLIKE scaling to always keep the bottom at ground levelPerttu Ahola2011-11-29
* Clean mapnode.h and fix other files accordinglyPerttu Ahola2011-11-29
* Completely generalized mesh generation; ContentFeatures serializationPerttu Ahola2011-11-29
* Remove commented out codePerttu Ahola2011-11-29
* Prepare more for node definition serializationPerttu Ahola2011-11-29
* Better node texture generationPerttu Ahola2011-11-29
* Make fence post selection box smaller and create code to allow node placement...Perttu Ahola2011-11-29
* Tune gravel and picksPerttu Ahola2011-11-29
* GameDef compilesPerttu Ahola2011-11-29
* Create framework for getting rid of global definitions of node/tool/item/what...Perttu Ahola2011-11-29
* Tune the tool speed thingPerttu Ahola2011-11-29
* New kind of tool speed and wear calculation thingyPerttu Ahola2011-11-29
* Generalize selection boxesPerttu Ahola2011-11-29
* Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuffPerttu Ahola2011-11-29
* Fix water-glass and water-lava surfacesPerttu Ahola2011-11-08
* Add option to set water opaque (mainly for stylistic choice)Perttu Ahola2011-11-03
* Improve rendering and fix tiling in mesh generationPerttu Ahola2011-10-18
* Automate texture listing for texture atlas makingPerttu Ahola2011-10-18
* Header file tweaking; mainly for speedPerttu Ahola2011-10-12
* Merge remote-tracking branch 'marktraceur/master'Perttu Ahola2011-09-26
|\
| * Fixed merge issues with saplings, ready to pull now!Mark Holmquist2011-09-23
| * Adding (most) of the sapling functionality. It has yet to work, since MEET_OT...Mark Holmquist2011-09-23
* | Merge branch 'view_bobbing_and_vielded_tool'Perttu Ahola2011-09-26
|\ \
| * | Wielded tool updates, leaves and glass work nowKahrl2011-09-19
| * | Removed unused camera_position and camera_direction fields from Client. Moved...Kahrl2011-09-07
* | | added locking chests - clean patchdarkrose2011-09-22
| |/ |/|
* | Removed Spacessfan52011-09-11
* | Added Apple Treessfan52011-09-11
|/
* Add note about trans_table_19.Perttu Ahola2011-09-07
* Fix some texture stuff: remove item_fence.png, use fence.png, remove inexisti...Perttu Ahola2011-09-06
* Lava is now better visible inside water. (a crappy hack)Perttu Ahola2011-08-23
n>: /** target to transmit data to */ GUIEngine* m_engine; }; /** GUIEngine specific implementation of ISimpleTextureSource */ class MenuTextureSource : public ISimpleTextureSource { public: /** * default constructor * @param driver the video driver to load textures from */ MenuTextureSource(video::IVideoDriver *driver); /** * destructor, removes all loaded textures */ virtual ~MenuTextureSource(); /** * get a texture, loading it if required * @param name path to the texture * @param id receives the texture ID, always 0 in this implementation */ video::ITexture* getTexture(const std::string &name, u32 *id = NULL); private: /** driver to get textures from */ video::IVideoDriver *m_driver; /** set of texture names to delete */ std::set<std::string> m_to_delete; }; /** GUIEngine specific implementation of OnDemandSoundFetcher */ class MenuMusicFetcher: public OnDemandSoundFetcher { public: /** * get sound file paths according to sound name * @param name sound name * @param dst_paths receives possible paths to sound files * @param dst_datas receives binary sound data (not used here) */ void fetchSounds(const std::string &name, std::set<std::string> &dst_paths, std::set<std::string> &dst_datas); private: /** set of fetched sound names */ std::set<std::string> m_fetched; }; /** implementation of main menu based uppon formspecs */ class GUIEngine { /** grant ModApiMainMenu access to private members */ friend class ModApiMainMenu; friend class ModApiSound; public: /** * default constructor * @param dev device to draw at * @param parent parent gui element * @param menumgr manager to add menus to * @param smgr scene manager to add scene elements to * @param data struct to transfer data to main game handling */ GUIEngine(irr::IrrlichtDevice* dev, JoystickController *joystick, gui::IGUIElement* parent, IMenuManager *menumgr, scene::ISceneManager* smgr, MainMenuData* data, bool& kill); /** default destructor */ virtual ~GUIEngine(); /** * return MainMenuScripting interface */ MainMenuScripting* getScriptIface() { return m_script; } /** * return dir of current menuscript */ std::string getScriptDir() { return m_scriptdir; } /** pass async callback to scriptengine **/ unsigned int queueAsync(const std::string &serialized_fct, const std::string &serialized_params); private: /** find and run the main menu script */ bool loadMainMenuScript(); /** run main menu loop */ void run(); /** update size of topleftext element */ void updateTopLeftTextSize(); /** device to draw at */ irr::IrrlichtDevice* m_device; /** parent gui element */ gui::IGUIElement* m_parent; /** manager to add menus to */ IMenuManager* m_menumanager; /** scene manager to add scene elements to */ scene::ISceneManager* m_smgr; /** pointer to data beeing transfered back to main game handling */ MainMenuData* m_data; /** pointer to texture source */ ISimpleTextureSource* m_texture_source; /** pointer to soundmanager*/ ISoundManager* m_sound_manager; /** representation of form source to be used in mainmenu formspec */ FormspecFormSource* m_formspecgui; /** formspec input receiver */ TextDestGuiEngine* m_buttonhandler; /** the formspec menu */ GUIFormSpecMenu* m_menu; /** reference to kill variable managed by SIGINT handler */ bool& m_kill; /** variable used to abort menu and return back to main game handling */ bool m_startgame; /** scripting interface */ MainMenuScripting* m_script; /** script basefolder */ std::string m_scriptdir; /** * draw background layer * @param driver to use for drawing */ void drawBackground(video::IVideoDriver* driver); /** * draw overlay layer * @param driver to use for drawing */ void drawOverlay(video::IVideoDriver* driver); /** * draw header layer * @param driver to use for drawing */ void drawHeader(video::IVideoDriver* driver); /** * draw footer layer * @param driver to use for drawing */ void drawFooter(video::IVideoDriver* driver); /** * load a texture for a specified layer * @param layer draw layer to specify texture * @param texturepath full path of texture to load */ bool setTexture(texture_layer layer, std::string texturepath, bool tile_image, unsigned int minsize); /** * download a file using curl * @param url url to download * @param target file to store to */ static bool downloadFile(const std::string &url, const std::string &target); /** array containing pointers to current specified texture layers */ image_definition m_textures[TEX_LAYER_MAX]; /** * specify text to appear as top left string * @param text to set */ void setTopleftText(const std::string &text); /** pointer to gui element shown at topleft corner */ irr::gui::IGUIStaticText* m_irr_toplefttext; /** and text that is in it */ EnrichedString m_toplefttext; /** initialize cloud subsystem */ void cloudInit(); /** do preprocessing for cloud subsystem */ void cloudPreProcess(); /** do postprocessing for cloud subsystem */ void cloudPostProcess(); /** internam data required for drawing clouds */ struct clouddata { /** delta time since last cloud processing */ f32 dtime; /** absolute time of last cloud processing */ u32 lasttime; /** pointer to cloud class */ Clouds* clouds; /** camera required for drawing clouds */ scene::ICameraSceneNode* camera; }; /** is drawing of clouds enabled atm */ bool m_clouds_enabled; /** data used to draw clouds */ clouddata m_cloud; /** start playing a sound and return handle */ s32 playSound(SimpleSoundSpec spec, bool looped); /** stop playing a sound started with playSound() */ void stopSound(s32 handle); }; #endif /* GUI_ENGINE_H_ */