1
//*****************************************************************************
2
// copyright (c) 1998-2003 TLK Games all rights reserved
3
//-----------------------------------------------------------------------------
4
// file : "assembler.hpp"
5
// created : 1999-08-24
6
// updates : 2003-07-01
7
//-----------------------------------------------------------------------------
8
// This program is free software; you can redistribute it and/or modify it under
9
// the terms of the GNU General Public License as published by the Free Software
10
// Foundation; either version 2 of the License, or (at your option) any later
13
// This program is distributed in the hope that it will be useful, but WITHOUT
14
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18
// You should have received a copy of the GNU General Public License along with
19
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20
// Place - Suite 330, Boston, MA 02111-1307, USA.
22
//*****************************************************************************
8
* copyright (c) 1998-2007 TLK Games all rights reserved
9
* $Id: assembler.h,v 1.6 2007/09/02 16:13:56 gurumeditation Exp $
11
* Powermanga is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 3 of the License, or
14
* (at your option) any later version.
16
* Powermanga is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23
26
#ifndef __ASSEMBLER_H__
24
27
#define __ASSEMBLER_H__
26
void conv8to16(char *_pSource, char *_pDestination, unsigned short *_pPalette16, unsigned int _iTaille);
27
void conv8to24(char *_pSource, char *_pDestination, unsigned int *_pPalette24, unsigned int _iTaille);
28
void conv8to32(char *_pSource, char *_pDestination, unsigned int *_pPalette32, unsigned int _iTaille);
30
void _putRectangle8bits(char *adresse, int x, int y, int coul, int large, int haute);
31
void _putRectangle16bits(char *adresse, int x, int y, int coul, int large, int haute);
32
void _putRectangle24bits(char *adresse, int x, int y, int coul, int large, int haute);
33
void _putRectangle32bits(char *adresse, int x, int y, int coul, int large, int haute);
34
void _putsprite3_8bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
35
void _putsprite3_16bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
36
void _putsprite3_24bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
37
void _putsprite3_32bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
38
void _putsprcolor_8bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
39
void _putsprcolor_16bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
40
void _putsprcolor_24bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
41
void _putsprcolor_32bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
42
void _asmCopyFonte8Bits(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
43
void _asmCopyFonte16Bits(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
44
void _asmCopyFonte24Bits(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
45
void _asmCopyFonte32Bits(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
46
void _conv8_16(char *_pSource, char *_pDestination, unsigned short *_pPalette16, unsigned int _iTaille);
47
void _conv8_24(char *_pSource, char *_pDestination, unsigned int *_pPalette24, unsigned int _iTaille);
48
void _conv8_32(char *_pSource, char *_pDestination, unsigned int *_pPalette32, unsigned int _iTaille);
28
#include "electrical_shock.h"
51
{ void _type_routine_gfx(int *adresse);
52
void conv8_16(char *_pSource, char *_pDestination, unsigned short *_pPalette16, unsigned int _iTaille);
53
void conv8_24(char *_pSource, char *_pDestination, unsigned int *_pPalette24, unsigned int _iTaille);
54
void conv8_32(char *_pSource, char *_pDestination, unsigned int *_pPalette32, unsigned int _iTaille);
55
unsigned int pixel8_16(unsigned int _iIndex, unsigned short *_pPalette);
56
unsigned int pixel8_24(unsigned int _iIndex, char *_pPalette);
57
unsigned int pixel8_32(unsigned int _iIndex, char *_pPalette);
58
void copie4octets(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset, unsigned int _iOffset2);
59
void copie8octets(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset);
60
void raz_ecran(char *_pEcran, unsigned int _iLargeur, unsigned int _iHauteur, unsigned int _iOffset);
61
void convertit8_16(char *_pSource, char *_pDestination, unsigned char *_pPalette, unsigned int _iTaille);
62
void convertitPalette24_16(unsigned char *pal, unsigned short *pal16);
63
void convertitPalette24_15(unsigned char *pal, unsigned short *pal16);
64
void _COPY2X8BITS(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset, unsigned int _iOffset2);
65
void _COPY2X16BITS(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset, unsigned int _iOffset2);
66
void _COPY2X24BITS(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset, unsigned int _iOffset2);
67
void _COPY2X32BITS(char *, char *, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffset, unsigned int _iOffset2);
68
void _ASMCOPYFONTE8BITS(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
69
void _ASMCOPYFONTE16BITS(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
70
void _ASMCOPYFONTE24BITS(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
71
void _ASMCOPYFONTE32BITS(unsigned char *_pSource, unsigned char *_pDestination, unsigned int _iLarge, unsigned int _iHaut, unsigned int _iOffsetS, unsigned int _iOffsetD);
72
void putsprite3_8bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
73
void putsprite3_16bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
74
void putsprite3_24bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
75
void putsprite3_32bits(char *_pSource, char *_pDestination, char *_pCompression, unsigned int _iTaille);
76
void putsprcolor_8bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
77
void putsprcolor_16bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
78
void putsprcolor_24bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
79
void putsprcolor_32bits(unsigned int _iColor, char *_pDestination, char *_pCompression, unsigned int _iTaille);
80
void poly8bits(char *_pDestination, int _iNombrePixel, int _iCouleur);
81
void poly16bits(char *_pDestination, int _iNombrePixel, int _iCouleur);
82
void poly24bits(char *_pDestination, int _iNombrePixel, int _iCouleur);
83
void poly32bits(char *_pDestination, int _iNombrePixel, int _iCouleur);
84
void draw_eclair8(char *, Eclair *, int);
85
void draw_eclair16(char *, Eclair *, int);
86
void draw_eclair24(char *, Eclair *, int);
87
void draw_eclair32(char *, Eclair *, int);
88
void _COPY2X8BITS_512x440(char *, char *, unsigned int);
89
void _COPY2X16BITS_512x440(char *, char *, unsigned int);
90
void _COPY2X24BITS_512x440(char *, char *, unsigned int);
91
void _COPY2X32BITS_512x440(char *, char *, unsigned int);
92
void _PUTRECTANGLEVIDE8BITS(char *adresse, int, int, int, int, int);
93
void _PUTRECTANGLEVIDE16BITS(char *adresse, int, int, int, int, int);
94
void _PUTRECTANGLEVIDE24BITS(char *adresse, int, int, int, int, int);
95
void _PUTRECTANGLEVIDE32BITS(char *adresse, int, int, int, int, int);
36
void conv8to16 (char *_pSource, char *_pDestination,
37
Uint16 * _pPalette16, Uint32 _iTaille);
38
void conv8to24 (char *_pSource, char *_pDestination,
39
Uint32 * _pPalette24, Uint32 _iTaille);
40
void conv8to32 (char *_pSource, char *_pDestination,
41
Uint32 * _pPalette32, Uint32 _iTaille);
42
void put_sprite_8 (char *oscreen, char *dest, char *repeats, Uint32 size);
43
void put_sprite_16 (char *oscreen, char *dest, char *repeats, Uint32 size);
44
void put_sprite_24 (char *oscreen, char *dest, char *repeats, Uint32 size);
45
void put_sprite_32 (char *oscreen, char *dest, char *repeats, Uint32 size);
48
void put_sprite_mask_8bits (Uint32 color, char *oscreen, char *repeats,
50
void put_sprite_mask_16bits (Uint32 color, char *oscreen, char *repeats,
52
void put_sprite_mask_24bits (Uint32 color, char *oscreen, char *repeats,
54
void put_sprite_mask_32bits (Uint32 color, char *oscreen, char *repeats,
57
void _type_routine_gfx (int *adresse);
58
void conv8_16 (char *_pSource, char *_pDestination,
59
Uint16 * _pPalette16, Uint32 _iTaille);
60
void conv8_24 (char *_pSource, char *_pDestination,
61
Uint32 * _pPalette24, Uint32 _iTaille);
62
void conv8_32 (char *_pSource, char *_pDestination,
63
Uint32 * _pPalette32, Uint32 _iTaille);
64
Uint32 pixel8_16 (Uint32 _iIndex, Uint16 * _pPalette);
65
Uint32 pixel8_24 (Uint32 _iIndex, char *_pPalette);
66
Uint32 pixel8_32 (Uint32 _iIndex, char *_pPalette);
67
void copie4octets (char *, char *, Uint32 _iLarge,
68
Uint32 _iHaut, Uint32 _iOffset, Uint32 _iOffset2);
69
void clear_offscreen (char *offscreen, Uint32 widht, Uint32 height,
71
void convertit8_16 (char *_pSource, char *_pDestination,
72
unsigned char *_pPalette, Uint32 _iTaille);
73
void convert_palette_24_to_16 (unsigned char *pal, Uint16 * pal16);
74
void convert_palette_24_to_15 (unsigned char *pal, Uint16 * pal16);
75
void _COPY2X8BITS (char *, char *, Uint32 _iLarge,
76
Uint32 _iHaut, Uint32 _iOffset, Uint32 _iOffset2);
77
void _COPY2X16BITS (char *, char *, Uint32 _iLarge,
78
Uint32 _iHaut, Uint32 _iOffset, Uint32 _iOffset2);
79
void _COPY2X24BITS (char *, char *, Uint32 _iLarge,
80
Uint32 _iHaut, Uint32 _iOffset, Uint32 _iOffset2);
81
void _COPY2X32BITS (char *, char *, Uint32 _iLarge,
82
Uint32 _iHaut, Uint32 _iOffset, Uint32 _iOffset2);
85
void draw_bitmap_char_8 (unsigned char *source, unsigned char *dest,
86
Uint32 width, Uint32 height, Uint32 offset_s,
88
void draw_bitmap_char_16 (unsigned char *source, unsigned char *dest,
89
Uint32 width, Uint32 height, Uint32 offset_s,
91
void draw_bitmap_char_24 (unsigned char *source, unsigned char *dest,
92
Uint32 width, Uint32 height, Uint32 offset_s,
94
void draw_bitmap_char_32 (unsigned char *source, unsigned char *dest,
95
Uint32 width, Uint32 height, Uint32 offset_s,
98
void poly8bits (char *_pDestination, Sint32 _iNombrePixel,
100
void poly16bits (char *_pDestination, Sint32 _iNombrePixel,
102
void poly24bits (char *_pDestination, Sint32 _iNombrePixel,
104
void poly32bits (char *_pDestination, Sint32 _iNombrePixel,
106
void draw_electrical_shock_8 (char *, Eclair *, Sint32);
107
void draw_electrical_shock_16 (char *, Eclair *, Sint32);
108
void draw_electrical_shock_24 (char *, Eclair *, Sint32);
109
void draw_electrical_shock_32 (char *, Eclair *, Sint32);
110
void _COPY2X8BITS_512x440 (char *, char *, Uint32);
111
void _COPY2X16BITS_512x440 (char *, char *, Uint32);
112
void _COPY2X24BITS_512x440 (char *, char *, Uint32);
113
void _COPY2X32BITS_512x440 (char *, char *, Uint32);
114
void draw_rectangle_8 (char *oscreen, Sint32 xcoord, Sint32 ycoord,
115
Sint32 color, Sint32 width, Sint32 height);
116
void draw_rectangle_16 (char *oscreen, Sint32 xcoord, Sint32 ycoord,
117
Sint32 color, Sint32 width, Sint32 height);
118
void draw_rectangle_24 (char *oscreen, Sint32 xcoord, Sint32 ycoord,
119
Sint32 color, Sint32 width, Sint32 height);
120
void draw_rectangle_32 (char *oscreen, Sint32 xcoord, Sint32 ycoord,
121
Sint32 color, Sint32 width, Sint32 height);