summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tileweb.h
Commit message (Collapse)AuthorAgeFilesLines
* Make the hp bar show the deterministic poison in WebTilesgammafunk2014-03-181-1/+1
| | | | | | | This adds an yellow hp poison bar to the WebTiles display ("stats_hp_bar_poison") that's show when the player is poisoned and their calculated hp after poison expires is lower than their current hp.
* Include a link to character dump/morgue in exit game dialog.Pekka Lampila2014-02-051-0/+1
|
* Display a dialog on WebTiles after the game ends.Pekka Lampila2014-02-051-0/+2
| | | | | For players this is displayed in a case of a crash/error/unexpected end. For watchers the dialog is displayed regardless of how the game ended.
* Reference mcache entries used by WebTilesPekka Lampila2013-12-171-0/+3
| | | | | This should fix #6644 which was caused by mcache entry being destroyed and a new one made with the same number between updates.
* Support show_game_turns in WebTilesPekka Lampila2013-12-141-0/+1
|
* Send some rc file options to the WebTiles clientPekka Lampila2013-12-111-0/+2
| | | | | | | | | | | | Player's options are always sent on the game start, by the process itself. They are also sent to any joining spectators. Spectators also receive their own config which is generated by running --print-webtiles-options. Also added a simple options module to JavaScript. Since all the options are received on game start the code can assume that the values are always there and have been validated by the server side code.
* Revert "Only send the game state to the joining spectator"Pekka Lampila2013-10-181-1/+1
| | | | | | | | | | | This reverts commit 06ee7f8badf1e19f333e918a572bafb5a23317f8. Conflicts: crawl-ref/source/webserver/process_handler.py crawl-ref/source/webserver/ws_handler.py My approach here was flawed, and joining spectators could cause glitches for the player and existing spectators.
* Fix the minibar bug on WebTiles tooPekka Lampila2013-06-281-0/+1
| | | | Minibars showing on levels when player isn't there.
* Only send the game state to the joining spectatorPekka Lampila2013-06-041-1/+1
| | | | | | Previously on WebTiles spectator join everyone would receive messages for the current game state. Now these messages are only sent to the joining spectator.
* Send contam/temperature to webtiles client for Djinn/Lava OrcPete Hurst2013-05-301-0/+2
|
* Fix a problem with Webtiles formatted_scroller handling.Florian Diebold2013-05-061-0/+1
| | | | | | | | The webtiles_write_menu call in formatted_scroller::jump_to could happen before the menu was sent, which would then result in two menus on the client side. This was revealed by the message combining changes, because the two menus would both be in the same message and the second would be ignored by the client before.
* Combine WebTiles messages and send them togetherPekka Lampila2013-05-011-0/+1
| | | | | | Idea being avoiding lag caused by TCP ACK etc. Crawl process provides messages like always, but also sends a special flush message to the WebTiles server that causes them to actually be delivered.
* Level map cursor fixes for WebTilesPekka Lampila2013-03-131-0/+1
| | | | | | | | | | When changing level defer sending cursor until the map has been sent, so that the correct origin coordinate can be used. Send the map cursor with full updates (for new spectators). Only delay sending CURSOR_MAP Send all cursor types for full updates
* Brace and std:: removal.Adam Borowski2012-12-081-7/+7
|
* Webtiles: Only update ui_state when necessary.Florian Diebold2012-11-241-0/+2
|
* Webtiles: Fix the line reader showing up in the message window for menus.Florian Diebold2012-11-231-0/+1
| | | | For example, when inscribing an item from its description.
* Split MOUSE_MODE_MORE into versions for prompts, to give the Webtiles client ↵Florian Diebold2012-11-231-1/+1
| | | | more information.
* Webtiles: Implement the "new command" marker for messages.Florian Diebold2012-11-231-0/+1
|
* Webtiles: Send inventory contents to the client.Florian Diebold2012-11-231-13/+11
| | | | This also fixes the wielded weapon and quiver not being shown.
* Webtiles: Do message scrolling etc. on the client side.Florian Diebold2012-11-231-1/+0
| | | | | | | | Previously, the message pane was rendered on the server side and its contents were sent to the client as they were displayed in the terminal. Now, messages are sent as separate objects. This also necessitates special handling of more prompts and line_reader for webtiles.
* Webtiles: Render the stats pane on the client side.Florian Diebold2012-11-231-1/+0
|
* Send player stats to the webtiles client.Florian Diebold2012-11-231-1/+52
| | | | Not yet used on the client side.
* Webtiles: draw mini health and magic point barAndre-Patrick Bubel2012-11-231-0/+1
| | | | | | | | | | | - Webtiles: Send hp and mp information to the client - handle player message and update global player object - send player position - send player coordinates relativ to origin - send player after first map draw because otherwise the origin isn't initialized - redraw minibars if view is moved - always rerender the player before applying the minibar - minibars are correctly displayed if health is negative
* Webtiles: Improve JSON generation functions; always send proper JSON.Florian Diebold2012-11-141-16/+22
|
* Dump the Webtiles message buffer when crashing.Florian Diebold2012-11-011-0/+2
|
* Fix monsters not being removed from the monster list (#6129).Florian Diebold2012-09-121-1/+1
| | | | | Because the cell didn't get marked dirty when the monster was killed, the change was never sent to the client.
* Use std namespace.Raphael Langella2012-08-261-24/+24
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Remove an unused function.Florian Diebold2012-07-011-1/+0
|
* Webtiles: Fix map update with travel_delay=-1 (#5356).Florian Diebold2012-06-201-3/+6
|
* Let GCC validate webtiles printfs.Adam Borowski2012-05-021-2/+4
| | | | | | | Sadly, clang and gcc earlier than 4.7 insist that printf("") is bad, and the option to disable that (-Wno-format-zero-length) doesn't work in C++ mode. Thus, I had to split {write,send}_message() into two: one with an argument, one without.
* Drop pointless braces after if/for/while everywhere.Adam Borowski2012-04-201-2/+0
|
* Webtiles: Track cell dirtyness in more detail to improve performance.Florian Diebold2012-04-191-0/+6
| | | | | | | | In my completely unscientific tests, this vastly improves the cpu usage of webtiles while running or autoexploring without travel_delay=-1, bringing it almost to webtiles-in-terminal-mode levels (which are still somewhat higher than when running without webtiles support).
* Make the X level map use the full window in Webtiles, similar to the console.Florian Diebold2011-12-161-8/+32
| | | | There are no feature markers like in console though (yet).
* Merge branch 'tiles-monster-info'Florian Diebold2011-12-151-1/+1
|\
| * Use monster_info instead of monster for tile picking.Florian Diebold2011-11-231-1/+1
| | | | | | | | | | | | | | | | See #4280. This will allow regenerating tiles out of view from the map_knowledge, and we won't need to save the mcache anymore. There are still a few uses of monster in the interface code, which will have to be hunted down.
* | Webtiles: Tell the crawl process if it is being controlled from the web client.Florian Diebold2011-12-141-0/+3
| | | | | | | | The tiles flag in scorefile entries is set accordingly.
* | Don't waste CPU time sending messages in Webtiles-enabled executables if no ↵Florian Diebold2011-12-081-0/+2
| | | | | | | | | | | | | | | | server is connected to the crawl process. Crawl will still be doing more stuff behind the scenes than without USE_TILE_WEB; but that's necessary so that if the server connects to the process at a later point, crawl can send the necessary data.
* | Allow other CRT dialogs to be displayed like a menu in Webtiles.Florian Diebold2011-12-081-8/+38
| | | | | | | | | | | | This mainly means at the moment that the menu is shown as a dialog floating above the normal layer, instead of switching to the separate CRT layer.
* | Implement dedicated Menu support for Webtiles.Florian Diebold2011-12-081-0/+7
| | | | | | | | | | | | This is just for menus using the Menu class. It means that the menu items are laid out in html on the client side, the menu size adapts to the window of each spectator, and scrolling is done client-side.
* | A bunch of helper functions for writing JSON for Webtiles.Florian Diebold2011-12-081-3/+18
|/
* Allow specifying the path to the Webtiles client data while compiling crawl.Florian Diebold2011-11-041-0/+2
| | | | | | | | | This is mainly to allow trunk builds, which can have multiple different crawl versions behind a wrapper script, so that the server can't know in advance which client version it has to send. Also, this will install the client data to that folder in the install target.
* Make Webtiles output happen in parallel to the console display, and make the ↵Florian Diebold2011-10-151-5/+57
| | | | | | | | | | | | | | | | | | server record ttyrecs. Crawl compiled with WEBTILES=y should now be playable normally (i.e. indistinguishable from one compiled without WEBTILES) when run from a terminal. (This is not yet completely the case.) The Webtiles data is written on a Unix-domain datagram socket; the Crawl parameter -webtiles-socket determines a path on which the Crawl process receives control messages. The Webtiles server then runs Crawl in a pseudo-terminal and records its console output into a ttyrec file. The goal of all this is of course to be able to watch Webtiles games from ssh, and later the reverse.
* Refactor Webtiles rendering, and more preparations for monster list.Florian Diebold2011-09-301-1/+1
| | | | | | | | | | | Most rendering code is moved to cell_renderer.js into the DungeonCellRenderer class. It can now render to any canvas, which is necessary for rendering the monster list. Also, fix the monster bookkeeping in map_knowledge and add a stub monster_list module. Finally, some whitespace fixes.
* Send parts of map_knowledge to the Webtiles client.Florian Diebold2011-09-301-6/+30
| | | | | | | | | | | This currently includes feat(), and a small part of the monster info. monster and monster_info get a client_id field which identifies visible monsters between turns, so that the full monster data doesn't need to be sent every turn. This also refactors the way tile data is sent, and reduces bandwidth usage by removing overhead and omitting x/y coordinates for consecutive cells.
* Whitespace fixes.Adam Borowski2011-07-121-1/+1
|
* Clean up tilesdl.h.Florian Diebold2011-07-061-0/+119
tileweb.cc now has its own header file. This replicates the public TilesFramework interface, but the repetition seems better than having one header file littered with #ifdefs.