[VM] *.BMP Files

Librarian: HexCode
Post Reply
User avatar
HexCode
First Lieutenant
First Lieutenant
Posts: 923
Joined: 2019-09-30 18:54, Monday

[VM] *.BMP Files

Post by HexCode »

CONTENT LINKS
==============

Introduction
viewtopic.php?f=100&t=545#p8989

FLAGS.BMP
viewtopic.php?f=100&t=545#p8990

TACMAP_??????.BMP
viewtopic.php?f=100&t=545#p9030


===================================================================

The topic's contents may be modified or progressively added upon as time goes by.

===================================================================

INTRODUCTION
==============

This topic should be of interest to Veteran Modders (VMs).

Kindly review:

Introduction
viewtopic.php?f=100&t=536#p8929

File Format

A bitmap is an array of bits that specifies the color of each pixel in a rectangular array of pixels. The number of bits devoted to an individual pixel determines the number of colors that can be assigned to that pixel. For example, if each pixel is represented by 4 bits, then a given pixel can be assigned one of 16 different colors (2^4 = 16). The following table shows a few examples of the number of colors that can be assigned to a pixel represented by a given number of bits.

Code: Select all

Bits per pixel Number of colors that can be assigned to a pixel

1	       2^1  =          2
2	       2^2  =          4
4	       2^4  =         16
8	       2^8  =        256
16	       2^16 =     65,536
24	       2^24 = 16,777,216
A bitmap that stores indexes into a color table is called a palette-indexed bitmap. Some bitmaps have no need for a color table. For example, if a bitmap uses 24 bits per pixel, that bitmap can store the colors themselves rather than indexes into a color table.

PGF's BMP Files

PGF natively utilizes 24-bit bitmaps. As such, there is no need whatsoever for palette-indexing.

PGF's BMP files reside in folder ...\GRAPHICS. They are:

Code: Select all

EXPLODE.BMP
FLAGS.BMP
HEXSIDES.BMP
STACKICN.BMP
STRENGTH.BMP
TACICONS.BMP
TACMAP_DRY.BMP
TACMAP_FROZEN.BMP
TACMAP_MUDDY.BMP
Each such file contains serially arranged, multiple images.

PGF's BMP files can be edited / modified by judicious use of image manipulation utilities such as Adobe Photoshop and GIMP. The requisite, technical know-how is way beyond the scope of this introductory post.
Last edited by HexCode on 2021-04-07 16:45, Wednesday, edited 4 times in total.
User avatar
HexCode
First Lieutenant
First Lieutenant
Posts: 923
Joined: 2019-09-30 18:54, Monday

FLAGS.BMP

Post by HexCode »

FLAGS.BMP
==========

Absolute Prerequisite

BMP Files
viewtopic.php?f=100&t=545#p8989

Preliminaries

File FLAGS.BMP is located in folder ...\GRAPHICS. The folder may be a sub-folder of folder ...\DEFAULT or part of the folder structure specific to some particular "game".

Internal Structure

File FLAGS.BMP accommodates binary records which appear in strict sequential order, one after another, without any intervening gaps. Each such record corresponds to a Combatant Flag Iconic Representation (CFIR) or "flag" descriptor ultimately intended to be linked to some particular, unambiguously identified (from PGF engine's standpoint) map hex or unit. Such CFIRs are always visible in quite diverse situations.

PGF's engine imposes strict, sequential order to CFIR records within a typical FLAGS.BMP file as per "standard" programming indexing practice: [0], 1, 2, etc. The engine cannot usefully address more than 256 CFIR records, record [0] inclusive (the ultimate restriction due to 8-bit encoding).

Strictly speaking, file FLAGS.BMP contains a number of serially arranged image slots. Each such slot may accommodate a single CFIR or, sometimes, no image at all (i.e., empty / blank).

Important

PGF's engine is "interested" in CFIR descriptors for visual display purposes only. Such descriptors play no role whatsoever in the way PGF's underlying play system is being "policed" by the engine.

Note

In reality, there is no ZEROth (0th) image slot, ever. The actual image slot indexing starts at ONE (1).

The term "nationality" is being used for semantic convenience. There is nothing here that stops a modder from introducing emblems of combatants not legally belonging to some "recognized" nation-state (e.g., civil war factions, mercenaries etc).
Last edited by HexCode on 2021-11-27 05:27, Saturday, edited 1 time in total.
User avatar
HexCode
First Lieutenant
First Lieutenant
Posts: 923
Joined: 2019-09-30 18:54, Monday

TACMAP_??????.BMP

Post by HexCode »

TACMAP_??????.BMP
==================

Absolute Prerequisites

Introduction
viewtopic.php?f=100&t=550#p9027

Linear Map Coordinate Specification
viewtopic.php?f=100&t=550#p9028

Introduction
viewtopic.php?f=100&t=545#p8989

Preliminaries

TACMAP_??????.BMP refers to the following BMP file triplet:

Code: Select all

TACMAP_DRY.BMP
TACMAP_FROZEN.BMP
TACMAP_MUDDY.BMP
These files always go together and are located in folder ...\GRAPHICS. The folder may be a sub-folder of folder ...\DEFAULT or part of the folder structure specific to some particular "game".

The above file triplet collectively covers all possible in-game Ground Conditions (i.e., Dry, Frozen, Muddy).

Internal Structure

Each individual triplet file accommodates binary records which appear in strict sequential order, one after another, without any intervening gaps. Each such record corresponds to a Terrain Iconic Representation (TIR) or "terrain tile" descriptor ultimately intended to be linked to some particular, unambiguously identified (from PGF engine's standpoint) map hex. Collectively, such TIRs are always visible as they constitute the... "map" in the ordinary sense of the word (i.e., visual perusal).

PGF's engine imposes strict, sequential order to TIR records within a typical TACMAP_??????.BMP file as per "standard" programming indexing practice: 0, 1, 2, etc. The engine cannot usefully address more than 65,535 TIR records (the ultimate restriction due to 16-bit encoding).

All THREE (3) files should feature exactly the same number of image slots. Each such slot may accommodate a single TIR or, sometimes, no image at all (i.e., empty / blank). A carefully put together file triplet strictly preserves comparative, strict, sequential order and correspondence. In other words, given a certain image slot ID number, the very same terrain features should be depicted in ALL THREE (3) files at that slot ID number, with the looks just modified to reflect particular Ground Conditions.

Important

PGF's engine is "interested" in TIR descriptors for visual display purposes only. Such descriptors play no role whatsoever in the way PGF's underlying play system is being "policed" by the engine.

Note

PGF's engine cannot address TIR records sporting index values higher than 65,535 (the ultimate restriction due to 16-bit encoding).
Post Reply