]> git.lizzy.rs Git - minetest.git/blob - src/client/clientlauncher.cpp
Clean up threading
[minetest.git] / src / client / clientlauncher.cpp
1 /*
2 Minetest
3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include "mainmenumanager.h"
21 #include "debug.h"
22 #include "clouds.h"
23 #include "server.h"
24 #include "filesys.h"
25 #include "guiMainMenu.h"
26 #include "game.h"
27 #include "chat.h"
28 #include "gettext.h"
29 #include "profiler.h"
30 #include "log.h"
31 #include "serverlist.h"
32 #include "guiEngine.h"
33 #include "player.h"
34 #include "fontengine.h"
35 #include "clientlauncher.h"
36
37 /* mainmenumanager.h
38  */
39 gui::IGUIEnvironment *guienv = NULL;
40 gui::IGUIStaticText *guiroot = NULL;
41 MainMenuManager g_menumgr;
42
43 bool noMenuActive()
44 {
45         return g_menumgr.menuCount() == 0;
46 }
47
48 // Passed to menus to allow disconnecting and exiting
49 MainGameCallback *g_gamecallback = NULL;
50
51
52 // Instance of the time getter
53 static TimeGetter *g_timegetter = NULL;
54
55 u32 getTimeMs()
56 {
57         if (g_timegetter == NULL)
58                 return 0;
59         return g_timegetter->getTime(PRECISION_MILLI);
60 }
61
62 u32 getTime(TimePrecision prec) {
63         if (g_timegetter == NULL)
64                 return 0;
65         return g_timegetter->getTime(prec);
66 }
67
68 ClientLauncher::~ClientLauncher()
69 {
70         if (receiver)
71                 delete receiver;
72
73         if (input)
74                 delete input;
75
76         if (g_fontengine)
77                 delete g_fontengine;
78
79         if (device)
80                 device->drop();
81 }
82
83
84 bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
85 {
86         init_args(game_params, cmd_args);
87
88         // List video modes if requested
89         if (list_video_modes)
90                 return print_video_modes();
91
92         if (!init_engine(game_params.log_level)) {
93                 errorstream << "Could not initialize game engine." << std::endl;
94                 return false;
95         }
96
97         // Create time getter
98         g_timegetter = new IrrlichtTimeGetter(device);
99
100         // Speed tests (done after irrlicht is loaded to get timer)
101         if (cmd_args.getFlag("speedtests")) {
102                 dstream << "Running speed tests" << std::endl;
103                 speed_tests();
104                 return true;
105         }
106
107         video::IVideoDriver *video_driver = device->getVideoDriver();
108         if (video_driver == NULL) {
109                 errorstream << "Could not initialize video driver." << std::endl;
110                 return false;
111         }
112
113         porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME_C);
114
115         /*
116                 This changes the minimum allowed number of vertices in a VBO.
117                 Default is 500.
118         */
119         //driver->setMinHardwareBufferVertexCount(50);
120
121         // Create game callback for menus
122         g_gamecallback = new MainGameCallback(device);
123
124         device->setResizable(true);
125
126         if (random_input)
127                 input = new RandomInputHandler();
128         else
129                 input = new RealInputHandler(device, receiver);
130
131         smgr = device->getSceneManager();
132         smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
133
134         guienv = device->getGUIEnvironment();
135         skin = guienv->getSkin();
136         skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(255, 255, 255, 255));
137         skin->setColor(gui::EGDC_3D_LIGHT, video::SColor(0, 0, 0, 0));
138         skin->setColor(gui::EGDC_3D_HIGH_LIGHT, video::SColor(255, 30, 30, 30));
139         skin->setColor(gui::EGDC_3D_SHADOW, video::SColor(255, 0, 0, 0));
140         skin->setColor(gui::EGDC_HIGH_LIGHT, video::SColor(255, 70, 120, 50));
141         skin->setColor(gui::EGDC_HIGH_LIGHT_TEXT, video::SColor(255, 255, 255, 255));
142
143         g_fontengine = new FontEngine(g_settings, guienv);
144         FATAL_ERROR_IF(g_fontengine == NULL, "Font engine creation failed.");
145
146 #if (IRRLICHT_VERSION_MAJOR >= 1 && IRRLICHT_VERSION_MINOR >= 8) || IRRLICHT_VERSION_MAJOR >= 2
147         // Irrlicht 1.8 input colours
148         skin->setColor(gui::EGDC_EDITABLE, video::SColor(255, 128, 128, 128));
149         skin->setColor(gui::EGDC_FOCUSED_EDITABLE, video::SColor(255, 96, 134, 49));
150 #endif
151
152         // Create the menu clouds
153         if (!g_menucloudsmgr)
154                 g_menucloudsmgr = smgr->createNewSceneManager();
155         if (!g_menuclouds)
156                 g_menuclouds = new Clouds(g_menucloudsmgr->getRootSceneNode(),
157                                 g_menucloudsmgr, -1, rand(), 100);
158         g_menuclouds->update(v2f(0, 0), video::SColor(255, 200, 200, 255));
159         scene::ICameraSceneNode* camera;
160         camera = g_menucloudsmgr->addCameraSceneNode(0,
161                                 v3f(0, 0, 0), v3f(0, 60, 100));
162         camera->setFarValue(10000);
163
164         /*
165                 GUI stuff
166         */
167
168         ChatBackend chat_backend;
169
170         // If an error occurs, this is set to something by menu().
171         // It is then displayed before the menu shows on the next call to menu()
172         std::string error_message;
173         bool reconnect_requested = false;
174
175         bool first_loop = true;
176
177         /*
178                 Menu-game loop
179         */
180         bool retval = true;
181         bool *kill = porting::signal_handler_killstatus();
182
183         while (device->run() && !*kill && !g_gamecallback->shutdown_requested)
184         {
185                 // Set the window caption
186                 const wchar_t *text = wgettext("Main Menu");
187                 device->setWindowCaption((utf8_to_wide(PROJECT_NAME_C) + L" [" + text + L"]").c_str());
188                 delete[] text;
189
190                 try {   // This is used for catching disconnects
191
192                         guienv->clear();
193
194                         /*
195                                 We need some kind of a root node to be able to add
196                                 custom gui elements directly on the screen.
197                                 Otherwise they won't be automatically drawn.
198                         */
199                         guiroot = guienv->addStaticText(L"", core::rect<s32>(0, 0, 10000, 10000));
200
201                         bool game_has_run = launch_game(error_message, reconnect_requested,
202                                 game_params, cmd_args);
203
204                         // If skip_main_menu, we only want to startup once
205                         if (skip_main_menu && !first_loop)
206                                 break;
207
208                         first_loop = false;
209
210                         if (!game_has_run) {
211                                 if (skip_main_menu)
212                                         break;
213                                 else
214                                         continue;
215                         }
216
217                         // Break out of menu-game loop to shut down cleanly
218                         if (!device->run() || *kill) {
219                                 if (g_settings_path != "")
220                                         g_settings->updateConfigFile(g_settings_path.c_str());
221                                 break;
222                         }
223
224                         if (current_playername.length() > PLAYERNAME_SIZE-1) {
225                                 error_message = gettext("Player name too long.");
226                                 playername = current_playername.substr(0, PLAYERNAME_SIZE-1);
227                                 g_settings->set("name", playername);
228                                 continue;
229                         }
230
231                         device->getVideoDriver()->setTextureCreationFlag(
232                                         video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map"));
233
234 #ifdef HAVE_TOUCHSCREENGUI
235                         receiver->m_touchscreengui = new TouchScreenGUI(device, receiver);
236                         g_touchscreengui = receiver->m_touchscreengui;
237 #endif
238
239                         the_game(
240                                 kill,
241                                 random_input,
242                                 input,
243                                 device,
244                                 worldspec.path,
245                                 current_playername,
246                                 current_password,
247                                 current_address,
248                                 current_port,
249                                 error_message,
250                                 chat_backend,
251                                 &reconnect_requested,
252                                 gamespec,
253                                 simple_singleplayer_mode
254                         );
255                         smgr->clear();
256
257 #ifdef HAVE_TOUCHSCREENGUI
258                         delete g_touchscreengui;
259                         g_touchscreengui = NULL;
260                         receiver->m_touchscreengui = NULL;
261 #endif
262
263                 } //try
264                 catch (con::PeerNotFoundException &e) {
265                         error_message = gettext("Connection error (timed out?)");
266                         errorstream << error_message << std::endl;
267                 }
268
269 #ifdef NDEBUG
270                 catch (std::exception &e) {
271                         std::string error_message = "Some exception: \"";
272                         error_message += e.what();
273                         error_message += "\"";
274                         errorstream << error_message << std::endl;
275                 }
276 #endif
277
278                 // If no main menu, show error and exit
279                 if (skip_main_menu) {
280                         if (!error_message.empty()) {
281                                 verbosestream << "error_message = "
282                                               << error_message << std::endl;
283                                 retval = false;
284                         }
285                         break;
286                 }
287         } // Menu-game loop
288
289         g_menuclouds->drop();
290         g_menucloudsmgr->drop();
291
292         return retval;
293 }
294
295 void ClientLauncher::init_args(GameParams &game_params, const Settings &cmd_args)
296 {
297
298         skip_main_menu = cmd_args.getFlag("go");
299
300         // FIXME: This is confusing (but correct)
301
302         /* If world_path is set then override it unless skipping the main menu using
303          * the --go command line param. Else, give preference to the address
304          * supplied on the command line
305          */
306         address = g_settings->get("address");
307         if (game_params.world_path != "" && !skip_main_menu)
308                 address = "";
309         else if (cmd_args.exists("address"))
310                 address = cmd_args.get("address");
311
312         playername = g_settings->get("name");
313         if (cmd_args.exists("name"))
314                 playername = cmd_args.get("name");
315
316         list_video_modes = cmd_args.getFlag("videomodes");
317
318         use_freetype = g_settings->getBool("freetype");
319
320         random_input = g_settings->getBool("random_input")
321                         || cmd_args.getFlag("random-input");
322 }
323
324 bool ClientLauncher::init_engine(int log_level)
325 {
326         receiver = new MyEventReceiver();
327         create_engine_device(log_level);
328         return device != NULL;
329 }
330
331 bool ClientLauncher::launch_game(std::string &error_message,
332                 bool reconnect_requested, GameParams &game_params,
333                 const Settings &cmd_args)
334 {
335         // Initialize menu data
336         MainMenuData menudata;
337         menudata.address                         = address;
338         menudata.name                            = playername;
339         menudata.port                            = itos(game_params.socket_port);
340         menudata.script_data.errormessage        = error_message;
341         menudata.script_data.reconnect_requested = reconnect_requested;
342
343         error_message.clear();
344
345         if (cmd_args.exists("password"))
346                 menudata.password = cmd_args.get("password");
347
348         menudata.enable_public = g_settings->getBool("server_announce");
349
350         // If a world was commanded, append and select it
351         if (game_params.world_path != "") {
352                 worldspec.gameid = getWorldGameId(game_params.world_path, true);
353                 worldspec.name = _("[--world parameter]");
354
355                 if (worldspec.gameid == "") {   // Create new
356                         worldspec.gameid = g_settings->get("default_game");
357                         worldspec.name += " [new]";
358                 }
359                 worldspec.path = game_params.world_path;
360         }
361
362         /* Show the GUI menu
363          */
364         if (!skip_main_menu) {
365                 main_menu(&menudata);
366
367                 // Skip further loading if there was an exit signal.
368                 if (*porting::signal_handler_killstatus())
369                         return false;
370
371                 address = menudata.address;
372                 int newport = stoi(menudata.port);
373                 if (newport != 0)
374                         game_params.socket_port = newport;
375
376                 simple_singleplayer_mode = menudata.simple_singleplayer_mode;
377
378                 std::vector<WorldSpec> worldspecs = getAvailableWorlds();
379
380                 if (menudata.selected_world >= 0
381                                 && menudata.selected_world < (int)worldspecs.size()) {
382                         g_settings->set("selected_world_path",
383                                         worldspecs[menudata.selected_world].path);
384                         worldspec = worldspecs[menudata.selected_world];
385                 }
386         }
387
388         if (!menudata.script_data.errormessage.empty()) {
389                 /* The calling function will pass this back into this function upon the
390                  * next iteration (if any) causing it to be displayed by the GUI
391                  */
392                 error_message = menudata.script_data.errormessage;
393                 return false;
394         }
395
396         if (menudata.name == "")
397                 menudata.name = std::string("Guest") + itos(myrand_range(1000, 9999));
398         else
399                 playername = menudata.name;
400
401         password = menudata.password;
402
403         g_settings->set("name", playername);
404
405         current_playername = playername;
406         current_password   = password;
407         current_address    = address;
408         current_port       = game_params.socket_port;
409
410         // If using simple singleplayer mode, override
411         if (simple_singleplayer_mode) {
412                 assert(skip_main_menu == false);
413                 current_playername = "singleplayer";
414                 current_password = "";
415                 current_address = "";
416                 current_port = myrand_range(49152, 65535);
417         } else if (address != "") {
418                 ServerListSpec server;
419                 server["name"] = menudata.servername;
420                 server["address"] = menudata.address;
421                 server["port"] = menudata.port;
422                 server["description"] = menudata.serverdescription;
423                 ServerList::insert(server);
424         }
425
426         infostream << "Selected world: " << worldspec.name
427                    << " [" << worldspec.path << "]" << std::endl;
428
429         if (current_address == "") { // If local game
430                 if (worldspec.path == "") {
431                         error_message = gettext("No world selected and no address "
432                                         "provided. Nothing to do.");
433                         errorstream << error_message << std::endl;
434                         return false;
435                 }
436
437                 if (!fs::PathExists(worldspec.path)) {
438                         error_message = gettext("Provided world path doesn't exist: ")
439                                         + worldspec.path;
440                         errorstream << error_message << std::endl;
441                         return false;
442                 }
443
444                 // Load gamespec for required game
445                 gamespec = findWorldSubgame(worldspec.path);
446                 if (!gamespec.isValid() && !game_params.game_spec.isValid()) {
447                         error_message = gettext("Could not find or load game \"")
448                                         + worldspec.gameid + "\"";
449                         errorstream << error_message << std::endl;
450                         return false;
451                 }
452
453                 if (porting::signal_handler_killstatus())
454                         return true;
455
456                 if (game_params.game_spec.isValid() &&
457                                 game_params.game_spec.id != worldspec.gameid) {
458                         errorstream << "WARNING: Overriding gamespec from \""
459                                     << worldspec.gameid << "\" to \""
460                                     << game_params.game_spec.id << "\"" << std::endl;
461                         gamespec = game_params.game_spec;
462                 }
463
464                 if (!gamespec.isValid()) {
465                         error_message = gettext("Invalid gamespec.");
466                         error_message += " (world.gameid=" + worldspec.gameid + ")";
467                         errorstream << error_message << std::endl;
468                         return false;
469                 }
470         }
471
472         return true;
473 }
474
475 void ClientLauncher::main_menu(MainMenuData *menudata)
476 {
477         bool *kill = porting::signal_handler_killstatus();
478         video::IVideoDriver *driver = device->getVideoDriver();
479
480         infostream << "Waiting for other menus" << std::endl;
481         while (device->run() && *kill == false) {
482                 if (noMenuActive())
483                         break;
484                 driver->beginScene(true, true, video::SColor(255, 128, 128, 128));
485                 guienv->drawAll();
486                 driver->endScene();
487                 // On some computers framerate doesn't seem to be automatically limited
488                 sleep_ms(25);
489         }
490         infostream << "Waited for other menus" << std::endl;
491
492         // Cursor can be non-visible when coming from the game
493 #ifndef ANDROID
494         device->getCursorControl()->setVisible(true);
495 #endif
496
497         /* show main menu */
498         GUIEngine mymenu(device, guiroot, &g_menumgr, smgr, menudata, *kill);
499
500         smgr->clear();  /* leave scene manager in a clean state */
501 }
502
503 bool ClientLauncher::create_engine_device(int log_level)
504 {
505         static const irr::ELOG_LEVEL irr_log_level[5] = {
506                 ELL_NONE,
507                 ELL_ERROR,
508                 ELL_WARNING,
509                 ELL_INFORMATION,
510 #if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
511                 ELL_INFORMATION
512 #else
513                 ELL_DEBUG
514 #endif
515         };
516
517         // Resolution selection
518         bool fullscreen = g_settings->getBool("fullscreen");
519         u16 screenW = g_settings->getU16("screenW");
520         u16 screenH = g_settings->getU16("screenH");
521
522         // bpp, fsaa, vsync
523         bool vsync = g_settings->getBool("vsync");
524         u16 bits = g_settings->getU16("fullscreen_bpp");
525         u16 fsaa = g_settings->getU16("fsaa");
526
527         // Determine driver
528         video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
529         std::string driverstring = g_settings->get("video_driver");
530         std::vector<video::E_DRIVER_TYPE> drivers
531                 = porting::getSupportedVideoDrivers();
532         u32 i;
533         for (i = 0; i != drivers.size(); i++) {
534                 if (!strcasecmp(driverstring.c_str(),
535                         porting::getVideoDriverName(drivers[i]))) {
536                         driverType = drivers[i];
537                         break;
538                 }
539         }
540         if (i == drivers.size()) {
541                 errorstream << "Invalid video_driver specified; "
542                         "defaulting to opengl" << std::endl;
543         }
544
545         SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
546         params.DriverType    = driverType;
547         params.WindowSize    = core::dimension2d<u32>(screenW, screenH);
548         params.Bits          = bits;
549         params.AntiAlias     = fsaa;
550         params.Fullscreen    = fullscreen;
551         params.Stencilbuffer = false;
552         params.Vsync         = vsync;
553         params.EventReceiver = receiver;
554         params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
555 #ifdef __ANDROID__
556         params.PrivateData = porting::app_global;
557         params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM +
558                         "media" + DIR_DELIM + "Shaders" + DIR_DELIM).c_str();
559 #endif
560
561         device = createDeviceEx(params);
562
563         if (device) {
564                 // Map our log level to irrlicht engine one.
565                 ILogger* irr_logger = device->getLogger();
566                 irr_logger->setLogLevel(irr_log_level[log_level]);
567
568                 porting::initIrrlicht(device);
569         }
570
571         return device != NULL;
572 }
573
574 void ClientLauncher::speed_tests()
575 {
576         // volatile to avoid some potential compiler optimisations
577         volatile static s16 temp16;
578         volatile static f32 tempf;
579         static v3f tempv3f1;
580         static v3f tempv3f2;
581         static std::string tempstring;
582         static std::string tempstring2;
583
584         tempv3f1 = v3f();
585         tempv3f2 = v3f();
586         tempstring = std::string();
587         tempstring2 = std::string();
588
589         {
590                 infostream << "The following test should take around 20ms." << std::endl;
591                 TimeTaker timer("Testing std::string speed");
592                 const u32 jj = 10000;
593                 for (u32 j = 0; j < jj; j++) {
594                         tempstring = "";
595                         tempstring2 = "";
596                         const u32 ii = 10;
597                         for (u32 i = 0; i < ii; i++) {
598                                 tempstring2 += "asd";
599                         }
600                         for (u32 i = 0; i < ii+1; i++) {
601                                 tempstring += "asd";
602                                 if (tempstring == tempstring2)
603                                         break;
604                         }
605                 }
606         }
607
608         infostream << "All of the following tests should take around 100ms each."
609                    << std::endl;
610
611         {
612                 TimeTaker timer("Testing floating-point conversion speed");
613                 tempf = 0.001;
614                 for (u32 i = 0; i < 4000000; i++) {
615                         temp16 += tempf;
616                         tempf += 0.001;
617                 }
618         }
619
620         {
621                 TimeTaker timer("Testing floating-point vector speed");
622
623                 tempv3f1 = v3f(1, 2, 3);
624                 tempv3f2 = v3f(4, 5, 6);
625                 for (u32 i = 0; i < 10000000; i++) {
626                         tempf += tempv3f1.dotProduct(tempv3f2);
627                         tempv3f2 += v3f(7, 8, 9);
628                 }
629         }
630
631         {
632                 TimeTaker timer("Testing std::map speed");
633
634                 std::map<v2s16, f32> map1;
635                 tempf = -324;
636                 const s16 ii = 300;
637                 for (s16 y = 0; y < ii; y++) {
638                         for (s16 x = 0; x < ii; x++) {
639                                 map1[v2s16(x, y)] =  tempf;
640                                 tempf += 1;
641                         }
642                 }
643                 for (s16 y = ii - 1; y >= 0; y--) {
644                         for (s16 x = 0; x < ii; x++) {
645                                 tempf = map1[v2s16(x, y)];
646                         }
647                 }
648         }
649
650         {
651                 infostream << "Around 5000/ms should do well here." << std::endl;
652                 TimeTaker timer("Testing mutex speed");
653
654                 Mutex m;
655                 u32 n = 0;
656                 u32 i = 0;
657                 do {
658                         n += 10000;
659                         for (; i < n; i++) {
660                                 m.lock();
661                                 m.unlock();
662                         }
663                 }
664                 // Do at least 10ms
665                 while(timer.getTimerTime() < 10);
666
667                 u32 dtime = timer.stop();
668                 u32 per_ms = n / dtime;
669                 infostream << "Done. " << dtime << "ms, " << per_ms << "/ms" << std::endl;
670         }
671 }
672
673 bool ClientLauncher::print_video_modes()
674 {
675         IrrlichtDevice *nulldevice;
676
677         bool vsync = g_settings->getBool("vsync");
678         u16 fsaa = g_settings->getU16("fsaa");
679         MyEventReceiver* receiver = new MyEventReceiver();
680
681         SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
682         params.DriverType    = video::EDT_NULL;
683         params.WindowSize    = core::dimension2d<u32>(640, 480);
684         params.Bits          = 24;
685         params.AntiAlias     = fsaa;
686         params.Fullscreen    = false;
687         params.Stencilbuffer = false;
688         params.Vsync         = vsync;
689         params.EventReceiver = receiver;
690         params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
691
692         nulldevice = createDeviceEx(params);
693
694         if (nulldevice == NULL) {
695                 delete receiver;
696                 return false;
697         }
698
699         dstream << _("Available video modes (WxHxD):") << std::endl;
700
701         video::IVideoModeList *videomode_list = nulldevice->getVideoModeList();
702
703         if (videomode_list != NULL) {
704                 s32 videomode_count = videomode_list->getVideoModeCount();
705                 core::dimension2d<u32> videomode_res;
706                 s32 videomode_depth;
707                 for (s32 i = 0; i < videomode_count; ++i) {
708                         videomode_res = videomode_list->getVideoModeResolution(i);
709                         videomode_depth = videomode_list->getVideoModeDepth(i);
710                         dstream << videomode_res.Width << "x" << videomode_res.Height
711                                 << "x" << videomode_depth << std::endl;
712                 }
713
714                 dstream << _("Active video mode (WxHxD):") << std::endl;
715                 videomode_res = videomode_list->getDesktopResolution();
716                 videomode_depth = videomode_list->getDesktopDepth();
717                 dstream << videomode_res.Width << "x" << videomode_res.Height
718                         << "x" << videomode_depth << std::endl;
719
720         }
721
722         nulldevice->drop();
723         delete receiver;
724
725         return videomode_list != NULL;
726 }