diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-16 20:37:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-16 20:37:03 +0000 |
commit | 7e82b5651344d1083dec911a9ceda778ed2a420a (patch) | |
tree | 13a2b29cf03ccf357f5540718c5a0c1716c9e3c6 /crawl-ref/source | |
parent | 42bde3cb0caf63ea19cfca4237d957c86390b977 (diff) | |
download | crawl-ref-7e82b5651344d1083dec911a9ceda778ed2a420a.tar.gz crawl-ref-7e82b5651344d1083dec911a9ceda778ed2a420a.zip |
Apply my previous commits to trunk: fewer uses of m_dirty, and a
description for Sigmund.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9990 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dat/descript/monsters.txt | 13 | ||||
-rw-r--r-- | crawl-ref/source/tilebuf.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/tilereg.cc | 47 |
3 files changed, 43 insertions, 35 deletions
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt index fbe80dec0e..ada4d7b1d0 100644 --- a/crawl-ref/source/dat/descript/monsters.txt +++ b/crawl-ref/source/dat/descript/monsters.txt @@ -270,18 +270,7 @@ One of the most terrible denizens of the many Hells, this horrible being appears %%%% Sigmund -"But Sigmund turned him about, and he said: 'What aileth thee, son? - Shall our life-days never be merry, and our labour never be done?' - - But Sinfiotli said: 'I have looked, and lo, there is death in the cup.' - - And the song, and the tinkling of harp-strings to the roof-tree winded up; - And Sigmund was dreamy with wine and the wearing of many a year; - And the noise and the glee of the people as the sound of the wild woods were - And the blossoming boughs of the Branstock were the wild trees waving about; - - So he said: 'Well seen, my fosterling; let the lip then strain it out.'" - -William Morris, _The Story of Sigurd the Volsung and the Fall of the Niblungs. 1891. +The bane of all young adventurers, Sigmund combines delusions of greatness with nasty tactics. %%%% Snorg diff --git a/crawl-ref/source/tilebuf.cc b/crawl-ref/source/tilebuf.cc index 241673c02f..95b083dd7e 100644 --- a/crawl-ref/source/tilebuf.cc +++ b/crawl-ref/source/tilebuf.cc @@ -56,10 +56,10 @@ void VertBuffer<PTVert>::draw() const ASSERT(m_tex); GLState state; - state.array_vertex = true; + state.array_vertex = true; state.array_texcoord = true; - state.blend = true; - state.texture = true; + state.blend = true; + state.texture = true; GLStateManager::set(state); m_tex->bind(); @@ -80,8 +80,8 @@ void VertBuffer<PCVert>::draw() const GLState state; state.array_vertex = true; state.array_colour = true; - state.blend = true; - state.texture = false; + state.blend = true; + state.texture = false; GLStateManager::set(state); glVertexPointer(2, GL_FLOAT, sizeof(Vert), &(*this)[0].pos_x); @@ -99,11 +99,11 @@ void VertBuffer<PTCVert>::draw() const ASSERT(m_tex); GLState state; - state.array_vertex = true; + state.array_vertex = true; state.array_texcoord = true; - state.array_colour = true; - state.blend = true; - state.texture = true; + state.array_colour = true; + state.blend = true; + state.texture = true; GLStateManager::set(state); m_tex->bind(); diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index ace47f8066..0aa97e31b1 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -209,7 +209,10 @@ TileRegion::TileRegion(ImageManager* im, FTFont *tag_font, int tile_x, int tile_ dx = tile_x; dy = tile_y; m_tag_font = tag_font; +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } TileRegion::~TileRegion() @@ -789,15 +792,15 @@ void DungeonRegion::render() const char *str = m_tags[t][i].tag.c_str(); - int width = m_tag_font->string_width(str); + int width = m_tag_font->string_width(str); tag_def &def = tag_show(ep); const int buffer = 2; - def.left = -width / 2 - buffer; - def.right = width / 2 + buffer; - def.text = str; - def.type = t; + def.left = -width / 2 - buffer; + def.right = width / 2 + buffer; + def.text = str; + def.type = t; total_tags++; } @@ -1354,8 +1357,10 @@ void InventoryRegion::update_slot(int slot, InventoryTile &desc) } m_items[slot] = desc; - +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } void InventoryRegion::render() @@ -1532,7 +1537,7 @@ void InventoryRegion::pack_buffers() unsigned int InventoryRegion::cursor_index() const { ASSERT(m_cursor != NO_CURSOR); - return m_cursor.x + m_cursor.y * mx; + return (m_cursor.x + m_cursor.y * mx); } void InventoryRegion::place_cursor(const coord_def &cursor) @@ -1540,7 +1545,10 @@ void InventoryRegion::place_cursor(const coord_def &cursor) if (m_cursor != NO_CURSOR && cursor_index() < m_items.size()) { m_items[cursor_index()].flag &= ~TILEI_FLAG_CURSOR; +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } if (m_cursor != cursor) @@ -2067,7 +2075,10 @@ void MapRegion::recenter() // adjust offsets to center map ox = (wx - dx * (m_max_gx - m_min_gx)) / 2; oy = (wy - dy * (m_max_gy - m_min_gy)) / 2; +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } void MapRegion::set(int gx, int gy, map_feature f) @@ -2100,7 +2111,6 @@ void MapRegion::update_bounds() m_max_gy = 0; for (int x = min_gx; x <= max_gx; x++) - { for (int y = min_gy; y <= max_gy; y++) { map_feature f = (map_feature)m_buf[x + y * mx]; @@ -2112,16 +2122,18 @@ void MapRegion::update_bounds() m_min_gy = std::min(m_min_gy, y); m_max_gy = std::max(m_max_gy, y); } - } recenter(); +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } void MapRegion::set_window(const coord_def &start, const coord_def &end) { m_win_start = start; - m_win_end = end; + m_win_end = end; m_dirty = true; } @@ -2421,7 +2433,7 @@ void TextRegion::render() int idx = cursor_x + mx * cursor_y; unsigned char char_back = cbuf[idx]; - unsigned char col_back = abuf[idx]; + unsigned char col_back = abuf[idx]; cbuf[idx] = '_'; abuf[idx] = WHITE; @@ -2778,7 +2790,7 @@ void MenuRegion::place_entries() // NOTE: This is not perfect. Tiles will be drawn // sorted by texture first, e.g. you can never draw // a dungeon tile over a monster tile. - int tile = m_entries[i].tiles[t].tile; + int tile = m_entries[i].tiles[t].tile; TextureID tex = m_entries[i].tiles[t].tex; m_tile_buf[tex].add_unscaled(tile, m_entries[i].sx, m_entries[i].sy); @@ -2792,8 +2804,8 @@ void MenuRegion::place_entries() int text_sy = m_entries[i].sy; text_sy += (entry_height - m_font_entry->char_height()) / 2; - // Split menu entries that don't fit into a single lines into two - // lines. + // Split menu entries that don't fit into a single lines into + // two lines. if (Options.tile_menu_icons && text_sx + text_width > entry_start + column_width) { @@ -2913,6 +2925,8 @@ void MenuRegion::set_entry(int idx, const std::string &str, int colour, void MenuRegion::on_resize() { + // Probably needed, even though for me nothing went wrong when + // I commented it out. (jpeg) m_dirty = true; } @@ -2926,6 +2940,8 @@ int MenuRegion::maxpagesize() const const int more_height = (lines + 1) * m_font_entry->char_height(); // Similar to the definition of max_entry_height in place_entries(). + // HACK: Increasing height by 1 to make sure all items actually fit + // on the page, though this introduces a few too many empty lines. const int div = (Options.tile_menu_icons ? 32 : m_font_entry->char_height() + 1); @@ -2949,7 +2965,10 @@ void MenuRegion::set_more(const formatted_string &more) { m_more.clear(); m_more += more; +#if 0 + // Not needed? (jpeg) m_dirty = true; +#endif } TitleRegion::TitleRegion(int width, int height) : |