summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/tilemap.h
Commit message (Collapse)AuthorAgeFilesLines
* emu/tilemap.cpp : Simplify handlers cam9002019-04-241-10/+10
|
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+1
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-1/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* Bac06 - remove camel case, remove mapping hack in favour of tilemap.h change NW bmcphail2019-02-261-0/+1
|
* ds1315, ds1386, ds2404, ds75160a, ds75161a, eeprom, eepromser, eeprompar: ↵ mooglyguy2018-08-231-4/+35
| | | | Removed MCFG, nw
* Streamline machine configuration macros - everyone's a device edition. Vas Crabb2018-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start replacing special device macros with additional constructors, starting with ISA, INTELLEC 4 and RS-232 buses. Allow an object finder to take on the target of another object finder. (For a combination of the previous two things in action, see either the INTELLEC 4 driver, or the Apple 2 PC Exporter card. Also check out looping over a device finder array to instantiate devices in some places. Lots of things no longer need to pass tags around.) Start supplying default clocks for things that have a standard clock or have all clocks internal. Eliminate the separate DEV versions of the DEVCB_ macros. Previously, the plain versions were a shortcut for DEVICE_SELF as the target. You can now supply a string tag (relative to current device being configured), an object finder (takes on the base and relative tag), or a reference to a device/interface (only do this if you know the device won't be replaced out from under it, but that's a safe assumption for your subdevices). In almost all cases, you can get the effect you want by supplying *this as the target. Eliminate sound and CPU versions of macros. They serve no useful purpose, provide no extra checks, make error messages longer, add indirection, and mislead newbies into thinking there's a difference. Remove a lot of now-unnecessary ":" prefixes binding things relative to machine root. Clean up some miscellaneous rot. Examples of new functionality in use in (some more subtle than others): * src/mame/drivers/intellec4.cpp * src/mame/drivers/tranz330.cpp * src/mame/drivers/osboren1.cpp * src/mame/drivers/zorba.cpp * src/mame/devices/smioc.cpp * src/devices/bus/a2bus/pc_xporter.cpp * src/devices/bus/isa/isa.h * src/devices/bus/isa/isa.h * src/devices/bus/intellec4/intellec4.h
* Set finder tag relative to current device being configured rather than Vas Crabb2018-04-301-1/+1
| | | | | | | | | | | | | | the finder's owner. This meand you no longer need to care about the your relationship to the object being configured and a lot of ^ and : can disappear. There's a bit reduction in string pasting in macros from this. Yes, I have to make this apply to devcb etc. as well, but that's a job for another day. There's probably at least one thing broken by this where optional objects are involved. Most things can be solved by just getting rid of the now-problematic ^ and : prefixes.
* Sarayan made me do it. Vas Crabb2018-04-281-1/+1
| | | | | | | | | | Concrete device types now have a call operator that instantiates a device. This change means you *must* use DECLARE_DEVICE_TYPE to declare the public interface of your device, even if it's device_t. If you want to use private implementation classes, use DEFINE_DEVICE_TYPE_PRIVATE and instantiate the object finders.
* Fix tilemap device (nw) AJR2018-03-061-2/+2
|
* destaticify initializations (nw) (#3289) wilbertpol2018-03-041-17/+26
| | | | | | * destaticify initializations (nw) * fix this->set_screen (nw)
* memory: Deambiguate handlers, also a hint of things to come (nw) Olivier Galibert2018-01-191-6/+6
|
* general cleanup: Vas Crabb2017-05-231-7/+1
| | | | | | | | | | | * move rarely-used output and pty interfaces out of emu.h * consolidate and de-duplicate forward declarations, also remove some obsolete ones * clean up more #include guard macros * scope down a few more things (nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h - this will make it far easier to keep them in sync with declarations than having them scattered through all the other files.
* Merge pull request #2072 from startaq/tilemap_category R. Belmont2017-05-041-1/+1
|\ | | | | UI: Add the ability to select different tilemap categories
| * UI: Add the ability to select different tilemap categories Dirk Best2017-02-181-1/+1
| | | | | | | | | | | | | | This allows you to select different tilemap categories in the built-in tilemap viewer. The default is to render all categories (same as before), but you can select to render only a specific tilemap category with the PAGE_UP and PAGE_DOWN keys.
* | Move "optional" basemem and extmem arrays out of tilemap_t (nw) AJR2017-04-111-12/+14
| | | | | | | | This is intended as a first step towards divorcing tilemap_t and tilemap_device.
* | New device interface for palettes AJR2017-04-061-3/+3
|/ | | | | | - 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.
* A round of spelling/typographical fixes to source comments (nw) Scott Stone2016-11-241-1/+1
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-142/+142
| | | | | | | | | | | | * 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-130/+130
| | | | | 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
* Fix various spelling fixes. Jordi Mallach2016-09-291-1/+1
|
* More consistent use of integer types in tilemap_t and other graphics-related ↵ AJR2016-09-031-18/+18
| | | | | | classes (nw) - Define indirect_pen_t, requiring a slight reordering of emu.h due to an unsurprising dependency
* More new features for UI graphics viewer AJR2016-09-021-2/+14
| | | | | | | | | - Mouse over GFX tiles to reveal pixel values - Mouse over tilemap to reveal tile codes and colors - UI tilemap scrolling controls are now orientation-relative - Make mouse visible everywhere in UI graphics viewer by treating it like a menu - Add all necessary getters to tilemap_t and a few more (nw) - Add comment about role of decoder in tilemap creation (nw)
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-1/+1
| | | | to inline functions (nw)
* NULL->nullptr, instead of DEVCB_NULL use always DEVCB_NOOP to prevent ↵ Miodrag Milanovic2016-04-241-4/+4
| | | | confusion (nw)
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-2/+2
|
* TIMER_CALLBACK to TIMER_CALLBACK_MEMBER (nw) Miodrag Milanovic2016-03-071-8/+8
|
* Pass and return palette devices by reference, not as pointers AJR2016-01-231-2/+2
| | | | | | - 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-2/+2
| | | | | | | 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-2/+2
| | | | fix start project for custom builds in Visual Studio (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-3/+3
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-7/+7
|
* Update tilemap header comments/example to match current interface Vas Crabb2014-11-151-57/+63
|
* tilemap.h: remove temporary assert (nw) Alex W. Jackson2014-11-101-1/+0
|
* tilemap.c: Respect gfx_element::colors() just like drawgfx.c does. Add ↵ Alex W. Jackson2014-11-071-1/+2
| | | | temporary assert to catch regressions (i.e. drivers that didn't define their gfx elements correctly) (nw)
* emupal/tilemap refactoring: configure_tilemap_groups is now a tilemap_t ↵ Alex W. Jackson2014-06-221-0/+1
| | | | method rather than a palette_device method (nw)
* namcona1.c: use set_palette_offset for tilemaps; use GFXDECODE_RAM; more ↵ Alex W. Jackson2014-04-091-0/+1
| | | | cleanups [Alex Jackson]
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-1/+1
|
* device_gfx_interface [Alex Jackson] Alex W. Jackson2014-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved graphics decoding to a new device interface class: device_gfx_interface. The gfxdecode device is now a device that simply inherits this interface and does nothing else. Devices that draw tilemaps or sprites using gfx_elements should in time be updated to use this interface rather than connect to a machine-global gfxdecode device. Updated toaplan_scu.c as an example (also fixed off-by-one sprite alignment in twincobr and rallybik while I was at it). gfx_elements are normally created in interface_post_start(), making it possible to dynamically create or modify the graphics decoding info during device_start() if you need to. On the other hand, if you need the gfx_elements during device_start(), you can directly call decode_gfx() to create them early. This interface also provides a standard and init-order-safe way to connect to a palette device (similarly to how device_video_interface helps devices connect to a screen), so it's handy for any device that does palettized drawing even if it doesn't use gfx_elements. Updated k053250.c as an example of this usage. gfxdecode info entries can now reference shared RAM regions by tag as well as ROM regions, automatically handle endianness, and have some other new capabilities. Updated nemesis.c and pgm.c to showcase the new features. Removed validate_display() (it was just a commented out stub already) since its only function, checking that drivers don't have an ind16 screen without a palette, is now done by screen_device::device_validity_check(). Updated obsolete comments about GFXLAYOUT_RAW (cps1.c hasn't used raw gfx for years, and "to save memory" is no longer a good reason to use it)
* READ/WRITE*_HANDLER to READ/WRITE*_MEMBER where it was wrongly placed (nw) Miodrag Milanovic2014-03-241-6/+6
|
* Fixed UI gfx viewer (again). Added device_start dependency on gfxdecode to ↵ Alex W. Jackson2014-03-161-4/+4
| | | | all devices that create tilemaps, this should fix the recent tilemap-related crashes (nw)
* Checkpoint 2: Alex W. Jackson2014-03-151-4/+7
| | | | | | gfxdecode devices must now be assigned a palette in MCFG. Added palette devices to several MESS drivers and devices to comply with this requirement. This palette is assigned as a default to the gfx_elements created by the device (but still not used for drawing yet, except in the UI graphics viewer) Tilemaps now have a pointer to a palette device and use that palette for rgb32 drawing, rather than the palette of the screen or bitmap they are drawing to (since rgb32 screens don't have palettes now). When a tilemap is created, it takes its palette from the gfxdecode device it was created with, but you can change a tilemap's palette device with set_palette() at any time (doing this does not mark the tilemap dirty, since all tilemaps use indexed bitmaps internally)
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* You now specify a gfxdecode device once when you create a tilemap, rather ↵ Alex W. Jackson2014-03-101-13/+22
| | | | than each time in the tile info callback. Updated all drivers accordingly [Alex Jackson]
* tilemap.c: Remove some unused junk (nw) Alex W. Jackson2014-03-081-11/+2
|
* Huge update, palette is now device (nw) Miodrag Milanovic2014-02-271-3/+3
| | | note: Aaron please give more descriptive text for release log I have no more strength :)
* Switched rgb_t to a class, replacing macros with methods. Mappings are Aaron Giles2014-02-191-5/+5
| | | | | | | | | | | | | | | | | | | as follows: MAKE_RGB(r,g,b) == rgb_t(r,g,b) MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b) RGB_ALPHA(data) == data.a() RGB_RED(data) == data.r() RGB_GREEN(data) == data.g() RGB_BLUE(data) == data.b() RGB_BLACK == rgb_t::black RGB_WHITE == rgb_t::white Implicit conversions to/from UINT32 are built in as well as simple addition, subtraction, and scaling (with clamping). As a result of being a class, some stricter typing was needed in a few places but overall not too much.
* Created gfxdecode_device instead of using machine fixed gfxdecode [Miodrag ↵ Miodrag Milanovic2014-02-161-5/+7
| | | | | | | | | | Milanovic] Updated all devices and drivers for using it. out of whatsnew: Note that it is made to work same as before, in some cases it can be more logic to move gfxdevice into subdevice itself then to keep it in main driver.
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0150 Miodrag Milanovic2013-09-171-1/+1
|
* Moved tilemap_memory into a generic memory_array class, since it is Aaron Giles2013-08-071-71/+5
| | | | | | | more generally useful than just in tilemaps. Code is now in memarray.* Converted the Atari RLE motion objects device from a half-assed device into a full-assed device, leveraging the memory_array class.