Develop and Download Open Source Software

Browse CVS Repository

Contents of /mame32jp/mame32jp/src/artwork.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Wed Apr 24 03:53:20 2002 UTC (21 years, 11 months ago) by zero
Branch: MAIN
CVS Tags: ver_0_60_1, ver0_59_13, ver0_59_14, ver0_60_2, ver0_60_3, ver0_60_4, ver0_60_5, HEAD
Changes since 1.4: +0 -0 lines
File MIME type: text/x-chdr
*** empty log message ***

1 /*********************************************************************
2
3 artwork.h
4
5 Generic backdrop/overlay functions.
6
7 Be sure to include driver.h before including this file.
8
9 Created by Mike Balfour - 10/01/1998
10 *********************************************************************/
11
12 #ifndef ARTWORK_H
13
14 #define ARTWORK_H 1
15
16 /*********************************************************************
17 artwork
18
19 This structure is a generic structure used to hold both backdrops
20 and overlays.
21 *********************************************************************/
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 struct artwork_info
27 {
28 struct mame_bitmap *artwork;
29 struct mame_bitmap *artwork1;
30 struct mame_bitmap *alpha;
31 struct mame_bitmap *orig_artwork; /* needed for palette recalcs */
32 int start_pen;
33 UINT32 *rgb;
34 };
35
36
37 struct artwork_element
38 {
39 struct rectangle box;
40 UINT8 red,green,blue;
41 UINT16 alpha; /* 0x00-0xff or OVERLAY_DEFAULT_OPACITY */
42 };
43
44 struct artwork_size_info
45 {
46 int width, height; /* widht and height of the artwork */
47 struct rectangle screen; /* location of the screen relative to the artwork */
48 };
49
50 #define OVERLAY_DEFAULT_OPACITY 0xffff
51
52 #ifndef MIN
53 #define MIN(x,y) ((x)<(y)?(x):(y))
54 #endif
55 #ifndef MAX
56 #define MAX(x,y) ((x)>(y)?(x):(y))
57 #endif
58
59 extern struct artwork_info *artwork_backdrop;
60 extern struct artwork_info *artwork_overlay;
61 extern struct mame_bitmap *artwork_real_scrbitmap;
62
63 /*********************************************************************
64 functions that apply to backdrops AND overlays
65 *********************************************************************/
66 void overlay_load(const char *filename, unsigned int start_pen);
67 void overlay_create(const struct artwork_element *ae, unsigned int start_pen);
68 void backdrop_load(const char *filename, unsigned int start_pen);
69 /*void backdrop_refresh(struct artwork_info *a); */
70 void artwork_load(struct artwork_info **a,const char *filename, unsigned int start_pen);
71 void artwork_load_size(struct artwork_info **a,const char *filename, unsigned int start_pen, int width, int height);
72 void artwork_elements_scale(struct artwork_element *ae, int width, int height);
73 void artwork_free(struct artwork_info **a);
74 int artwork_get_size_info(const char *file_name, struct artwork_size_info *a);
75
76 /* called by mame.c */
77 void artwork_kill(void);
78 void artwork_draw(struct mame_bitmap *dest,struct mame_bitmap *source, int full_refresh);
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26