summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/drawgfx.cpp
Commit message (Collapse)AuthorAgeFilesLines
* digfx: mark gfx ram dirty after load state hap2025-01-031-49/+47
|
* Move some rendering code to constexpr (#7491) Romain TISSERAND2020-11-181-1/+1
|
* Get rid of a bunch of _Names - any name starting with an underscore followed ↵ Vas Crabb2020-08-251-6/+6
| | | | by an uppercase letter is reserved
* emu: correct some file headers (nw) hap2020-06-191-1/+2
|
* (nw) more misc cleanup: Vas Crabb2019-09-171-12/+12
| | | | | | * mark drawgfx core templates inline to prevent linker trying to coalesce them across compilation units, and hopefully encourage the compiler to specialise them when drivers call them with fixed argument values * make wraparound parameter for ROZ drawing functions bool - it's a simple true/false value * clean up spacing in a few places
* drawgfx.cpp: Attempted fix for -Wunused-lambda-capture errors (nw) AJR2019-09-161-2/+2
|
* drawgfxm.h: Rename to drawgfxt.ipp and replace the mega-macros with template ↵ AJR2019-09-161-178/+116
| | | | functions (nw)
* Eliminate extract_scanline8/16/32, replacing the scant existing usage with ↵ AJR2019-09-161-53/+0
| | | | std::copy_n (nw)
* Revert "Allow 16bpp gfxdecode (#5167)" R. Belmont2019-07-191-135/+73
| | | | This reverts commit a5e00faf88ec05d1705b9bc4796cc6f21f2cc7a9.
* Allow 16bpp gfxdecode (#5167) cam9002019-07-181-73/+135
| | | | | | | | | | | | | | | | | | * 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
* drawgfx.cpp : Updates cam9002019-06-041-15/+566
| | | | | | | | Move additive blending function into drawgfx.h, Add priority related copybitmap functions, Fix spacings Add priority related copybitmap and draw_scanline function is sprite like priority handling(prio_*) and tilemap like priority handling(primask_*), These are helpful for priority related bitmap / scanline drawing routines. drawgfxm.cpp : Add variations of priority related pixel draw functions, Fix spacings realbrk.cpp : Updates, Example usage for prio_copybitmap Simplify handlers, Use priority bitmap for sprite priority, Fix spacings, Use shorter / correct type values
* make rectangle work better with constexpr, change many things to use ↵ Vas Crabb2018-07-281-4/+2
| | | | designated getters/setters (nw)
* More cleanup/streamlining of machine configuration and macros: Vas Crabb2018-05-151-3/+0
| | | | | | | | | | | | | * 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.
* v9938, v9958: Convert to use RGB32 bitmaps AJR2017-11-051-0/+12
| | | | | - Palette has been retained mostly for the sake of the palette viewer, and now reflects the actual programmed values, rather than being a fixed RRRGGGBBB encoding plus a hacky mess for the V9958's YJK colors. - V9938-on-V9938 transparent overlay is fixed for meritm.cpp (was broken a few releases ago).
* drawgfx: Make the palette optional [O. Galibert] Olivier Galibert2017-05-281-4/+4
| | | | | | | | | | | | | | | | | | | | 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.
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* New device interface for palettes AJR2017-04-061-2/+2
| | | | | | - 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.
* Self-registering devices prep: Vas Crabb2017-02-271-1/+1
| | | | | | | | | | | | | | * Make device_creator a variable template and get rid of the ampersands * Remove screen.h and speaker.h from emu.h and add where necessary * Centralise instantiations of screen and speaker finder templates * Add/standardise #include guards in many hearers * Remove many redundant #includes * Order #includesr to help catch headers that can't be #included alone (nw) This changes #include order to be prefix, unit header if applicable then other stuff roughly in order from most dependent to least dependent library. This helps catch headers that don't #include things that they use.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-263/+263
| | | | | | | | | | | | * 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
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-261/+261
| | | | | 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
* More consistent use of integer types in tilemap_t and other graphics-related ↵ AJR2016-09-031-1/+1
| | | | | | classes (nw) - Define indirect_pen_t, requiring a slight reordering of emu.h due to an unsurprising dependency
* psikyosh.cpp/drawgfx.cpp - Fix debug asserts MT3753 Paul Priest2016-05-241-2/+0
| | | | Psikyosh uses bitmap_rgb32, but should really use argb32, but that requires overloading lots of drawgfx for this one driver. Removed assert was wrong and unavoidable. Fixed boundary condition tripping daraku as per MT3753.
* carjmbre: added sprites, preliminary hap2016-03-101-27/+0
|
* Pass and return palette devices by reference, not as pointers AJR2016-01-231-4/+6
| | | | | | - 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
* reverting: Miodrag Milanovic2016-01-201-1/+1
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* tags are now strings (nw) Miodrag Milanovic2016-01-161-1/+1
| | | | fix start project for custom builds in Visual Studio (nw)
* const-qualify source bitmaps in drawgfx Vas Crabb2015-12-141-21/+21
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-26/+26
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+2132