<commit_before>#include "config.h"
#include "libs/mpq_libmpq04.h"
#include "libs/dbcfile.h"

int main() {
	printf("Opening locale.mpq...\n");
	MPQArchive locale(WOW_INSTALL_DIR"Data/"WOW_LOCALE"/locale-"WOW_LOCALE".MPQ");

	printf("Opening WorldMapContinent.dbc...\n");
	DBCFile wmc("DBFilesClient\\WorldMapContinent.dbc");
	bool res = wmc.open();
	if(!res)
		return 1;
	printf("Extracting %i continents...\n", wmc.getRecordCount());
	for(DBCFile::Iterator itr = wmc.begin(); itr != wmc.end(); ++itr) {
		const DBCFile::Record& r(*itr);
		int cid = r.getInt(1);
		int mid = r.getInt(2);
		float x1 = r.getFloat(9);
		float y1 = r.getFloat(10);
		float x2 = r.getFloat(11);
		float y2 = r.getFloat(12);
		printf("%i, %i, %g, %g, %g, %g\n", cid, mid, x1, y1, x2, y2);
	}

	printf("Opening Map.dbc...\n");
	DBCFile map("DBFilesClient\\Map.dbc");

	return 0;
}<commit_msg>WorldMapArea.dbc<commit_after>#include "config.h"
#include "libs/mpq_libmpq04.h"
#include "libs/dbcfile.h"

struct F2 {
	float x, y;
};

int main() {
	printf("Opening locale.mpq...\n");
	MPQArchive locale(WOW_INSTALL_DIR"Data/"WOW_LOCALE"/locale-"WOW_LOCALE".MPQ");

	printf("Opening WorldMapContinent.dbc...\n");
	DBCFile wmc("DBFilesClient\\WorldMapContinent.dbc");
	bool res = wmc.open();
	if(!res)
		return 1;
	printf("Extracting %i continents...\n", wmc.getRecordCount());
	for(DBCFile::Iterator itr = wmc.begin(); itr != wmc.end(); ++itr) {
		const DBCFile::Record& r(*itr);
		int cid = r.getInt(0);
		int mid = r.getInt(1);
		float x1 = r.getFloat(9);
		float y1 = r.getFloat(10);
		float x2 = r.getFloat(11);
		float y2 = r.getFloat(12);
		printf("%i, %i, %gx%g, %gx%g\n", cid, mid, x1, y1, x2, y2);
	}

	printf("Opening WorldMapArea.dbc...\n");
	DBCFile wma("DBFilesClient\\WorldMapArea.dbc");
	res = wma.open();
	if(!res)
		return 1;
	printf("Extracting %i map areas...\n", wma.getRecordCount());
	for(DBCFile::Iterator itr = wma.begin(); itr != wma.end(); ++itr) {
		const DBCFile::Record& r(*itr);
		int map = r.getInt(1);
		int at = r.getInt(2);
		const char* name = r.getString(3);
		F2 a = { r.getFloat(6), r.getFloat(4) };
		F2 b = { r.getFloat(7), r.getFloat(5) };
		int vmap = r.getInt(8);
		int dmap = r.getInt(9);
		printf("%i, %i, '%s', %gx%g, %gx%g, %i, %i\n",
			map, at, name, a.x, a.y, b.x, b.y, vmap, dmap);
	}

	// Records of WMA where 'at' == 0 are continents.
	// The world map images are found in interface/worldmap.
	// They are numbered 1 to 12 and ordered in a 4x3 grid,
	// left-to-right, top-to-bottom. Tiles are 256x256 pixels,
	// making the full image 1024x768 pixels.
	// I suspect the client would bilinear-scale these textures for higher resolutions.

	// Now: extract them!

	return 0;
}
{'fraction_non_alphanumeric': 0.19911012235817574, 'fraction_numerical': 0.027437893956247683, 'mean_word_length': 3.8700361010830324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '218875', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1121, 'n_words': 258}