Subversion Repositories Games.Carmageddon

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 pmbaty 1
#include "pmgen.h"
2
#include "harness/trace.h"
3
 
4
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_match(br_device_pixelmap *self, br_device_pixelmap **newpm, br_token_value *tv)
5
br_error _M_br_device_pixelmap_gen_match(br_device_pixelmap* self, br_device_pixelmap** newpm, br_token_value* tv) {
6
    LOG_TRACE("(%p, %p, %p)", self, newpm, tv);
7
    NOT_IMPLEMENTED();
8
}
9
 
10
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copy(br_device_pixelmap *self, br_device_pixelmap *src)
11
br_error _M_br_device_pixelmap_gen_copy(br_device_pixelmap* self, br_device_pixelmap* src) {
12
    //br_rectangle r; // Pierre-Marie Baty -- unused variable
13
    //br_point p; // Pierre-Marie Baty -- unused variable
14
    LOG_TRACE("(%p, %p)", self, src);
15
    NOT_IMPLEMENTED();
16
}
17
 
18
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyTo(br_device_pixelmap *self, br_device_pixelmap *src)
19
br_error _M_br_device_pixelmap_gen_copyTo(br_device_pixelmap* self, br_device_pixelmap* src) {
20
    //br_rectangle r; // Pierre-Marie Baty -- unused variable
21
    //br_point p; // Pierre-Marie Baty -- unused variable
22
    LOG_TRACE("(%p, %p)", self, src);
23
    NOT_IMPLEMENTED();
24
}
25
 
26
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyFrom(br_device_pixelmap *self, br_device_pixelmap *src)
27
br_error _M_br_device_pixelmap_gen_copyFrom(br_device_pixelmap* self, br_device_pixelmap* src) {
28
    //br_rectangle r; // Pierre-Marie Baty -- unused variable
29
    //br_point p; // Pierre-Marie Baty -- unused variable
30
    LOG_TRACE("(%p, %p)", self, src);
31
    NOT_IMPLEMENTED();
32
}
33
 
34
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_fill(br_device_pixelmap *self, br_uint_32 colour)
35
br_error _M_br_device_pixelmap_gen_fill(br_device_pixelmap* self, br_uint_32 colour) {
36
    //br_rectangle r; // Pierre-Marie Baty -- unused variable
37
    LOG_TRACE("(%p, %d)", self, colour);
38
    NOT_IMPLEMENTED();
39
}
40
 
41
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_doubleBuffer(br_device_pixelmap *self, br_device_pixelmap *src)
42
br_error _M_br_device_pixelmap_gen_doubleBuffer(br_device_pixelmap* self, br_device_pixelmap* src) {
43
    //br_rectangle s; // Pierre-Marie Baty -- unused variable
44
    //br_rectangle d; // Pierre-Marie Baty -- unused variable
45
    LOG_TRACE("(%p, %p)", self, src);
46
    NOT_IMPLEMENTED();
47
}
48
 
49
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyDirty(br_device_pixelmap *self, br_device_pixelmap *src, br_rectangle *dirty, br_int_32 num_rects)
50
br_error _M_br_device_pixelmap_gen_copyDirty(br_device_pixelmap* self, br_device_pixelmap* src, br_rectangle* dirty, br_int_32 num_rects) {
51
    //int i; // Pierre-Marie Baty -- unused variable
52
    //br_point p; // Pierre-Marie Baty -- unused variable
53
    //br_error e; // Pierre-Marie Baty -- unused variable
54
    LOG_TRACE("(%p, %p, %p, %d)", self, src, dirty, num_rects);
55
    NOT_IMPLEMENTED();
56
}
57
 
58
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyToDirty(br_device_pixelmap *self, br_device_pixelmap *src, br_rectangle *dirty, br_int_32 num_rects)
59
br_error _M_br_device_pixelmap_gen_copyToDirty(br_device_pixelmap* self, br_device_pixelmap* src, br_rectangle* dirty, br_int_32 num_rects) {
60
    //int i; // Pierre-Marie Baty -- unused variable
61
    //br_point p; // Pierre-Marie Baty -- unused variable
62
    //br_error e; // Pierre-Marie Baty -- unused variable
63
    LOG_TRACE("(%p, %p, %p, %d)", self, src, dirty, num_rects);
64
    NOT_IMPLEMENTED();
65
}
66
 
67
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyFromDirty(br_device_pixelmap *self, br_device_pixelmap *src, br_rectangle *dirty, br_int_32 num_rects)
68
br_error _M_br_device_pixelmap_gen_copyFromDirty(br_device_pixelmap* self, br_device_pixelmap* src, br_rectangle* dirty, br_int_32 num_rects) {
69
    //int i; // Pierre-Marie Baty -- unused variable
70
    //br_point p; // Pierre-Marie Baty -- unused variable
71
    //br_error e; // Pierre-Marie Baty -- unused variable
72
    LOG_TRACE("(%p, %p, %p, %d)", self, src, dirty, num_rects);
73
    NOT_IMPLEMENTED();
74
}
75
 
