Commit Graph

216 Commits

Author SHA1 Message Date
jacob1
5ee10d14e4 reduce unnecessary #include dependency chains
for example, elements no longer include Client.h or Graphics.h, and interface stuff won't include Window.h or Graphics.h unless requested
2017-07-13 23:24:35 -04:00
jacob1
c1e91260eb fix deco colors being 1 R/G/B value less than they should be
The proper way would be to divide by 255, but that is slower than >>8. This is a better approximation (or perhaps equivalent?)
2017-06-17 21:02:52 -04:00
jacob1
d4a0ff9ac8 draw_image can now draw images with x<0, fixes #433
this isn't used at all in the source
2017-06-11 22:01:11 -04:00
jacob1
0ea5c1d0e0 Fix #438
I didn't actually notice any difference with this change
2017-06-11 21:26:42 -04:00
jacob1
f54189a97f fix PHOT/PLSM not following the correct heat scale, fixes #336
Still many issues if you manually add on other effects to heat mode, but at least now the default graphics are fine
2017-05-09 22:43:53 -04:00
jacob1
ce054bfc3f fix misc. errors reported by clang static analyzer 2017-05-06 20:02:23 -04:00
LBPHacker
3fbfb83b0e Fix cache value from Lua graphics functions being ignored 2017-04-17 23:46:03 -04:00
jacob1
1af4fa912f fix debug portal lines to the highest ID particle not working, fixes #393 2017-04-08 09:54:45 -04:00
wolfy1339
b65e94900e Use C++ includes (#308)
Replaces stdio.h, stdlib.h, string.h, math.h, time.h, limits.h and othters with their C++ equivalents.
2016-07-17 23:37:24 -04:00
Simon Robertshaw
3b106b7c22 Crash fix for wall drawing when OpenGL is enabled. 2016-07-17 21:33:54 +01:00
Simon Robertshaw
5b525852b4 More OS X compatibility fixes with OpenGL 2016-07-12 22:34:31 +01:00
Simon Robertshaw
6cfaeb9c5c OpenGL UI fixes for on OS X/all platforms
- Reinitialise textures after SDL_SetVideoMode
 - Fix header includes and remove GLEW setup on OSX
2016-07-12 21:31:29 +01:00
jacob1
ce55c8e58b Fix --opengl-render option. Please NEVER use this option though 2016-05-14 09:44:49 -04:00
jacob1
13d3547211 Compiling fix for scons on windows
something is up with the pthreads library (dynamic compiles still broken), probably windows libraries all need to be recompiled and distributed separately like I did for visual studio
2016-03-12 00:36:11 -05:00
jacob1
7073c1bf9c remove unnecessary / broken if statements 2016-01-10 22:32:18 -05:00
jacob1
226a66a860 add ctrl+f shortcut to easily locate elements in red from my mod
doesn't support walls or better life finding because tools are much harder to work with here
2016-01-10 22:23:06 -05:00
jacob1
2ebc522c36 add ERASEALL wall from my mod (erases walls, particles, and signs) 2015-08-30 00:18:06 -04:00
jacob1
5caf8bc8e1 allow longer signs, add 'None' justification where the pointer line isn't drawn
signs have a longer width limit and hard 45 character limit from the textbox and when loading saves
2015-08-29 18:56:38 -04:00
jacob1
37f8038fcd fix freeze when hovering over a massive amount of portals 2015-07-15 00:20:00 -04:00
jacob1
f95db0278e really fix coordinates when placing stamps ... 2015-07-07 00:44:06 -04:00
jacob1
eb7aacc478 make walls less glowy, make streamlines less laggy, style improvements 2015-07-07 00:26:42 -04:00
jacob1
d67cb4b582 add new s: sign which does a save search
also change some searchController stuff to properly queue searches when one is already going on
2015-06-27 19:03:41 -04:00
jacob1
b1a3c404b6 fix platform / sconscript flag specific warnings, --no-warnings no longer defaults to true 2015-01-16 23:39:42 -05:00
jacob1
54d985f975 gcc warning fixes (up to lua files) 2015-01-16 17:26:13 -05:00
jacob1
dce874484a fix all the gcc warnings in the element files (except one in PSTN) + all the unused variable warnings 2015-01-10 22:43:33 -05:00
jacksonmj
236ff08da9 Fix some problems noted in http://www.viva64.com/en/b/0298/
I've left some of the less important items, like SearchView.cpp "'then' statement is equivalent to the 'else' statement", and RequestBroker::Request::~Request, because I don't feel like spending a few days entirely rewriting those files at the moment (which is what I'd end up doing if I started fixing minor problems and refactoring...)

GameSave::readOPS - not changed. At some point we may have to move to a larger type for element IDs (probably two or four bytes), but PT_NUM isn't likely to be raised to the maximum value of that type immediately, so this check will be needed then. There should be an elements[partsData[i]].Enabled check in there too, but it might be a bit difficult - I'm not sure how to access a Simulation object from GameSave::readOPS...

Notes on changes:

Graphics::textsize, Element_FRZW::Element_FRZW - typos

Button::Draw - the extra case was originally used to invert the icon (draw it in black instead of in white) when the button was clicked. However, the icon colour is now automatically set depending on the background colour. (Note similar conditions "if(Enabled) { if(isButtonDown || (isTogglable && toggle)) " near the start of the function - same logic but in a different place, setting icon colour indirectly).

Simulation::transform_save - unused redundant function, everything uses GameSave::Transform which does much the same thing.

PreviewView::NotifySaveChanged - should be height==YRES/2, it's checking whether the preview image is the correct size, and resizing it if it isn't.

Element_FWRK::update - no idea why that line was there, even though it was my commit that originally added it...
2014-12-25 17:09:35 +00:00
jacob1
16ce3a68c0 more jacksonmj suggestions: save edgeMode in saves, BVBR absorption fix, life saving fix, DEUT graphics change, PROT fix, SOAP graphics fix 2014-11-21 15:41:22 -05:00
jacob1
6ce2d5fe92 #define MAX_FIGHTERS + some fixes 2014-11-20 22:11:20 -05:00
jacob1
6463d04f6c fix a few of the most spammy warnings (there are still hundreds of warnings though)
TODO: actually fix all the warnings
2014-10-23 00:42:13 -04:00
jacob1
2140beb9cc make sure soap doesn't crash when messed with in the console 2014-08-25 19:05:32 -04:00
jacob1
d4359184f2 improve grid drawing 2014-08-11 22:06:48 -04:00
jacob1
986b25b508 redo spark graphics, add spark render setting 2014-08-11 21:56:40 -04:00
mniip
44405827b0 Make the upvote more fancy and bigger 2014-06-04 00:35:40 +04:00
jacksonmj
afacecffd9 Prevent clearrect wrapping round at the edge of the screen 2014-04-05 18:20:30 +01:00
jacob1
13766bf6db fix weird STKM bug at high life 2014-02-15 10:24:25 -05:00
jacob1
f66679e551 a little reorganization (maybe more later) 2014-01-20 13:52:53 -05:00
mniip
fdfaa3a29b add defines for window resolution
--amend
2013-12-29 20:12:50 +04:00
mniip
30c80220b2 fix PIXR() macro: if MSB of the color is nonzero, it used to return a >255 value, which, say, in Renderer.cpp would get clamped to 255, no matter what the actual red byte is 2013-12-14 22:25:11 +04:00
jacob1
0180c9b15a fix remaining warnings, fix compiling errors when using --release 2013-10-29 23:55:10 -04:00
mniip
bf908bbfbf Fix various warnings, remove silly useless NO_INLINE system, remove the need for -fkeep-inline-functions 2013-10-30 04:47:07 +04:00
mniip
f7f24a9804 D:^H^Hfix newlines at end of files 2013-10-30 04:41:04 +04:00
Simon Robertshaw
8f4296ac39 Spark sign tool, {b|sometext}, when the sign is clicked, the a spark will be created at the signs position. Also MouseDown events that draw particles from being triggered when clicking on a sign 2013-10-19 18:59:49 +01:00
mniip
8d96f3f6b6 fix segfault on wordwrapping a string with a character >=128 2013-09-06 13:09:24 +01:00
mniip
fea920d608 fix fixedRatio when VideoBuffer::Resize'ing, fixes #121 2013-09-02 18:03:43 +04:00
mniip
e2cb5838c6 specially per @savask's request, put matcher into a function
returns 0 if no match, returns position of pipe character if there is
2013-08-22 19:50:20 +04:00
mniip
5e1385324a remove regex in renderer 2013-08-22 17:08:53 +04:00
Saveliy Skresanov
b2045b0a7f Fix sign save/topic regex. 2013-08-22 18:43:46 +07:00
jacob1
cc887995c0 fix openGL compiling (most likely), fixes #146 2013-07-17 18:20:50 -04:00
jacob1
19e182ae42 add back rgba images in the local/server save uploads 2013-07-16 14:48:50 -04:00
jacob1
6f29926b96 deco menu button textures (not black) 2013-07-16 13:08:57 -04:00
jacob1
8d5fe459fe 'n' to toggle Newtonian Gravity, quickoption tooltips show which keys you need to press to toggle them 2013-07-15 13:09:19 -04:00
jacob1
864f0e6f45 WIFI lines aren't drawn in persistent mode, and are based on current temp, not tmp, so they work when paused 2013-07-13 12:06:43 -04:00
jacob1
3aac957e50 HUD displays the correct name of LIFE particles in the HUD, show mouse position in HUD on the edges of the screen 2013-06-20 20:29:20 -04:00
jacob1
5ad819efbd remove checks on location / element in the simulation drawing functions. fix drawing circles with an rx of 0. Probably fix compiling error 2013-05-15 21:10:22 -04:00
jacob1
2e409f966c gfx.draw/fillcircle 2013-05-14 16:39:20 -04:00
Simon Robertshaw
c2cdec9e62 Togglable lua scripting 2013-05-11 11:52:35 +01:00
Simon Robertshaw
e53f2bf0b5 Forward resample argument correctly from VideoBuffer resize method 2013-05-09 23:33:43 +01:00
Saveliy Skresanov
9893f59657 Fix "blow power" for stick man, disable rocket boots on E-hole. 2013-05-08 23:08:29 +07:00
jacksonmj
89a0603b53 Rocket boots for stickman, because why not
Pass through gravity wall to activate, fan wall to deactivate.
Accelerate with left/up/right keys. Plasma is spawned when accelerating,
and STKM is immune to plasma but not other hot elements when rocket
boots are enabled. Hold left+right to slow down quickly.
STKM spawn element is retained and can still be created while using
rocket boots, but it may be difficult to do anything useful with the
spawn element whilst spewing hot plasma everywhere.
2013-05-08 15:12:28 +01:00
jacob1
07486c9885 drawtext_outline to fix unreadable infotips, tooltips fade in and out (more like old tpt) 2013-05-04 23:03:59 -04:00
jacob1
3b7e418628 fix assert error when resampling an image to an invalid size (corrupted stamps) 2013-04-09 23:40:18 -04:00
Simon Robertshaw
9abe51526c Move all GUI source files into gui/ 2013-03-22 14:14:17 +00:00
Simon Robertshaw
0646b7fe41 Nicer resize method for VideoBuffer, fix Local and Server save previews 2013-03-16 11:20:11 +00:00
Simon Robertshaw
73b6ff4efb Use VideoBuffer in place of thumbnail 2013-03-15 12:59:55 +00:00
Simon Robertshaw
de680a1e5c Merge 2013-03-12 21:21:01 +00:00
Simon Robertshaw
e6bca489c9 AvatarButton/holder, rename ThumbnailBroker for more general purposes 2013-03-10 18:08:34 +00:00
jacob1
e6f6eedd13 fix empty signs being created when shifting them out of bounds, draw parts of images when it goes partway off the top of the screen. 2013-03-09 16:50:36 -05:00
jacob1
77d233240f fix mismatched malloc/delete[]'s when not using new image resampler 2013-03-07 22:14:00 -05:00
jacob1
037618e6f8 remove auto generated comments from all files, fix some missing tabs, remove unused variables from config.h 2013-03-06 12:05:59 -05:00
jacob1
17d79e8d8e fix crash when drawing particles in invalid coordinates (using console) 2013-03-03 15:38:52 -05:00
jacob1
01cd146ee9 fix mac compiling, fix renderer, fix other minor compiling issues 2013-02-14 23:31:31 -05:00
jacob1
dc6398a33e fix deco sample tool with 1 px brush, fix deco sample also sampling HUD/other text 2013-02-09 18:18:53 -05:00
jacob1
685bde5c21 blobby walls in blob view 2013-02-08 22:50:37 -05:00
jacob1
b8d53b5f76 fix sign box size, sign width with {t} and {p}, and zoom box size 2013-02-08 17:59:13 -05:00
jacob1
46b767da0c clear persistent effects when it's display mode is removed 2013-01-25 23:15:33 -05:00
jacob1
c5eecff131 fix "i" argument to graphics functions.
Also, they don't overwrite the default one, you can pass in nil to tpt.element/graphics_func for the function to restore the original.
2013-01-23 16:48:21 -05:00
jacob1
41751da619 change some free/malloc's back to delete/new's 2013-01-12 21:06:52 -05:00
jacob1
d1abfc313e fix mismatched free()/delete's 2013-01-06 18:26:38 -05:00
jacob1
1b2e7b3c70 fix Ctrl+x being one pixel off, better xor_rect from tpt, delete test.c 2013-01-04 13:54:25 -05:00
jacob1
2728cf852b fix WARP being invisible, make it visible in heat display mode though 2012-12-17 20:08:46 -05:00
jacob1
c62ef2cb35 fix upvote buttons still having colored background after clearing the save, make them look more like from in tpt 2012-12-15 20:34:00 -05:00
Simon Robertshaw
b4475ae96f Very high quality image resampling code curtesy of imageresampler (http://code.google.com/p/imageresampler/), will replace current shitty linear interpolation for SSE2 and renderer builds. 2012-12-15 01:04:17 +00:00
Simon Robertshaw
e08bc6680b Format: Buffer to pti, Save renderer 2012-10-29 09:36:16 +00:00
jacob1
d0b14dc64b don't render invalid elements 2012-10-26 15:12:35 +01:00
jacob1
71db872e64 {t:15100|text} to open a forum thread (will try to add more shortcuts later) 2012-10-05 16:30:55 +01:00
Simon Robertshaw
b97cf098b3 Draw walls behind particles 2012-09-30 22:41:50 +01:00
Simon Robertshaw
92dd8ac804 Fix case sensitive filename 2012-09-27 14:29:50 +01:00
Simon Robertshaw
b0b402d90e Improvement to some of the rendermode icons 2012-09-26 17:15:30 +01:00
jacob1
e418ca5ac3 fix minor memory problem with last commit 2012-09-26 16:46:10 +01:00
jacob1
95cc715d71 render preset buttons in render options interface, also shift + 1 life view shortcut
modify it if you don't like how it looks, but it turned out better than I expected
2012-09-26 16:46:03 +01:00
jacob1
5de2a4e479 Icon adjustments 2012-09-25 20:09:54 +01:00
jacob1
b57d956ca8 Icons and tooltips for everything in renderview. (Empty space not filled yet) 2012-09-25 20:09:43 +01:00
jacob1
4be80a3c7c Fix crash - uninitialized (and not needed) variable 2012-09-25 19:50:14 +01:00
Simon Robertshaw
25d872ec48 MacOS X targets for Scons, Fix some inlines for clang 2012-09-25 17:53:48 +01:00
jacob1
45ab8cca23 Add icons back to search buttons, fix positioning of them, disable my own / fav buttons when still loading saves 2012-09-16 12:06:53 +01:00
jacob1
eac109a563 fix possible crashes with save buttons and uninitialized renderer variables
Fixes second part of issue 179
2012-09-16 12:03:41 +01:00
Simon Robertshaw
3ed5672052 Render fire after wall drawing 2012-09-15 15:00:16 +01:00
Simon Robertshaw
3b2f4d59fc Better fire rendering for saves 2012-09-14 23:53:58 +01:00
Simon Robertshaw
5b52ac3675 Save history and new multiline formatter 2012-09-13 22:39:01 +01:00
jacob1
f8f70a3f77 Visual studio compatibility
This removes some inlines when using visual studio to compile, uisng TPT_NO_INLINE. It also fixes many other problems visual studio has with the code
2012-09-07 00:52:56 +01:00