Commit Graph

19 Commits

Author SHA1 Message Date
hap
128640144a emu: correct some file headers (nw) 2020-06-19 12:38:41 +02:00
Vas Crabb
9a12ab37af Make osd_printf_* use util/strformat semantics.
(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.
2019-09-26 20:53:06 +10:00
R. Belmont
9b55ced1d2 Revert "Allow 16bpp gfxdecode (#5167)"
This reverts commit a5e00faf88.
2019-07-19 16:35:20 -04:00
cam900
a5e00faf88 Allow 16bpp gfxdecode (#5167)
* digfx.cpp : Add 16bpp case of RAW gfx layout
drawgfx.cpp, tilemap.cpp : Make changeable total elements of gfx_elements constructor at RAW case, Allow 16bpp gfxdecode, Fix spacing
tilemap.cpp : Allow 16bpp tilemap pen data
gstream.cpp : Use gfxdecode for 16bpp gfx of X2222, Fix spacing
igs017_igs031.cpp : Cleanup single sprite drawing routine
jedi.cpp : Improve debug gfxdecode viewer(text gfx)

* cps1.cpp : Minor fixes

* gstream.cpp : Fix regression in x2222
drawgfx.cpp : Fix 16bpp transparent pen

* gstream.cpp : Fix regression, Reduce unnecessary lines

* Sync to master
2019-07-18 10:17:11 -04:00
Vas Crabb
2332572800 More cleanup/streamlining of machine configuration and macros:
* Get rid of implicit prefix for GFX decode names and prefix them all
* Get rid of special macro for adding GFXDECODE in favour of constructor
* Make empty GFX decode a static member of interface
* Allow palette to be specified to GFXDECODE as a device finder
* Removed diserial.h from emu.h as it's used relatively infrequently

Also fix darkseal and vaportra propely.  The palette device
automatically attaches itself to a share with matching tag.  The correct
solution here is to rename one or the other out of the way, since it was
never attached to a share before.
2018-05-15 05:43:28 +10:00
wilbertpol
3b923d59cc destaticify initializations (nw) (#3289)
* destaticify initializations (nw)

* fix this->set_screen (nw)
2018-03-04 04:18:08 +11:00
Olivier Galibert
53feb420a4 drawgfx: Make the palette optional [O. Galibert]
device_gfx_interface does two things:
- go from a possibly weird rom layout to a one-byte-per-pixel tiled layout
- draw the tiles so created

The second part requires a palette, but the first doesn't.  And
low-level emulations of individual graphic chips (konami tilemap or
sprite generators for instance) are not supposed to care about the
palette.  They just output bits which are partly indexes into
palettes, and partly not, and in any case become pen ids only much
further in the rendering chain.  But they need access to the decoding
step, because one-byte-per-pixel is real nice..  So now such a device,
which inherits from device_gfx_interface, can call
set_palette_disable(true) and no palette tag will be required.
Calling the draw functions will segfault though.

As a side effect, the gfx_element constructor now takes a palette
pointer instead of a reference, since it's now optional.
2017-05-28 22:04:01 +02:00
AJR
8fe18e9ecc New device interface for palettes
- Create device_palette_interface, which takes over most functionality from palette_device except for the initialization/decoding routines and RAM interface.
- Update screen_device and device_gfx_interface to use a device_palette_interface object rather than a palette_device. This necessitates slight alterations to a few drivers and devices.
- Modify v9938 and v9958 to use the new device_palette_interface rather than a subdevice. This entails breaking a cyclic dependency between device_video_interface and screen_device for this case.
2017-04-06 11:30:40 +10:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
2016-11-19 05:38:48 +11:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
AJR
a237f50680 More consistent use of integer types in tilemap_t and other graphics-related classes (nw)
- Define indirect_pen_t, requiring a slight reordering of emu.h due to an unsurprising dependency
2016-09-03 10:01:39 -04:00
AJR
9b61eb0b6b Pass and return palette devices by reference, not as pointers
- Add screen_device::has_palette()
- Require device_gfx_interface::gfx() and palette() to access members
- Getters for atari_vad_device return devices as references, not pointers
2016-01-23 22:57:16 -05:00
Miodrag Milanovic
4e8e3066f8 reverting:
SHA-1: 1f90ceab07

* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-20 21:42:13 +01:00
Miodrag Milanovic
1f90ceab07 tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-16 14:54:42 +01:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00
Miodrag Milanovic
92f81361d6 Initial conversion of core to C++14. Note that compilers are now limited to GCC 4.9.0 and up, Clang 3.4.0 and up, and VS2013 and up [Miodrag Milanovic] 2015-12-03 11:40:45 +01:00
Miodrag Milanovic
0825ce4f3b Cleanups and version bump 2015-11-25 08:22:24 +01:00
Miodrag Milanovic
d1dc775f9b Some cleanups and init fixes with help of ReSharper C++ (nw) 2015-11-11 16:31:18 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00