summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/font/font_sdl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-3/+3
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-1/+1
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Much more core std::string_view modernization AJR2021-01-201-4/+4
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* Low-level #include overhaul AJR2021-01-021-1/+0
| | | | | | | - vecstream.h: Revert changes made in aa29519528cb3dbdbfac56819bea670ed8c56c5d. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h. - strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified. - osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments. - Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
* Cleaned up bitmap API. Vas Crabb2020-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-3/+3
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* Fix Solaris 2.11 (non-Oracle) Rick V2019-08-191-1/+1
|
* use standard types uintptr_t, char16_t and char32_t instead of FPTR, ↵ Miodrag Milanovic2016-10-221-2/+2
| | | | utf16_char, unicode_char (nw)
* fix sdl build. (nw) dankan18902016-04-211-1/+1
|
* Initial work to make MAME work on Android [Miodrag Milanovic] Miodrag Milanovic2016-03-271-1/+1
|
* Revert "Don't invoke VLA unnecessarily" Miodrag Milanovic2016-03-191-1/+1
| | | | This reverts commit 9a299f35f3d01113756a425561c4ed041f19ed39.
* Don't invoke VLA unnecessarily Vas Crabb2016-03-191-1/+1
|
* fix compile on 4.9.x (nw) Miodrag Milanovic2016-03-191-2/+3
|
* Slight simplification to the code Vas Crabb2016-03-191-4/+2
|
* Do single conversion instead of two (nw) Vas Crabb2016-03-171-3/+3
|
* Fix TTC loading (thanks for the tip, Sarayan) Vas Crabb2016-03-171-14/+29
|
* Implement couriersud's proposal to put style name in the config name for SDL ↵ Vas Crabb2016-03-171-43/+40
| | | | | | | fonts Enumerate available font styles as well as families Still has a problem in that TTC fonts are enumerated but can't be loaded by SDL_ttf
* Build more of font_sdl.cpp with Emscripten since there is an SDL2_ttf port ↵ Justin Kerk2016-03-171-8/+14
| | | | now (nw)
* Fix linux font loading. [Couriersud] couriersud2016-03-161-1/+1
|
* A lot of ttf fonts (including C/J/K fonts like unifont) do not have an couriersud2016-03-161-1/+2
| | | | | type attribute "Regular". This fix will load the first font found if no "bold" "bold italic" "italic" or "regular" attribute was found. [Couriersud]
* Fix drawing characters outside Unicode BMP with SDL Vas Crabb2016-03-171-67/+46
| | | | | | Font selection on Linux seems to be working provided you don't choose C/J/K fonts Selecting a C/J/K font causes MAME to give a black screen when dropping back to main menu Since fallback fonts aren't used, this means you can't use the Chinese/Japanese localisations with SDL font provider
* Move font enumeration to OSD, separate font name from display name as needed ↵ Vas Crabb2016-03-171-84/+115
| | | | for OSX
* Fixes for Linux Vas Crabb2016-03-141-3/+3
|
* Remove SDL 1.2 support (nw) Miodrag Milanovic2016-02-161-4/+0
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+361