|
coastline 0.0.4
|
The bitmaps of the paint shop of the PC port. More...
#include <windows.h>
Go to the source code of this file.
Classes | |
| struct | CarPaintTextureSet |
| The bitmaps, selection option and rectangle of a car paint set. More... | |
Macros | |
| #define | CAR_PAINT_GROUP_COUNT 16 |
| The number of groups of g_CarPaintTextureSets. | |
| #define | CAR_PAINT_SET_COUNT 30 |
| The number of sets of a group of g_CarPaintTextureSets. | |
| #define | CAR_PAINT_BITMAP_COUNT 4 |
| The number of bitmaps of a set of g_CarPaintTextureSets. | |
| #define | PAINT_DAMAGE_BITMAP_COUNT 3 |
| The number of entries of g_apPaintDamageBitmaps. | |
Typedefs | |
| typedef struct CarPaintTextureSet | CarPaintTextureSet |
| The bitmaps, selection option and rectangle of a car paint set. | |
Functions | |
| void * | GetPaintImage (int nGroup, int nSet, int nDamage) |
| Select a paint set and return its bitmap for a damage level. | |
| void | GetPaintRectangle (int nGroup, int nSet, int *pLeft, int *pRight, int *pTop, int *pBottom) |
| Get the bounds of the rectangle of a paint set. | |
| int | GetSelectedPaintOption (void) |
| Get the option of the paint set selected last. | |
| int | HasPaintTintPixels (const void *pImage, int nLeft, int nRight, int nTop, int nBottom) |
| Test whether packed paint pixels contain a pixel to tint. | |
| int | BlitPaintImageToPixels (const void *pImage, int nLeft, int nRight, int nTop, int nBottom, unsigned char *pDest, int nWidth, int nHeight) |
| Copy paint pixels into the destination rectangle, flipping rows and applying the paint tint. | |
| void | ApplyPaintDamageOverlay (int damage, unsigned char *pixels, int width, int height) |
| Scale RGB by the first channel of the selected 64 by 64 damage mask, preserving alpha. | |
| void | ModulateRgbaByMask (unsigned char *pixels, int width, int height, const unsigned char *mask) |
| Multiply each pixel's RGB channels by the first channel of its mask pixel, preserving alpha. | |
| void | LoadCarPaintTextures (int group, int damageVariants) |
| Load one car group's paint bitmaps and optionally generate damage variants. | |
| void | SetColorTintMultipliers (int nRed, int nGreen, int nBlue) |
| Set the multipliers of the tint of the paint. | |
| void | CopyBgr24ToRgba32Flipped (unsigned char *pDest, const unsigned char *pSrc, int nWidth, int nHeight, int nStride) |
| Copy the rows of a bitmap of 24 bits from the bottom up into pixels of RGBA 8888, opaque. | |
| void * | ConvertBitmap24ToRgba32 (const BITMAP *pBitmap) |
| Convert a bitmap of 24 bits to pixels of RGBA 8888 from malloc(), and record its size in g_dwConvertedBitmapWidth and g_dwConvertedBitmapHeight. | |
| void * | LoadBitmapFromFile (const char *pszPath) |
| Load a bitmap file of 24 bits as pixels of RGBA 8888. | |
| void | LoadPaintDamageBitmaps (void) |
| Load the bitmaps of the damage of the paint from Paint\damaged.bmp. | |
| void | FreeCarPaintTextures (void) |
| Free the bitmaps of every set of paint of the cars. | |
| void | FreeAllPaintBitmaps (void) |
| Free the bitmaps of the paint of the cars and of the damage of the paint. | |
Variables | |
| int | g_nSelectedPaintOption10 |
| The option at offset 16 of the paint set selected last. | |
| int | g_nPaintTextureGroup |
| The group used to prepare car paint textures. | |
| int | g_nPaintTextureSetIndex |
| The paint set index, advanced before preparing each texture. | |
| CarPaintTextureSet | g_CarPaintTextureSets [CAR_PAINT_GROUP_COUNT][CAR_PAINT_SET_COUNT] |
| The sets of paint of the cars. | |
| void * | g_apPaintDamageBitmaps [PAINT_DAMAGE_BITMAP_COUNT] |
| The bitmaps of the damage of the paint, from malloc(). | |
| int | g_bCarPaintTexturesEnabled |
| Whether additional car-paint damage variants are generated when paint textures load. | |
| int | g_dwColorTintRed |
| The multiplier of the red of the tint of the paint. | |
| int | g_dwColorTintGreen |
| The multiplier of the green of the tint of the paint. | |
| int | g_dwColorTintBlue |
| The multiplier of the blue of the tint of the paint. | |
| int | g_dwConvertedBitmapWidth |
| The width of the bitmap ConvertBitmap24ToRgba32() converted last. | |
| int | g_dwConvertedBitmapHeight |
| The height of the bitmap ConvertBitmap24ToRgba32() converted last. | |
The bitmaps of the paint shop of the PC port.
| #define CAR_PAINT_GROUP_COUNT 16 |
The number of groups of g_CarPaintTextureSets.
| #define CAR_PAINT_SET_COUNT 30 |
The number of sets of a group of g_CarPaintTextureSets.
| #define CAR_PAINT_BITMAP_COUNT 4 |
The number of bitmaps of a set of g_CarPaintTextureSets.
| #define PAINT_DAMAGE_BITMAP_COUNT 3 |
The number of entries of g_apPaintDamageBitmaps.
| typedef struct CarPaintTextureSet CarPaintTextureSet |
The bitmaps, selection option and rectangle of a car paint set.
| void * GetPaintImage | ( | int | nGroup, |
| int | nSet, | ||
| int | nDamage ) |
Select a paint set and return its bitmap for a damage level.
| nGroup | The paint group. |
| nSet | The paint set. |
| nDamage | The damage level. |
| void GetPaintRectangle | ( | int | nGroup, |
| int | nSet, | ||
| int * | pLeft, | ||
| int * | pRight, | ||
| int * | pTop, | ||
| int * | pBottom ) |
Get the bounds of the rectangle of a paint set.
| nGroup | The paint group. |
| nSet | The paint set. |
| pLeft | Receives the left bound. |
| pRight | Receives the right bound. |
| pTop | Receives the top bound. |
| pBottom | Receives the bottom bound. |
| int GetSelectedPaintOption | ( | void | ) |
Get the option of the paint set selected last.
| int HasPaintTintPixels | ( | const void * | pImage, |
| int | nLeft, | ||
| int | nRight, | ||
| int | nTop, | ||
| int | nBottom ) |
Test whether packed paint pixels contain a pixel to tint.
| pImage | The packed rectangle pixels. |
| nLeft | The left bound. |
| nRight | The right bound. |
| nTop | The top bound. |
| nBottom | The bottom bound. |
| int BlitPaintImageToPixels | ( | const void * | pImage, |
| int | nLeft, | ||
| int | nRight, | ||
| int | nTop, | ||
| int | nBottom, | ||
| unsigned char * | pDest, | ||
| int | nWidth, | ||
| int | nHeight ) |
Copy paint pixels into the destination rectangle, flipping rows and applying the paint tint.
| pImage | The paint image. |
| nLeft | The left bound. |
| nRight | The right bound. |
| nTop | The top bound. |
| nBottom | The bottom bound. |
| pDest | Receives the pixels. |
| nWidth | The destination width. |
| nHeight | The destination height. |
| void ApplyPaintDamageOverlay | ( | int | damage, |
| unsigned char * | pixels, | ||
| int | width, | ||
| int | height ) |
Scale RGB by the first channel of the selected 64 by 64 damage mask, preserving alpha.
| damage | The damage level, from 1 to 3. |
| pixels | The RGBA pixels to update. |
| width | The width in pixels. |
| height | The height in pixels. |
| void ModulateRgbaByMask | ( | unsigned char * | pixels, |
| int | width, | ||
| int | height, | ||
| const unsigned char * | mask ) |
Multiply each pixel's RGB channels by the first channel of its mask pixel, preserving alpha.
| pixels | RGBA pixels to update. |
| width | Image width in pixels. |
| height | Image height in pixels. |
| mask | RGBA mask pixels. |
| void LoadCarPaintTextures | ( | int | group, |
| int | damageVariants ) |
Load one car group's paint bitmaps and optionally generate damage variants.
| group | Index of the car-paint texture group. |
| damageVariants | Whether to generate damaged bitmaps when enabled. |
| void SetColorTintMultipliers | ( | int | nRed, |
| int | nGreen, | ||
| int | nBlue ) |
Set the multipliers of the tint of the paint.
| nRed | The multiplier of the red. |
| nGreen | The multiplier of the green. |
| nBlue | The multiplier of the blue. |
| void CopyBgr24ToRgba32Flipped | ( | unsigned char * | pDest, |
| const unsigned char * | pSrc, | ||
| int | nWidth, | ||
| int | nHeight, | ||
| int | nStride ) |
Copy the rows of a bitmap of 24 bits from the bottom up into pixels of RGBA 8888, opaque.
| pDest | The pixels, width by height. |
| pSrc | The rows of the bitmap, the bottom row first in memory. |
| nWidth | The width. |
| nHeight | The height. |
| nStride | The bytes of a row of the bitmap. |
| void * ConvertBitmap24ToRgba32 | ( | const BITMAP * | pBitmap | ) |
Convert a bitmap of 24 bits to pixels of RGBA 8888 from malloc(), and record its size in g_dwConvertedBitmapWidth and g_dwConvertedBitmapHeight.
| pBitmap | The bitmap. |
| void * LoadBitmapFromFile | ( | const char * | pszPath | ) |
Load a bitmap file of 24 bits as pixels of RGBA 8888.
| pszPath | The path of the file. |
| void LoadPaintDamageBitmaps | ( | void | ) |
Load the bitmaps of the damage of the paint from Paint\damaged.bmp.
| void FreeCarPaintTextures | ( | void | ) |
Free the bitmaps of every set of paint of the cars.
| void FreeAllPaintBitmaps | ( | void | ) |
Free the bitmaps of the paint of the cars and of the damage of the paint.
|
extern |
The option at offset 16 of the paint set selected last.
|
extern |
The group used to prepare car paint textures.
|
extern |
The paint set index, advanced before preparing each texture.
|
extern |
The sets of paint of the cars.
The meaning of the two dimensions is not recovered yet.
|
extern |
The bitmaps of the damage of the paint, from malloc().
|
extern |
Whether additional car-paint damage variants are generated when paint textures load.
|
extern |
The multiplier of the red of the tint of the paint.
|
extern |
The multiplier of the green of the tint of the paint.
|
extern |
The multiplier of the blue of the tint of the paint.
|
extern |
The width of the bitmap ConvertBitmap24ToRgba32() converted last.
|
extern |
The height of the bitmap ConvertBitmap24ToRgba32() converted last.