Fandom

Wikihack

Source:Qt clust.h

2,034pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Below is the full text to include/qt_clust.h from NetHack 3.4.3. To link to a particular line, write [[qt_clust.h#line123]], for example.

1.    /*	SCCS Id: @(#)qt_clust.h	3.4	1999/11/19	*/
2.    /* Copyright (c) Warwick Allison, 1999. */
3.    /* NetHack may be freely redistributed.  See license for details. */
4.    
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
5.    #ifndef clusterizer_H
6.    #define clusterizer_H
7.    
8.    #include <qrect.h>
9.    
10.   class Clusterizer {
11.   public:
12.   	Clusterizer(int maxclusters);
13.   	~Clusterizer();
14.   
15.   	void add(int x, int y); // 1x1 rectangle (point)
16.   	void add(int x, int y, int w, int h);
17.   	void add(const QRect& rect);
18.   
19.   	void clear();
20.   	int clusters() { return count; }
21.   	const QRect& operator[](int i);
22.   
23.   private:
24.   	QRect* cluster;
25.   	int count;
26.   	const int max;
27.   };
28.   
29.   #endif

Also on Fandom

Random Wiki