76
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_fillDirty(br_device_pixelmap *self, br_uint_32 colour, br_rectangle *dirty, br_int_32 num_rects)
77
br_error _M_br_device_pixelmap_gen_fillDirty(br_device_pixelmap* self, br_uint_32 colour, br_rectangle* dirty, br_int_32 num_rects) {
78
    //int i; // Pierre-Marie Baty -- unused variable
79
    //br_error e; // Pierre-Marie Baty -- unused variable
80
    LOG_TRACE("(%p, %d, %p, %d)", self, colour, dirty, num_rects);
81
    NOT_IMPLEMENTED();
82
}
83
 
84
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_doubleBufferDirty(br_device_pixelmap *self, br_device_pixelmap *src, br_rectangle *dirty, br_int_32 num_rects)
85
br_error _M_br_device_pixelmap_gen_doubleBufferDirty(br_device_pixelmap* self, br_device_pixelmap* src, br_rectangle* dirty, br_int_32 num_rects) {
86
    //int i; // Pierre-Marie Baty -- unused variable
87
    //br_point p; // Pierre-Marie Baty -- unused variable
88
    //br_error e; // Pierre-Marie Baty -- unused variable
89
    LOG_TRACE("(%p, %p, %p, %d)", self, src, dirty, num_rects);
90
    NOT_IMPLEMENTED();
91
}
92
 
93
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_rectangle(br_device_pixelmap *self, br_rectangle *rect, br_uint_32 colour)
94
br_error _M_br_device_pixelmap_gen_rectangle(br_device_pixelmap* self, br_rectangle* rect, br_uint_32 colour) {
95
    //br_point tl; // Pierre-Marie Baty -- unused variable
96
    //br_point tr; // Pierre-Marie Baty -- unused variable
97
    //br_point bl; // Pierre-Marie Baty -- unused variable
98
    //br_point br; // Pierre-Marie Baty -- unused variable
99
    //br_error e; // Pierre-Marie Baty -- unused variable
100
    LOG_TRACE("(%p, %p, %d)", self, rect, colour);
101
    NOT_IMPLEMENTED();
102
}
103
 
104
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_rectangle2(br_device_pixelmap *self, br_rectangle *rect, br_uint_32 colour_tl, br_uint_32 colour_br)
105
br_error _M_br_device_pixelmap_gen_rectangle2(br_device_pixelmap* self, br_rectangle* rect, br_uint_32 colour_tl, br_uint_32 colour_br) {
106
    //br_point tl; // Pierre-Marie Baty -- unused variable
107
    //br_point tr; // Pierre-Marie Baty -- unused variable
108
    //br_point bl; // Pierre-Marie Baty -- unused variable
109
    //br_point br; // Pierre-Marie Baty -- unused variable
110
    //br_error e; // Pierre-Marie Baty -- unused variable
111
    LOG_TRACE("(%p, %p, %d, %d)", self, rect, colour_tl, colour_br);
112
    NOT_IMPLEMENTED();
113
}
114
 
115
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_line(br_device_pixelmap *self, br_point *s, br_point *e, br_uint_32 colour)
116
br_error _M_br_device_pixelmap_gen_line(br_device_pixelmap* self, br_point* s, br_point* e, br_uint_32 colour) {
117
    //int dx; // Pierre-Marie Baty -- unused variable
118
    //int dy; // Pierre-Marie Baty -- unused variable
119
    //int incr1; // Pierre-Marie Baty -- unused variable
120
    //int incr2; // Pierre-Marie Baty -- unused variable
121
    //int D; // Pierre-Marie Baty -- unused variable
122
    //int x; // Pierre-Marie Baty -- unused variable
123
    //int y; // Pierre-Marie Baty -- unused variable
124
    //int xend; // Pierre-Marie Baty -- unused variable
125
    //int c; // Pierre-Marie Baty -- unused variable
126
    //int pixels_left; // Pierre-Marie Baty -- unused variable
127
    //int x1; // Pierre-Marie Baty -- unused variable
128
    //int y1; // Pierre-Marie Baty -- unused variable
129
    //int sign_x; // Pierre-Marie Baty -- unused variable
130
    //int sign_y; // Pierre-Marie Baty -- unused variable
131
    //int step; // Pierre-Marie Baty -- unused variable
132
    //int reverse; // Pierre-Marie Baty -- unused variable
133
    //int i; // Pierre-Marie Baty -- unused variable
134
    //br_point as; // Pierre-Marie Baty -- unused variable
135
    //br_point ae; // Pierre-Marie Baty -- unused variable
136
    //br_point p; // Pierre-Marie Baty -- unused variable
137
    LOG_TRACE("(%p, %p, %p, %d)", self, s, e, colour);
138
    NOT_IMPLEMENTED();
139
}
140
 
