Commit Graph

181 Commits

Author SHA1 Message Date
Rubidium b951332def Codechange: use smart pointers when creating StringIterators 2023-01-13 21:09:40 +01:00
Rubidium 752cd5c0da Cleanup 84b71f7: remove G5 detector as it's not referenced anymore
The last supported Mac OS X for G5 is 10.5.8 and support for < 10.7 has already been removed.
2023-01-04 22:42:23 +01:00
glx22 af3df959c2 Codechange: reduce code duplication 2022-12-23 23:23:03 +01:00
Peter Nelson daaa058493 Change: Vertically centre sprite font relative to TrueType font. 2022-12-18 11:46:01 -05:00
Peter Nelson 8599041ce4 Fix: GetDefaultFontHeight() is static, don't use -> 2022-12-18 11:46:01 -05:00
Peter Nelson 9666e46739 Feature: Variable GUI scale.
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2022-11-12 18:28:39 +00:00
Peter Nelson 062ea68422 Change: Scale position of font shadow. 2022-11-12 18:28:39 +00:00
Peter Nelson 2cdd8b7429 Change: Separate fontcache implementations. 2022-09-25 18:34:24 +01:00
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2022-09-25 18:34:24 +01:00
glx22 b6c5f49379 Change: add a timestamp in name of crash files 2022-02-02 21:32:01 +01:00
Danny de Bruijne 753b1d7e15 Feature: Add selected toolbar buttons to MacBook Pro Touch Bar 2021-09-23 21:03:00 +02:00
Michael Lutz 0d5d3083bd Codechange: [OSX] Use more exact enum names where introduced with the 10.12 SDK.
The enum values still have the exact same numerical values, but the 10.12
SDK introduced more explicit names (e.g. like NSEventTypeApplicationDefined
instead of NSApplicationDefined) for several enum constants.
Use them when available.
2021-06-22 21:09:37 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Patric Stout bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT (#9313) 2021-05-30 10:40:03 +02:00
rubidium42 77330d09fd Codechange: move font settings to std::string 2021-05-13 23:13:17 +02:00
Michael Lutz 13011e00c6 Fix #8860: [Win32] Crashlog window wasn't reliably shown for crashes not on the main thread. 2021-03-13 22:09:05 +01:00
Michael Lutz 6776229047 Codechange: Make the simple Malloc sprite allocator globally usable. 2021-02-22 22:16:07 +01:00
Michael Lutz 70aa3b4011 Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information. 2021-02-22 22:16:07 +01:00
Michael Lutz b66e977acd Change: [OSX] When auto-detecting a font, try for sans-serif first.
On a display, especially with small fonts or low pixel sizes, sans-serif
fonts are usually easier to read than serif fonts.
2021-02-14 11:48:58 +01:00
Michael Lutz 6755ff63e1 Add: [OSX] Native font rendering without using FreeType. 2021-02-14 11:48:58 +01:00
Michael Lutz 23389e9491 Remove: [OSX] Startup splash screen.
It wasn't displayed anyway as it was never copied to the bundle.
2021-02-13 22:21:17 +01:00
Michael Lutz f2294851e6 Codechange: [OSX] Move OSX-specific font code to a separate file. 2021-02-13 20:09:14 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Michael Lutz 6ad5489d01 Codechange: [OSX] Silence some annoying warnings. 2021-01-03 13:25:32 +01:00
Michael Lutz 9ccef816f9 Codechange: [OSX] Re-arrange the OSX video driver code by combining all drawing code and moving the window/event handling to a different file.
This is just a code move/rename, not a functionality change.
2021-01-03 13:25:32 +01:00
Michael Lutz 8c24b2b6ce Fix: [OSX] Fonts loaded directly from a file have to be registered with CoreText for proper text layout. 2021-01-03 01:00:28 +01:00
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Michael Lutz e9294ce4e3 Cleanup: [OSX] Mop up some remaining stuff catering to compiling with very old SDK versions. 2020-04-12 18:44:43 +02:00
Michael Lutz 9d7ad67c1d Codechange: [OSX] Allow compiling with SDK version pre 10.9. 2020-04-12 18:44:43 +02:00
glx dbbd0f5ddc Fix: [OSX] Don't show a crash/assertion message box for a GUI-less video driver. 2020-01-12 22:02:10 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Michael Lutz d5a9bd404a Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply memory management of Core Foundation types. 2019-11-01 22:32:53 +01:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Michael Lutz 61d6fa97cc Fix: [OSX] Wrong allocator usage for creating a CFString. 2019-09-29 20:31:48 +02:00
uvealonso ead772324e Fix #7704: [OSX] Handle malformed UTF8 strings 2019-09-01 14:01:52 +02:00
Transportman 7ef2f11c4c Fix #7570: Show Github URL in the crashlog window 2019-05-04 19:54:32 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Michael Lutz baf9229931 Codechange: Replace AutoDeleteSmallVector with direct std::vector use in text layout code. 2019-04-09 22:45:15 +02:00
Michael Lutz 329bb52613 Codechange: Store text layout runs directly as values in a std::vector instead of heap allocated.
This reduces memory allocations and heap fragmentation.
2019-04-09 22:45:15 +02:00
Michael Lutz fbc4cef180 Codechange: Use override specifier for text layout classes. 2019-04-09 22:45:15 +02:00
Michael Lutz 967b27a2c1 Codechange: C++11 STL has a function for getting the number of CPU cores. 2019-04-06 11:27:39 +02:00
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Michael Lutz 32ce1ce347 Add: [OSX] Text layout using the native CoreText API.
By default, the native API will be used instead of ICU, but if ICU is
forced in using configure, it will take precedence.
2018-12-08 20:13:27 +01:00
Michael Lutz 4bf216993a Add: [OSX] Native text caret handling. 2018-12-08 20:13:27 +01:00
Michael Lutz 8d7cd6a526 Add: [OSX] Native natural sort implementation. 2018-12-08 20:13:27 +01:00
Michael Lutz 6c3902ac41 Codechange: [OSX] Use newer APIs to get resolution information when available. 2018-04-10 23:30:01 +02:00
Michael Lutz f670277ff5 Codechange: [OSX] Try to set the thread name for debugger display. 2018-04-10 23:30:01 +02:00
Michael Lutz 4971678f52 Codechange: [OSX] Use 10.10+ API to get the OSX version when available. 2018-04-10 23:30:01 +02:00
Michael Lutz 74b7f0a9aa Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers. 2018-04-10 23:30:01 +02:00
michi_cc 94b3965989 (svn r27675) -Fix [FS#6502]: [OSX] Building with 10.11 or 10.12 SDKs. 2016-10-31 19:29:01 +00:00
planetmaker bcb9c64ac8 (svn r26709) -Fix (r15892 and others) [FS#6069]: [OSX] Compilation fails with some lzo2 versions if we define __LP64__ as 0 instead of checking whether it is defined (kernigh2) 2014-07-30 20:19:29 +00:00
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 2014-04-23 20:44:42 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 2014-01-02 22:41:58 +00:00
michi_cc dce0951fdc (svn r25913) -Fix: [OSX] Compilation under OSX 10.9. (zydeco) 2013-10-26 17:20:48 +00:00
michi_cc 8b476de3bf (svn r25666) -Feature [FS#4760]: [OSX] Pinch gesture support for zooming. (Based on patch by leecbaker) 2013-08-05 20:36:17 +00:00
michi_cc 3569a4fe5a (svn r25663) -Fix [FS#4857]: [OSX] Monospace font detection. 2013-08-05 20:36:06 +00:00
planetmaker 1024fd3116 (svn r25643) -Fix (r25480): [OSX] Define version constants before they're used 2013-07-31 18:50:01 +00:00
michi_cc 0150ab1bb2 (svn r25480) -Codechange: [OSX] OS X SDK versions >= 10.5 always have a non-const iconv declaration. 2013-06-26 21:17:09 +00:00
rubidium 8f9d213675 (svn r25474) -Fix [FS#5618]: OS X compilation failure 2013-06-26 15:02:16 +00:00
yexo 1f75f81a41 (svn r24524) -Fix [FS#5296]: fix some compile problems in mac-only code (__ln__) 2012-09-13 18:42:33 +00:00
yexo b4fdba2fb3 (svn r23490) -Add [FS#2750]: OpenBrowser function to open a browser on major OSes 2011-12-11 11:47:08 +00:00
michi_cc a0f3649c1a (svn r23481) -Add: Function to get the CPU core count. 2011-12-10 16:54:41 +00:00
rubidium 2ccbd2a6f5 (svn r23446) -Codechange: move _cur_palette and it's related first/count dirty variables into a single structure 2011-12-08 18:13:29 +00:00
truebrain 160bfd8851 (svn r23376) -Remove: on popular demand, remove my (revoked) name from comments in the code. It was silly to name me like that to begin with ;) (based on patch by HackaLittleBit) 2011-11-30 01:22:18 +00:00
truebrain c2398c0fe1 (svn r23356) -Fix: some OSX versions have ScriptOrder defined 2011-11-29 23:15:48 +00:00
rubidium 39eaf0e10d (svn r22913) -Fix [OSX]: make splash work again and make it work without needing to bundle it first 2011-09-09 20:28:48 +00:00
planetmaker bce482c76f (svn r22893) -Fix [FS#4744]: [OSX] Compilation on OSX 10.7 was broken (based on patch by leecbaker)
-Add: [OSX] Support for fullscreen mode when compiled against SDK 10.7. Otherwise fullscreen mode is disabled when OpenTTD is run on OSX Lion
2011-09-04 17:49:08 +00:00
planetmaker 09c3cabc1e (svn r22833) -Fix (r18006): Compilation on OSX was broken 2011-08-24 21:26:03 +00:00
planetmaker e3d9879690 (svn r22678) -Doc: More doxygen sprinkles in MacOSX code and cocoa video driver 2011-07-21 16:13:34 +00:00
rubidium 59e42ea178 (svn r22177) -Fix: make sure the right endianness is chosen with cross-compiling, and strndup is available in the binary for more exotic platforms 2011-03-03 21:43:24 +00:00
alberth f65a9a5515 (svn r21593) -Codechange: endif comment correcttions. 2010-12-22 10:50:32 +00:00
rubidium 671158acd8 (svn r21150) -Fix: [OSX] Deprecation warning with libpng 1.4 2010-11-12 12:00:03 +00:00
frosch 7f5f4950d7 (svn r20859) -Fix [FS#4143]: Remove an outdated comment and just reference the readme. (planetmaker) 2010-09-30 18:58:56 +00:00
alberth ee01ec9136 (svn r20291) -Codechange: Unify break coding style. 2010-08-01 21:19:49 +00:00
alberth a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
smatz 9fc910fbc2 (svn r18855) -Codechange: record compiler name and version in the crash log 2010-01-18 10:11:27 +00:00
rubidium 251ffaa000 (svn r18831) -Change [FS#3537]: do not go into the crashlog handler in case loading a savegame misses with missing NewGRFs. This way the load game crash handler gets better visibility and the user is instructed to find the missing NewGRFs before filing a bug report 2010-01-16 19:08:33 +00:00
smatz b0c370c7e5 (svn r18158) -Codechange: add crash screenshot for OSX 2009-11-18 01:00:01 +00:00
michi_cc 32c6633bef (svn r18074) -Fix [FS#3314]: [OSX] Don't link clipboard support twice when building without Cocoa. 2009-11-14 15:26:43 +00:00
smatz 433fc04921 (svn r17872) -Codechange: apply coding style to splash.cpp
-Fix (r17871): missing variable declaration
2009-10-25 17:55:13 +00:00
smatz 002f9c0075 (svn r17871) -Fix (r11342): memset() accepts only 1-byte argument 2009-10-25 17:36:24 +00:00
michi_cc c850647e3a (svn r17792) -Fix [FS#3261]: [OSX] Fix (bogus) compiler warnings related to printf argument checking. 2009-10-17 22:36:35 +00:00
michi_cc 53ce152c7e (svn r17767) -Fix [FS#3190]: [OSX] Don't check 64bit-ness when compiling strgen. 2009-10-12 00:19:07 +00:00
michi_cc 9b54d5bbd7 (svn r17713) -Cleanup: [OSX] Move variable definitions to first use and apply more coding style. 2009-10-04 21:36:17 +00:00
michi_cc 8484e08ee0 (svn r17711) -Codechange: [OSX] Don't use deprecated methods to construct a Cocoa string. 2009-10-04 21:33:31 +00:00
michi_cc 049d62b35c (svn r17708) -Feature [FS#2053]: [OSX] Implement clipboard support for OS X. 2009-10-04 21:08:38 +00:00
michi_cc 5f67762a7f (svn r17706) -Codechange: [OSX] Rework the crash handling to use the common CrashLog infrastructure. 2009-10-04 21:08:30 +00:00
michi_cc 4f98178fcd (svn r17705) -Fix: [OSX] Re-enable signal handling on OSX 10.3.9. Trying to link with an undefined symbols that lives in the system library seems to confuse the loader on 10.3.9. Use a different function to circumvent it. 2009-10-04 21:08:25 +00:00
michi_cc e2ef24919e (svn r17704) -Codechange: [OSX] Improve detection of OS X version. (planetmaker) 2009-10-04 20:53:30 +00:00
michi_cc 10ca710e98 (svn r17702) -Change: [OSX] Assure that the minimal OSX version is defined in all cases.
-Codechange: [OSX] Improve conditional defines for OS version dependant code.
2009-10-04 20:53:22 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 6f0d8acf55 (svn r16828) -Codechange: attempt at making OSX compile with the 10.6 SDK too; no guarantees ofcourse... 2009-07-14 17:16:32 +00:00
rubidium e3c7a77b40 (svn r16827) -Codechange: make OSX specific files include stdafx.h always as the first file. Also unify OSX specific stuff into osx_stdafx.h and remove unused includes. 2009-07-14 16:43:45 +00:00