summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libgui.h
Commit message (Collapse)AuthorAgeFilesLines
* Make is_tiles() available on the C++ side.Adam Borowski2012-06-221-0/+5
| | | | | | | | | | | | | | In webtiles, the same binary can run both, so this function returns whether this particular game is controlled from console or tiles (there may be spectators using either, possibly at the same time). Declared constexpr in other build modes, so if we ever turn on C++11¹ mode, they'll be as effective as #ifdefs. Without it, optimized builds may or may not eliminate code that depends on it, debug builds won't. [1]. While there are niceties like sane initialization of arrays, etc, FreeBSD and MacOS use truly ancient compilers, so C++11 is currently not an option.
* Combine common parts of lib*.hAdam Borowski2011-09-081-35/+1
| | | | | Having different prototypes for different ports without a good reason is bad. After unification, it's easier to have, for example, two ports at once.
* Get rid of strlwr().Adam Borowski2011-09-071-5/+0
| | | | | | Besides being non-standard and present only on some platforms, it cannot be extended to Unicode as some characters expand or contract while being upper/lowercased.
* Get rid of a nasty hack around improper includes.Adam Borowski2011-09-071-1/+1
| | | | | Why the original coder did that instead of actually including the system headers is beyond me.
* Get rid of itoa().Adam Borowski2011-05-011-1/+0
| | | | Even worse, it had two redundant implementations.
* Don't rely on undocumented behaviour of ncursesw.Adam Borowski2011-04-021-1/+1
| | | | | The API doesn't provide a way to giveback a function key, so let's do our own giveback buffer.
* Merge branch 'unicode'.Adam Borowski2011-04-011-9/+3
|\ | | | | | | | | There are some issues left, like incorrect wrapping in some cases, but we can fix them later.
| * Get rid of remaining uses of putch().Adam Borowski2011-03-311-1/+0
| | | | | | | | One was actually wrong, too -- mangling redefined explosions.
| * Basic cursesw input.Adam Borowski2011-03-311-1/+1
| | | | | | | | No direction keys yet...
| * Let tiles output our UTF-8 encoded strings -- only the ISO-8859-1 subset for ↵Adam Borowski2010-09-271-3/+2
| | | | | | | | | | | | now. Word wrapping is yet to be corrected, just like in other UIs.
| * Always use Unicode values for glyphs. Always use ncursesw on Unix console.Adam Borowski2010-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | CSET_IBM and CSET_DEC are now merely presets and don't change the I/O encoding. Doing I/O using any encoding other than the one configured using LANG/LC_* is just wrong and no well-behaving program should do that. This does require changes on CAO/CDO, but they would fix problems with ttyrec and spectating as well. To fix: ncursesw replaces unrepresentable characters with spaces, we'll have to replace them by hand.
| * Remove an unused (and unimplemented!) function.Adam Borowski2010-09-191-2/+0
| |
* | Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
|/ | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Get rid of get_input_line.Robert Vollmert2010-05-151-1/+0
| | | | It's not used anymore, and was buggy on windows console.
* Implement cgetpos for tiles.Robert Vollmert2010-01-201-0/+1
| | | | Untested since I can't compile tiles here...
* Merge branch 'master' into messagewindowRobert Vollmert2010-01-041-0/+1
|\ | | | | | | | | | | Conflicts: crawl-ref/source/libgui.cc crawl-ref/source/libgui.h
| * [212] Fixing prompts clearing screen in tiles.Enne Walker2010-01-031-0/+1
| | | | | | | | | | | | | | The line reader was always switching back to GOTO_CRT. When receiving input from the message window, this ended up causing the screen to blank and switch to the CRT layer. Adding a function get the current cursor region allows the line reader to not change regions.
* | Merge branch 'master' into messagewindowRobert Vollmert2009-12-151-1/+1
|\| | | | | | | | | | | | | Conflicts: crawl-ref/source/libgui.cc crawl-ref/source/libgui.h crawl-ref/source/message.cc
| * cgotoxy now takes GotoRegion instead of int.Robert Vollmert2009-12-101-1/+1
| |
* | Remove message window handling from lib*.{cc,h}Robert Vollmert2009-12-071-2/+0
|/ | | | They haven't been remimplemented outside these yet.
* Simplify scrolling handling in message_out.Robert Vollmert2009-11-261-1/+1
| | | | | | | | | | The newline parameter to message_out is gone. Instead, a pointer to the message line is passed which may lie outside the message window. The window is then scrolled to make that line the last line. This also updates libnonunix.cc, but I haven't been able to test those changes.
* Adding you.in_branch(string) as a lua function.Enne Walker2009-10-311-1/+0
| | | | | | This also removes you.where_are_you() so as not to require lua scripts to know the value of C++ enums. This change also fixes stricmp incorrectly falling through to strcmp on non-MSVC platforms.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* libgui: fix declaration consistencySteven Noonan2009-09-231-8/+7
| | | | | | | | | | | | | | | | Lots of little things here. The forward declarations for some of these functions simply did not match the function definitions. - clrscr() was declared twice - cprintf(), putch(), putwch(), window(), clrscr() all returned 'void' instead of 'int'. - getch() and strlwr() were defined extern "C", but not declared as such. Also made libgui.cc functions behave like their ncurses equivalents, except that our functions always return the ncurses 'OK' (0) response. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Put platform dependant crash handling code into crash-X.cc files, and linkzelgadis2009-01-221-4/+0
| | | | | | | against them in the make files like libunix/libgui/etc are. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8675 c06c8d41-db1a-0410-9941-cceddc491573
* UNIX/mgw tiles stubs for crash handler; stop-gap until it's made to use thezelgadis2009-01-181-0/+6
| | | | | | | same crash handling code as the console/ASCII version. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8546 c06c8d41-db1a-0410-9941-cceddc491573
* Setting all .h/.cc files in source to have a consistent keyword propset.ennewalker2009-01-041-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8218 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-09-281-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7054 c06c8d41-db1a-0410-9941-cceddc491573
* Improved Tile screen layout. Small screens get the message window overlaid ↵ennewalker2008-08-051-4/+0
| | | | | | on the dungeon. Even smaller screens get the graphics shrunk (and thus slightly blurry.) Added full screen options and several predefined layouts for older and newer Eee PC resolutions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6774 c06c8d41-db1a-0410-9941-cceddc491573
* Large tiles-related changes. Platform-specific rendering removed and ↵ennewalker2008-07-151-113/+18
| | | | | | replaced with SDL/OpenGL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 c06c8d41-db1a-0410-9941-cceddc491573
* Kill hard tabs, and add whitespace fixes.dolorous2008-06-261-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6158 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing assert problem due to wherex() inconsistency between tile and console ↵ennewalker2008-04-181-3/+2
| | | | | | | | versions. Removed jpeg's commented out code in the health bar drawing routine, as the reamining code is correct. (Thanks!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4339 c06c8d41-db1a-0410-9941-cceddc491573
* Fix X11 tiles build.dolorous2008-04-011-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4029 c06c8d41-db1a-0410-9941-cceddc491573
* Another huge code clean-up for tiles. At this rate, soon no linej-p-e-g2008-03-251-1/+0
| | | | | | | in the tile code will have been untouched. :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3874 c06c8d41-db1a-0410-9941-cceddc491573
* Introduce a temporary neutral brand for tiles because it was driving me nutsj-p-e-g2008-03-231-1/+2
| | | | | | | | | | | | when testing Ely's pacifying. (Currently only inappropriately reuses TILE_NEW_STAIR, which will have to be replaced with something more distinctive some time.) Also add an option for colouring neutrals on the minimap (defaults to red, like hostiles) and allow secondary item use by Ctrl-L-clicking on items in inventory (firing weapons, unwielding rods, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3830 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-1/+1
| | | | | | | | | | | | | | | Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+8
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles: allow direct selection of corpse to be butchered from floorj-p-e-g2008-01-211-0/+2
| | | | | | | or to drink blood from for vampires git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3313 c06c8d41-db1a-0410-9941-cceddc491573
* Fix non-tile compile of tutorial.cc (whoops!)j-p-e-g2008-01-191-2/+2
| | | | | | | | | | | Add messages when entering or leaving the level map ('X') in tiles. First attempts at outlining icons via cursor in tile tutorial. (Currently this only works for monsters, though I'm not sure why...) And some code clean-up for tiles and the tutorial. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3301 c06c8d41-db1a-0410-9941-cceddc491573
* Fix tutorial output for tile mode. For now, we simply suppressj-p-e-g2008-01-181-5/+5
| | | | | | | | output of ASCII item/monster symbols. Also, fix non-tile compile and add a few comments to tiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3298 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-0/+164
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573