1 /*
2 Ming, an SWF output library
3 Copyright (C) 2002 Opaque Industries - http://www.opaque.net/
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 /* $Id$ */
21
22 #include "method.h"
23 #include "output.h"
24
25 #include "libming.h"
26
methodWriteUInt16(int i,SWFByteOutputMethod method,void * data)27 void methodWriteUInt16(int i, SWFByteOutputMethod method, void *data)
28 {
29 method((unsigned char)(i&0xff), data);
30 i>>=8;
31 method((unsigned char)(i&0xff), data);
32 }
33
34
methodWriteUInt32(int i,SWFByteOutputMethod method,void * data)35 void methodWriteUInt32(int i, SWFByteOutputMethod method, void *data)
36 {
37 method((unsigned char)(i&0xff), data);
38 i>>=8;
39 method((unsigned char)(i&0xff), data);
40 i>>=8;
41 method((unsigned char)(i&0xff), data);
42 i>>=8;
43 method((unsigned char)(i&0xff), data);
44 }
45
46
fileOutputMethod(byte b,void * data)47 void fileOutputMethod(byte b, void *data)
48 {
49 FILE *f = (FILE *)data;
50 fputc(b, f);
51 }
52
53
SWFOutputMethod(byte i,void * data)54 void SWFOutputMethod(byte i, void *data)
55 {
56 SWFOutput_writeUInt8( (SWFOutput) data, i);
57 }
58 /*
59 * Local variables:
60 * tab-width: 2
61 * c-basic-offset: 2
62 * End:
63 */
64