diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c')
-rw-r--r-- | libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c b/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c deleted file mode 100644 index 7ef9211..0000000 --- a/libraries/evas/src/modules/engines/software_ddraw/evas_ddraw_buffer.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #include <string.h> | ||
2 | |||
3 | #include "evas_common.h" | ||
4 | #include "evas_engine.h" | ||
5 | |||
6 | |||
7 | DD_Output_Buffer * | ||
8 | evas_software_ddraw_output_buffer_new(int depth, | ||
9 | int width, | ||
10 | int height, | ||
11 | void *data) | ||
12 | { | ||
13 | DD_Output_Buffer *ddob; | ||
14 | |||
15 | ddob = calloc(1, sizeof(DD_Output_Buffer)); | ||
16 | if (!ddob) return NULL; | ||
17 | |||
18 | ddob->data = data; | ||
19 | ddob->depth = depth; | ||
20 | ddob->width = width; | ||
21 | ddob->height = height; | ||
22 | ddob->pitch = width * depth / 8; | ||
23 | ddob->psize = ddob->pitch * height; | ||
24 | |||
25 | if (!ddob->data) | ||
26 | { | ||
27 | ddob->data = malloc(ddob->pitch * height); | ||
28 | if (!ddob->data) | ||
29 | { | ||
30 | free(ddob); | ||
31 | return NULL; | ||
32 | } | ||
33 | } | ||
34 | |||
35 | return ddob; | ||
36 | } | ||
37 | |||
38 | void | ||
39 | evas_software_ddraw_output_buffer_free(DD_Output_Buffer *ddob) | ||
40 | { | ||
41 | if (ddob->data) free(ddob->data); | ||
42 | free(ddob); | ||
43 | } | ||
44 | |||
45 | void | ||
46 | evas_software_ddraw_output_buffer_paste(DD_Output_Buffer *ddob, | ||
47 | void *ddraw_data, | ||
48 | int ddraw_width, | ||
49 | int ddraw_height, | ||
50 | int ddraw_pitch, | ||
51 | int ddraw_depth, | ||
52 | int x, | ||
53 | int y) | ||
54 | { | ||
55 | DATA8 *dd_data; | ||
56 | DATA8 *evas_data; | ||
57 | int width; | ||
58 | int height; | ||
59 | int pitch; | ||
60 | int j; | ||
61 | |||
62 | if ((x >= ddraw_width) || (y >= ddraw_height)) | ||
63 | return; | ||
64 | |||
65 | /* compute the size of the data to copy on the back surface */ | ||
66 | width = ((x + ddob->width) > ddraw_width) | ||
67 | ? ddraw_width - x | ||
68 | : ddob->width; | ||
69 | height = ((y + ddob->height) > ddraw_height) | ||
70 | ? ddraw_height - y | ||
71 | : ddob->height; | ||
72 | pitch = width * ddob->depth / 8; | ||
73 | |||
74 | dd_data = (DATA8 *)ddraw_data + y * ddraw_pitch + x * ddraw_depth; | ||
75 | evas_data = (unsigned char *)ddob->data; | ||
76 | for (j = 0; j < height; j++, evas_data += ddob->pitch, dd_data += ddraw_pitch) | ||
77 | memcpy(dd_data, evas_data, pitch); | ||
78 | } | ||
79 | |||
80 | DATA8 * | ||
81 | evas_software_ddraw_output_buffer_data(DD_Output_Buffer *ddob, | ||
82 | int *bytes_per_line_ret) | ||
83 | { | ||
84 | if (bytes_per_line_ret) *bytes_per_line_ret = ddob->pitch; | ||
85 | return ddob->data; | ||
86 | } | ||
87 | |||
88 | int | ||
89 | evas_software_ddraw_output_buffer_depth(DD_Output_Buffer *ddob) | ||
90 | { | ||
91 | return ddob->depth; | ||
92 | } | ||