From ac7ed62029911f79afa8ddec939c12e13516499c Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Tue, 4 Feb 2025 23:25:53 +0100 Subject: [PATCH] Add maps --- TODO.txt | 19 ++++++++++- assets.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ data | 96 ------------------------------------------------------ make.sh | 2 +- renderer.h | 5 +-- settings.h | 9 ++--- 6 files changed, 123 insertions(+), 104 deletions(-) diff --git a/TODO.txt b/TODO.txt index d561bf8..67be138 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,22 @@ =========== GENERAL ============== -- countdown and finish text sometimes seem to jump horizontally somehow +- some kind of special map block that would say where 3D triangles don't have + to be drawn? could optimize rendering and map loading a lot +- maps to make: + - there should be these maps: + - compiled in: + - standard maps, let's say 10? + - additionally a few (5?) extremely simple maps, compile time option to + only include these, for very weak devices with limited block/triangle + count + - bonus maps in the external file + - map types: + - traveling salesman kind of maze + - some kinda buggy bumpy downhill + - something with multiple roads + - RPG kinda map? could be in bonus maps + - some speed map + - some (at least partially) interior map - try to speed up the slow culling - make a small txt game menual - test: @@ -27,6 +43,7 @@ =========== HANDLED ============== - allow stopping car rotation in air like in Trackmania +- countdown and finish text sometimes seem to jump horizontally somehow - add argc/argv to gameInit? could be used to quickly start maps, verify replays etc. Options: -sN: sound (0/1) diff --git a/assets.h b/assets.h index 3e2bd84..00e9981 100644 --- a/assets.h +++ b/assets.h @@ -92,6 +92,102 @@ static const char *LCR_internalDataFile = " map end " "#Rrep1;testmap;482f70f9 00000188:00c1:0089:0111:00b9:0091:0109:0028:0050:00c1:0093:0030:00d1:0069:0041:0020:0071:0013:0012:0023:0022:0050:0032:0020:0022:0060:0024:00bc:0044" + + + // MAP 1: + "#MLicar1;4321 0 " + ":*B3mL:!x6G:+L2H:+D38" // start, finish, CPs + // big structure: + ":=z09:f83D" + ":=H0k:fa1s" + ":=H0D:fa29" + ":-A29:f61C" + ":'A2pI:f611" + ":'B2j:f511" + ":=C0j:f347" + ":=H0q2:f42c" + ":xB2k:f625" // start hole + ":uB2o:uF2oJ :uB2kL :uF2kI" // curved corners in start + ":]G2kL:]G2oL" // decorative ramps near start + ":-w29:f41e" + ":xH0r:f35b" // hole + ":=G0C:f561" // small wall + ":^G5CJ:^K5CL" // the wall corners + ":=H0o1:f412" // grass near start + ":=H1L1:fa11" // grass + ":;R0q:f16l" // big wall west + ":;E0ML:fc61" // big wall north + ":)Q1rJ:f11c" // curved ramps along big wall + ":)Q2DJ:f118" // curved ramps along big wall + ":uQ2L|:f141:\\R0LI|:f161:\\Q0ML:f161" // corner between big walls + ":=v09:fc2g" + ":^z3s:^z3tI" // two small ramps near finish + ":;R0l:f125" // small wall near start + ":;L0jJ:f521" // small wall near start + ":uQ1kI:\\R0k:f121:\\Q0jL|:f121" // corner between small walls + ":=G0f1:f545:AK0f1:f141" // big grass block near start + ":=A2a2:f12f:^A3a2" // wall + ":=w0o:f331" + ":=v072:f14i" // wall + ":=G072:f14d" // wall + ":'G1lL:f113:E0k:f513" + + // slope: + ":^p3v:fk11" + ":^o4w:fk11:^o3w-I:fk11" + ":^n5x:fk11:^n4x-I:fk11" + ":^m6y:fk11:^m5y-I:fk11" + ":^l7z :fk11 :^l6z-I :fk11" + ":^k8A :fk11 :^k7A-I :fk11" + + ":=k8B:f419:=o8F:f415:^k9K2I:f611:^k8K2I-:f611" // top + ":=y0F1:fb15:^y0F1:fb11:^y0J1I:fb11" // end ; #define LCR_IMAGE_SIZE 64 ///< one-dimension resolution of bitmap image diff --git a/data b/data index 3a8e128..b2e3e6a 100644 --- a/data +++ b/data @@ -2,99 +2,3 @@ #Bnomap #Rrep2;testmap;482f70f9 00000843:0173:0081:0029:0111:0039:0071:00a3:0061:0169:0051:00b3:0041:0073:0081:0033:0041:0033:0231:0030:0098:0029:0011:0163:00f1:0053:0081:0033:0051:0023:0031:00f0:0032:0023:0131:00b9:0081:0023:00a1:0119:00e1:00c9:0071:0039:00a1:00d3:0021:01f9:0091:0079:0091:0039:0051:0049:0021:0083:0031:0083:0031:0083:0061:0089:0121:00a0:0058:002c:0048:0061:0013:0150:0052:00c0:00a1:0053:0041:0043:0031:0020:0092:0063:0181:0010:00a2:0013:0071:00e0:0028:00e9:0078:00a9:0043:0032:0123:0042:0080:0038:004c:01a8:0050:0032:0033:0101 #Btestmap; - -#Mmap2;4321 0 -:*B3mL - -:!x6G -:+L2H -:+D38 - -:=z09 :f83D -:'B2j :f511 -:'B2pI :f511 -:=H0k :fa1s -:=H0D :fa29 -:-A29 :f61C -:=C0j :f347 - -:=H0q2 :f42c - -:xB2k :f625 -:-w29 :f41e -:xH0r :f35b -:=G0C :f561 -:^G5CJ :^K5CL - -:=H0o1 :f412 - -:;R0q :f16l -:;E0ML :fc61 - -:=v09 :fc2g - -:;R0l :f125 -:;L0jJ :f521 - -:=G0f1 :f545 - -:uQ2L| :f141 -:\R0LI| :f161 -:\Q0ML :f161 - -:\R0k :f121 -:\Q0jL| :f121 -:uQ1kI - -:=v062 :fc33 -:=v052 :fc71 -:=v362 :fc11 -:^v462I :^G462I - -:-w5u :f31d -:'w5G :f311 - -:=A2a2 :f12f -:=w0o :f331 -:^A3a2 - -:=v072 :f14i -:=G072 :f14d - -:'G1lL :f113 -: