From cb3ae7ff5f73e1c518c6b1625fcb3ff8ff1048c2 Mon Sep 17 00:00:00 2001 From: ElijahZAwesome Date: Tue, 6 Feb 2018 22:22:48 -0600 Subject: [PATCH] possibly gh-pages site --- docs/README.md | 78 +++++++++++++++++++++++++++++++++++++++++++++ source/Globals.c | 6 ++-- source/IngameMenu.c | 2 +- source/Player.c | 8 ++--- 4 files changed, 86 insertions(+), 8 deletions(-) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..957a02d --- /dev/null +++ b/docs/README.md @@ -0,0 +1,78 @@ +# Minicraft3DS +3DS Homebrew port of Notch's ludum dare game "Minicraft" +Current Version: Version 1.6.1 + +---------- + +**Download:** + +If you just want to download the game prebuilt check the releases tab in Github: +https://github.com/ElijahZAwesome/Minicraft3DS/releases +For building the game yourself look below. + + +---------- + + +**Dependencies:** + +For building and installing the dependencies look below. + +ctrulib by smea: https://github.com/smealum/ctrulib +citro3d by fincs: https://github.com/fincs/citro3d +sf2dlib by xerpi: https://github.com/xerpi/sf2dlib +sfillib by xerpi: https://github.com/xerpi/sfillib +zlib: http://www.zlib.net/ + + +---------- + + +**Building:** + +**1. Install devkitARM by devkitPro** +- On Windows download https://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ +- And install atleast Minimal System and devkitARM +- This includes make, ctrulib and citro3d + +**2. Install zlib, libjpeg-turbo and libpng** +- Download 3DS-Portlibs: https://github.com/devkitPro/3ds_portlibs +- Run these commands: + +``` + make zlib + make install-zlib + make libjpeg-turbo + make libpng + make install +``` + +**3. Install sf2dlib** +- Download https://github.com/xerpi/sf2dlib +- In the libsf2d directory run these commands: +``` + make + make install +``` +**4. Install sfillib** +- Download https://github.com/xerpi/sfillib +- In the libsfil directory run these commands: +``` + make + make install +``` + +**5. You can now build Minicraft3DS 3dsx, elf, cia, and 3ds files by running the build.bat file.** + + +---------- + + +You can do anything with the source code (besides sell it) as long as you give proper credit to the right people. +If you are going to make a mod of this version, be sure to give credit to Markus "Notch" Perrson because he did create the original game after all. + +# Misc + +This source code is subject to a lot of change for better optimization/cleanliness. + +Forum thread: https://gbatemp.net/threads/release-new-minicraft3ds-fork-v1-4.494947/ diff --git a/source/Globals.c b/source/Globals.c index 7b6e343..de51772 100755 --- a/source/Globals.c +++ b/source/Globals.c @@ -123,7 +123,7 @@ bool moveMob(Entity* e, int xa, int ya){ } void hurtEntity(Entity *e, int damage, int dir, u32 hurtColor, Entity *damager){ - if (TESTGODMODE && e->type==ENTITY_PLAYER) return; + if (shouldRenderDebug && e->type==ENTITY_PLAYER) return; if (e->hurtTime > 0) return; playSoundPositioned(snd_monsterHurt, e->level, e->x, e->y); @@ -1425,7 +1425,7 @@ void damageAndBreakTile(s8 level, int xt, int yt, int damage, int maxDamage, int } void playerHurtTile(PlayerData *pd, int tile, s8 level, int xt, int yt, int damage, int dir){ - if(TESTGODMODE) damage = 99; + if(shouldRenderDebug) damage = 99; if(UnderStrengthEffect) damage = damage + 4; //TODO: Most of this can be combined a lot @@ -1441,7 +1441,7 @@ void playerHurtTile(PlayerData *pd, int tile, s8 level, int xt, int yt, int dama damageAndBreakTile(level, xt, yt, damage, 50, TILE_DIRT, 2, newItem(ITEM_STONE,1), rand()%4+1, newItem(ITEM_COAL,1), rand()%2); break; case TILE_HARDROCK: - if((pd->activeItem->id != TOOL_PICKAXE || pd->activeItem->countLevel < 4) && !TESTGODMODE) damage = 0; + if((pd->activeItem->id != TOOL_PICKAXE || pd->activeItem->countLevel < 4) && !shouldRenderDebug) damage = 0; damageAndBreakTile(level, xt, yt, damage, 200, TILE_DIRT, 2, newItem(ITEM_STONE,1), rand()%4+1, newItem(ITEM_COAL,1), rand()%2); break; case TILE_IRONORE: diff --git a/source/IngameMenu.c b/source/IngameMenu.c index ff5737f..cfe6b63 100644 --- a/source/IngameMenu.c +++ b/source/IngameMenu.c @@ -161,7 +161,7 @@ void ingameMenuTick(PlayerData *pd, int menu) { } enterDungeon(pd); - } else if(TESTGODMODE) { + } else if(shouldRenderDebug) { enterDungeon(pd); } } else { diff --git a/source/Player.c b/source/Player.c index 587d954..bc9f784 100644 --- a/source/Player.c +++ b/source/Player.c @@ -64,7 +64,7 @@ void playerInitInventory(PlayerData *pd) { addItemToInventory(newItem(ITEM_WORKBENCH,0), &(pd->inventory)); addItemToInventory(newItem(ITEM_POWGLOVE,0), &(pd->inventory)); - if(TESTGODMODE) { + if(shouldRenderDebug) { addItemToInventory(newItem(ITEM_GOLD_APPLE,1), &(pd->inventory)); addItemToInventory(newItem(ITEM_STRENGTH_POTION,1), &(pd->inventory)); addItemToInventory(newItem(ITEM_REGEN_POTION,1), &(pd->inventory)); @@ -471,7 +471,7 @@ void tickPlayer(PlayerData *pd, bool inmenu) { //attacking if(pd->inputs.k_attack.clicked){ if (pd->entity.p.stamina != 0) { - if(!TESTGODMODE) pd->entity.p.stamina--; + if(!shouldRenderDebug) pd->entity.p.stamina--; pd->entity.p.staminaRecharge = 0; playerAttack(pd); @@ -487,7 +487,7 @@ void tickPlayer(PlayerData *pd, bool inmenu) { //swimming stamina and drowning if (swimming && pd->entity.p.swimTimer % 60 == 0) { if (pd->entity.p.stamina > 0) { - if(!TESTGODMODE) --pd->entity.p.stamina; + if(!shouldRenderDebug) --pd->entity.p.stamina; } else { hurtEntity(&(pd->entity), 1, -1, 0xFFAF00FF, NULL); } @@ -518,7 +518,7 @@ void playerSetActiveItem(PlayerData *pd, Item *item) { } bool playerUseEnergy(PlayerData *pd, int amount) { - if(TESTGODMODE) return true; + if(shouldRenderDebug) return true; if(amount > pd->entity.p.stamina) return false; pd->entity.p.stamina -= amount; return true;