Commit Graph

306 Commits

Author SHA1 Message Date
rubidium
ca1f8fbe2e (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 2008-04-18 04:37:06 +00:00
rubidium
2752568d61 (svn r12749) -Codechange: store the viewport information in the windows that have a viewport instead of one global array with a viewport for each window, even when they do not use the viewport. 2008-04-17 09:42:44 +00:00
rubidium
61074c4bf8 (svn r12741) -Codechange: do not allocate the viewport drawer each time on the stack, but only once and reuse this. 2008-04-16 21:06:21 +00:00
rubidium
34f4150b15 (svn r12740) -Codechange: use a vector instead of allocating memory in a byte array for ChildScreenSpriteToDraw. 2008-04-16 20:39:35 +00:00
rubidium
1eac80f840 (svn r12739) -Codechange: use a vector instead of allocating memory in a byte array for ParentSpriteToDraw. 2008-04-16 20:01:04 +00:00
smatz
71ebefbbd7 (svn r12738) -Fix (r12736): some sprites could be left unsorted 2008-04-16 19:36:30 +00:00
peter1138
efdf8b8c8a (svn r12737) -Codechange: Replace vector with a cut down class to allocate space as necessary. This avoids copying data around for vector's push_back() function. 2008-04-16 19:01:09 +00:00
rubidium
47365fee11 (svn r12736) -Codechange: a (small) touch of coding style in viewport.cpp. 2008-04-16 18:28:05 +00:00
rubidium
878a7c9ab1 (svn r12735) -Codechange: use a vector instead of allocating memory in a byte array for TileSpriteToDraw. 2008-04-16 14:18:15 +00:00
rubidium
26dcf25238 (svn r12734) -Codechange: use a vector instead of allocating memory in a big byte array for StringSpriteToDraw. 2008-04-16 14:15:00 +00:00
rubidium
8ab49198b9 (svn r12695) -Codechange: only allocate window structs when needed. Based on a patch by Alberth. 2008-04-13 19:25:14 +00:00
smatz
fcf4a7067d (svn r12547) -Feature: invisibility options to make objects invisible instead of transparent 2008-04-03 19:55:40 +00:00
rubidium
571ba97f56 (svn r12536) -Codechange: some stack allocations were too large for NDS, so use the SmallStackSafeStackAlloc wrapper. Allocate on the stack by default and on the heap for NDS (or other devices that have a very small stack). 2008-04-01 21:12:51 +00:00
rubidium
b488fe1929 (svn r12501) -Codechange: split signs.h. 2008-03-31 07:25:49 +00:00
rubidium
c51b81c247 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 2008-03-31 00:06:17 +00:00
rubidium
5ab921feaa (svn r12439) -Fix [FS#1871]: do not 'disable' the drawing of autorail overlays when the tile is 'error'-marked (red pulsating selection). Patch by Icosikai. 2008-03-27 14:10:09 +00:00
smatz
d7a72c7002 (svn r12166) -Fix [FS#337]: when drag&drop mode was cancelled by keyboard input, depot/group window wasn't updated (original patch by GrimRC) 2008-02-17 12:21:05 +00:00
belugas
6c93216641 (svn r12140) -Codechange: A bit of code style fixes(Geektoo). 2008-02-14 15:13:36 +00:00
rubidium
bdadefd0d2 (svn r12044) -Fix [FS#1741]: crash when centering on a vehicle (aircraft) that is outside of the map. 2008-02-02 21:09:05 +00:00
frosch
d4dc5e0775 (svn r11983) -Codechange: Add some helper functions for slopes and use them. 2008-01-25 15:47:58 +00:00
rubidium
9c0c798dd8 (svn r11834) -Codechange: only include settings_type.h if needed. 2008-01-13 14:37:30 +00:00
rubidium
90acd52f22 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
rubidium
2fc62eab05 (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium
c004cc1fd9 (svn r11801) -Codechange: remove some unneeded includes from some header files. 2008-01-09 21:27:39 +00:00
rubidium
64d691bacc (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 2008-01-09 09:45:45 +00:00
rubidium
722613f7f3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
rubidium
f82aeb82c5 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 2007-12-26 11:45:43 +00:00
rubidium
507463e420 (svn r11684) -Codechange: split gfx.h in a type and functional header. 2007-12-23 10:56:02 +00:00
rubidium
1f6043458c (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00
rubidium
3074bca136 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 2007-12-21 22:50:51 +00:00
rubidium
8427b8bad2 (svn r11675) -Codechange: split the string types from the string functions. 2007-12-21 19:49:27 +00:00
rubidium
8bfbfd0031 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 2007-12-19 19:44:29 +00:00
rubidium
8ce9c5f29b (svn r11643) -Codechange: conform with the coding style for the WP macro uses. 2007-12-16 10:54:08 +00:00
rubidium
2160338662 (svn r11629) -Fix [FS#1527]: many viewports could crash the scenario editor. 2007-12-13 18:46:04 +00:00
glx
b00f621239 (svn r11588) -Codechange: use the new member introduced in r11551 2007-12-07 18:05:49 +00:00
rubidium
92cb0e45ca (svn r11555) -Codechange: use the new members introduced in r11551. 2007-12-02 14:29:48 +00:00
skidd13
f56579e0d9 (svn r11526) -Codechange: Rename the function delta fitting to the naming style 2007-11-26 16:01:29 +00:00
skidd13
815b8d8df1 (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 2007-11-24 10:38:43 +00:00
rubidium
6c027d98b9 (svn r11507) -Fix [FS#1463]: signs totally illegible when transparant signs is turned on and zoomed out more than one level. 2007-11-24 09:27:20 +00:00
skidd13
3ae50673a3 (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13
6801cceda1 (svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style 2007-11-19 21:32:20 +00:00
skidd13
c0a2c0c23e (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
skidd13
f4a5c80d71 (svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define 2007-11-19 18:58:04 +00:00
skidd13
98f66552be (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 2007-11-19 18:38:10 +00:00
smatz
32802f863b (svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode 2007-11-18 23:13:53 +00:00
smatz
001179990d (svn r11465) -Fix: more user-friedly placement in X and Y directions (most noticeable with autoroad) 2007-11-18 20:05:44 +00:00
smatz
d749fda9e4 (svn r11456) -Fix [FS#1412] (r10070): Viewport is bound to its top-left corner 2007-11-18 13:13:59 +00:00
rubidium
ecdb16de42 (svn r11440) -Codechange: replace magic numbers with enumified WindowHighlightMode constants. Patch by SmatZ. 2007-11-15 18:28:00 +00:00
rubidium
c5a9fd4559 (svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ. 2007-11-15 18:21:59 +00:00
belugas
f26a591e6c (svn r11399) -Feature(ette): transparency settings can now be saved and thus remembered.
-Codechange: Wrap all transparency settings in accessors, hiding the implementation
-Change: Clicking "transparent building" menu will toggle Houses And Trees only.  The other options can be used in the transparency gui.
Initial patch by Smatz (FS#1349), with some rework by BigBB and your humble servant.
2007-11-10 01:17:15 +00:00
belugas
e2c0f1faf7 (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
2007-11-04 00:08:57 +00:00
rubidium
410b4fae00 (svn r11318) -Codechange: add the actual support for drawing selections on halftiles, r11316 just added the things needed to load the sprites. Patch by frosch. 2007-10-20 20:25:43 +00:00
rubidium
99266a173c (svn r11313) -Codechange: prepare several pieces of code so the can handle some new slopes. Patch by frosch. 2007-10-20 16:50:48 +00:00
rubidium
8b5b748029 (svn r11261) -Codechange: Draw selection sprites (HT_RECT, HT_POINT, HT_RAIL) on foundations as ChildSprite of the foundation, not as single ParentSprite. Patch by frosch. 2007-10-14 19:57:15 +00:00
rubidium
d92dbbb029 (svn r11212) -Codechange: add support for drawing parts of sprites. Patch by frosch. 2007-10-05 21:49:15 +00:00
rubidium
c30544f8bc (svn r11210) -Codechange: unify the way that selection sprites are drawn. Patch by frosch. 2007-10-05 19:57:20 +00:00
rubidium
7adec5da36 (svn r11190) -Fix: make snowy roofs of (newgrf) houses also transparent. 2007-09-30 19:33:40 +00:00
rubidium
d464d7587d (svn r11174) -Codechange: add possibility to show the bounding boxes of sprites using CTRL-B so one can get a better understanding of the used bounding boxes to fix the glitches that still exist. Patch by frosch.
Note that this is not completely glitch free, bounding boxes sometimes aren't removed properly. This is due to the fact that the bounding boxes sometimes are larger than the sprite, which causes a smaller part than the bounding box to be redrawn. This is NOT a bug, but a known implementation limit as we do not want to slow down normal games so the debug graphics are always 100% correct.
2007-09-26 19:27:29 +00:00
rubidium
db769e490c (svn r11147) -Fix [FS#1247] (r11105): reallow bounding boxes with x/y/z-extent 0. Some NewGRFs need them. Patch by frosch. 2007-09-23 09:37:25 +00:00
rubidium
5c9553d48b (svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch. 2007-09-19 16:36:42 +00:00
rubidium
9478b2cff8 (svn r11105) -Codechange [FS#1223]: add some support for tuning of the bounding boxes for some special cases (like tunnels and bridges). Patch by frosch. 2007-09-14 21:54:57 +00:00
rubidium
f68051d19b (svn r11104) -Fix: bounding boxes also overlap when the min of a bounding box is equal to the max of another bounding box. Patch by frosch. 2007-09-14 21:36:59 +00:00
rubidium
b62d995ce8 (svn r11103) -Codechange: remove pointless comparison as it can never ever be true (unless you've got at least 3 bit errors and then you're screwed anyway). Patch by frosch. 2007-09-14 21:35:22 +00:00
belugas
5ec047d6b7 (svn r11094) -Documentation: Add comments on viewport structures and change an obscure variable name to something a little more meaningfull.
Heavily based of frosch's work (FS#1223)
2007-09-13 15:51:50 +00:00
rubidium
0ca9fd7dc2 (svn r11065) -Documentation [FS#1186]: of the dirty marking/repainting subsystem. Patch by Progman. 2007-09-09 10:13:17 +00:00
rubidium
732845440a (svn r11011) -Fix [FS#1129]: GetFirstVehicleInChain did change the game state while being marked const.
-Codechange: do not brute force determine the first vehicle in the chain or previous vehicle, but do it by properly accounting the previous and first pointers when updating the next pointer. This gives a performance increase of about 15% when there are a lot of vehicles in the game.
2007-08-30 21:11:12 +00:00
rubidium
a6a9968d16 (svn r10997) -Codechange: unify the vehicle view window. Patch by PhilSophus. 2007-08-29 20:50:58 +00:00
rubidium
a26ef1ee3a (svn r10696) -Codechange: remove duplication of the "make sprite transparent" code. 2007-07-26 14:07:11 +00:00
rubidium
7fe3635cdb (svn r10684) -Codechange: some more coding style related changes. Primarily moving { to a new line. 2007-07-25 00:16:30 +00:00
belugas
3a46ed0dd4 (svn r10343) -Cleanup: Add documentation of functions and code-style fix.
Thanks of 45 degree patch for bringing it up
2007-06-26 16:58:40 +00:00
peter1138
2d6f6c9dfa (svn r10334) -Fix [FS#937]: with smooth scrolling enabled, the viewport destination was not clamped to the map 2007-06-25 21:50:36 +00:00
peter1138
97a2f5bf2a (svn r10321) -Codechange: refer to sign text by index 2007-06-25 10:40:56 +00:00
rubidium
328d369f64 (svn r10262) -Fix (r10258): some places that needed to be changed to uint64 were hidden/forgotten, which caused memory corruptions and that in caused all kinds of assertions to trigger. 2007-06-21 19:08:47 +00:00
truelight
79cd3f5db0 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
 Note: this allows much easier adding other types of video-drivers, like OpenGL
2007-06-17 20:30:28 +00:00
truelight
0e53fd6d32 (svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
-Add: added NULL blitter and renderer, which are always used for -vnull
-Add: dedicated driver doesn't blit nor render by default. Can be overruled by user. (-D -b 8bpp-optimized)
-Remove: removed CTRL+D from win32, which is incompatible with above
-Add: extended screenshot support for PNG and BMP
-Codechange: remove all hardcoded 8bpp references and replace them with more dynamic ones
-Codechange: minor stuff in blitters
2007-06-12 20:24:12 +00:00
maedhros
c186f91cbd (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
2007-06-11 14:00:16 +00:00
truelight
05e2bd2793 (svn r10093) -Revert: removed 16x zoom-out as it is broken beyond repair 2007-06-11 11:59:36 +00:00
peter1138
f8120ef5a0 (svn r9963) -Fix (r9962): 'smooth_scroll' patch setting was ignored (always on) in some places. 2007-05-28 17:07:19 +00:00
peter1138
2851f58efa (svn r9962) -Feature: Add smooth viewport scrolling. This must be enabled with patch setting 'smooth_scroll' 2007-05-28 16:46:16 +00:00
maedhros
1a9d43ff40 (svn r9900) -Codechange: Separate the variables for how to highlight a land area and what to do with it afterwards. 2007-05-23 12:45:56 +00:00
truelight
ecb8585bd4 (svn r9885) -Fix r9846: some last bitshifts with zoom-levels that were forgotten
-Fix r9846: initialize the zoom level for 'screen', as assuming 0 is not correct
2007-05-19 23:52:04 +00:00
truelight
d2c750b2c9 (svn r9884) -Feature: 2 new zoom-out levels: 8 times and 16 times
-Codechange: unified the blitter function so we have 1 function for all zoom-levels
-Codechange: make most of the label functions work with zoom-level instead of magic numbers and big switches per zoom-level
-Codechange: MakeXXXDirty() functions didn't take into account zoom-level, but just used the biggest possible value
-Codechange: simplified blitter functions to avoid code duplication
2007-05-19 22:48:04 +00:00
truelight
b605f68631 (svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
2007-05-15 16:08:46 +00:00
truelight
dc191785db (svn r9844) -Codechange: replace zoomlevel with an enum
-Codechange: use predefined enums for viewport zoomlevels
2007-05-15 14:08:39 +00:00
peter1138
e4ada15d49 (svn r9805) -Codechange: Use HASBIT() et al for display options bits. 2007-05-07 11:24:23 +00:00
rubidium
7577954ced (svn r9672) -Cleanup: lots of coding style fixes around operands. 2007-04-18 22:10:36 +00:00
belugas
0eaa72e324 (svn r9665) -Documentation: Doxygen corrections,errors, corrections of corrections... 2007-04-18 00:41:09 +00:00
maedhros
3d81de8d7e (svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist. 2007-04-12 13:07:15 +00:00
peter1138
d3ae1421fa (svn r9596) -Fix (r9563): (non-)transparency of station signs was confused with building transparency... 2007-04-11 20:13:32 +00:00
belugas
faad091b8f (svn r9580) -Documentation: Correction of doxygen function declarations 2007-04-09 15:06:24 +00:00
peter1138
51d72c11c8 (svn r9563) -Feature: Add more finer control to transparency options, including a new toolbar, accessible from the map menu or Ctrl X. Patch by Wolf01. 2007-04-05 07:49:04 +00:00
belugas
45b0c8042f (svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that... 2007-04-04 04:08:47 +00:00
rubidium
979ccd45ba (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium
4169bfba06 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
belugas
b1b5aecae9 (svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style 2007-02-23 01:48:53 +00:00
tron
053e2ddda5 (svn r8841) -Fix
Remove {,u}intswap() and replace them by Swap()
2007-02-22 08:43:02 +00:00
rubidium
c4ff0121c4 (svn r8808) -Fix [FS#631]: do not show the 'edit sign' window for spectators. 2007-02-19 10:13:51 +00:00
bjarni
d40886903d (svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
  Surprisingly this can be done without changing the savegame format
2007-02-07 19:10:19 +00:00
rubidium
2a9851a3ad (svn r8511) -Codechange: make WindowClass an enumerated value. 2007-02-01 15:49:12 +00:00
tron
81e88a2a7c (svn r8276) -Fix
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
2007-01-19 11:47:48 +00:00
Darkvater
5f06f6796d (svn r8133) -Fix [FS#535]: "out of sprite memory" warning messages due to incorrect assumption of requested memory for sprites (smatz) 2007-01-14 21:50:56 +00:00
peter1138
ca9843424b (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, 
effectively nulling the old sprite limit. Table changes in next commit.
2007-01-14 19:57:49 +00:00
celestar
c56ee62ade (svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation 2007-01-11 12:32:10 +00:00
celestar
08de6b082a (svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max(). 2007-01-11 11:05:01 +00:00
rubidium
a7d0cdf95f (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 2007-01-10 18:56:51 +00:00
KUDr
07c30785ab (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 2007-01-10 18:12:09 +00:00