diff --git a/README.md b/README.md index bd21b5b..ccb40c4 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ - Then you just simply drag the downloaded file into the plugged in calculators folder - And finished! Now you have MineFx on your fx cp 400! + +## Controls? +![controls](assets/minefx_controls.png) +(A little extra secret: press `=` to reset the cursor position) + ## Build it! - Install WSL 2 (recommended is ubuntu) diff --git a/assets/minefx_controls.png b/assets/minefx_controls.png new file mode 100644 index 0000000..913239f Binary files /dev/null and b/assets/minefx_controls.png differ diff --git a/assets/minefx_logo.png b/assets/minefx_logo.png new file mode 100644 index 0000000..c245903 Binary files /dev/null and b/assets/minefx_logo.png differ diff --git a/src/main.cpp b/src/main.cpp index 8589747..12ff9bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -334,6 +334,8 @@ void main() { } } + int BLOCK_PALETTE_INDEX = 0; + loadWorldFromDisk(MAP); clearEntireScreen(); @@ -421,6 +423,57 @@ void main() { MAP[cursor_y][cursor_x][cursor_z] = new AirBlock(); } } + else if (testKey(key1, key2, KEY_COMMA)) + { + BLOCK_PALETTE_INDEX++; + if (BLOCK_PALETTE_INDEX > 5) + { + BLOCK_PALETTE_INDEX = 0; + } + } + else if(testKey(key1, key2, KEY_EXE)){ + switch (BLOCK_PALETTE_INDEX) + { + case 0: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new DirtBlock(); + break; + + case 1: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new GrassBlock(); + break; + + case 2: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new LeaveBlock(); + break; + + case 3: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new LogBlock(); + break; + + case 4: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new PathBlock(); + break; + + case 5: + delete MAP[cursor_y][cursor_x][cursor_z]; + MAP[cursor_y][cursor_x][cursor_z] = new StoneBlock(); + break; + + default: + break; + } + } + else if (testKey(key1, key2, KEY_EQUALS)) + { + cursor_x = 0; + cursor_y = 0; + cursor_z = 0; + } clearEntireScreen(); renderEntireScreen(MAP);