Skip to content

Commit

Permalink
update 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
theaddonn committed Jan 6, 2024
1 parent a5f782d commit 1721c8b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file added assets/minefx_controls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/minefx_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ void main() {
}
}

int BLOCK_PALETTE_INDEX = 0;

loadWorldFromDisk(MAP);

clearEntireScreen();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1721c8b

Please sign in to comment.