141
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_text(br_device_pixelmap *self, br_point *point, br_font *font, char *text, br_uint_32 colour)
142
br_error _M_br_device_pixelmap_gen_text(br_device_pixelmap* self, br_point* point, br_font* font, char* text, br_uint_32 colour) {
143
    br_rectangle r;
144
    br_point p;
145
    br_int_32 x;
146
    br_int_32 y;
147
    br_int_32 s_stride;
148
    LOG_TRACE("(%p, %p, %p, \"%s\", %d)", self, point, font, text, colour);
149
 
150
    x = self->pm_origin_x + point->x;
151
    y = self->pm_origin_y + point->y;
152
    r.h = font->glyph_y;
153
    if (-r.h >= y || y >= self->pm_height || x >= self->pm_width) {
154
        return 0;
155
    }
156
    p.x = point->x;
157
    p.y = point->y;
158
    r.x = 0;
159
    r.y = 0;
160
    if ((font->flags & BR_FONTF_PROPORTIONAL) == 0) {
161
        r.w = font->glyph_x;
162
        s_stride = (r.w + 7) / 8;
163
        while (*text != '\0') {
164
            if (x + r.w > 0) {
165
                self->dispatch->_copyBits(self, &p, &font->glyphs[font->encoding[(unsigned)*text]], s_stride, &r, colour);
166
            }
167
            x += r.w + 1;
168
            p.x += r.w + 1;
169
            if (x > self->pm_width) {
170
                return 0;
171
            }
172
            text++;
173
        }
174
    } else {
175
        while (*text != '\0') {
176
            r.w = font->width[*(br_uint_8*)text];
177
            s_stride = (r.w + 7) / 8;
178
            if (x + r.w > 0) {
179
                self->dispatch->_copyBits(self, &p, &font->glyphs[font->encoding[*(br_uint_8*)text]], s_stride, &r, colour);
180
            }
181
            x += r.w + 1;
182
            p.x += r.w + 1;
183
            if (x > self->pm_width) {
184
                return 0;
185
            }
186
            text++;
187
        }
188
    }
189
    return 0;
190
}
191
 
192
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_textBounds(br_device_pixelmap *self, br_rectangle *rect, br_font *font, char *text)
193
br_error _M_br_device_pixelmap_gen_textBounds(br_device_pixelmap* self, br_rectangle* rect, br_font* font, char* text) {
194
    //int i; // Pierre-Marie Baty -- unused variable
195
    //int j; // Pierre-Marie Baty -- unused variable
196
    LOG_TRACE("(%p, %p, %p, \"%s\")", self, rect, font, text);
197
    NOT_IMPLEMENTED();
198
}
199
 
200
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_copyBits(br_device_pixelmap *self, br_point *point, br_uint_8 *src, br_uint_16 s_stride, br_rectangle *bit_rect, br_uint_32 colour)
201
br_error _M_br_device_pixelmap_gen_copyBits(br_device_pixelmap* self, br_point* point, br_uint_8* src, br_uint_16 s_stride, br_rectangle* bit_rect, br_uint_32 colour) {
202
    //br_int_32 x; // Pierre-Marie Baty -- unused variable
203
    //br_int_32 y; // Pierre-Marie Baty -- unused variable
204
    //br_point p; // Pierre-Marie Baty -- unused variable
205
    LOG_TRACE("(%p, %p, %p, %d, %p, %d)", self, point, src, s_stride, bit_rect, colour);
206
    NOT_IMPLEMENTED();
207
}
208
 
209
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_flush(br_device_pixelmap *self)
210
br_error _M_br_device_pixelmap_gen_flush(br_device_pixelmap* self) {
211
    LOG_TRACE("(%p)", self);
212
 
213
    return 0;
214
}
215
 
216
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_synchronise(br_device_pixelmap *self, br_token sync_type, br_boolean block)
217
br_error _M_br_device_pixelmap_gen_synchronise(br_device_pixelmap* self, br_token sync_type, br_boolean block) {
218
    LOG_TRACE("(%p, %d, %d)", self, sync_type, block);
219
 
220
    return 0;
221
}
222
 
223
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_directLock(br_device_pixelmap *self, br_boolean block)
224
br_error _M_br_device_pixelmap_gen_directLock(br_device_pixelmap* self, br_boolean block) {
225
    LOG_TRACE("(%p, %d)", self, block);
226
 
227
    return 0;
228
}
229
 
230
// IDA: br_error __cdecl _M_br_device_pixelmap_gen_directUnlock(br_device_pixelmap *self)
231
br_error _M_br_device_pixelmap_gen_directUnlock(br_device_pixelmap* self) {
232
    LOG_TRACE("(%p)", self);
233
 
234
    return 0;
235
}