Added golden apple, toggle-able Beta Mode, and credits to me
This commit is contained in:
parent
dc2c9c0f6d
commit
84a85beb57
21 changed files with 259 additions and 31 deletions
|
@ -140,7 +140,7 @@ void initRecipes(){
|
|||
loomRecipes.recipes = (Recipe*)malloc(sizeof(Recipe) * (loomRecipes.size));
|
||||
loomRecipes.recipes[0] = defineRecipe(ITEM_STRING,1,1,ITEM_WOOL,1);
|
||||
|
||||
enchanterRecipes.size = 7;
|
||||
enchanterRecipes.size = 8;
|
||||
enchanterRecipes.recipes = (Recipe*)malloc(sizeof(Recipe) * (enchanterRecipes.size));
|
||||
enchanterRecipes.recipes[0] = defineRecipe(TOOL_SWORD,4,2,ITEM_WOOD,5,ITEM_GEM,50);
|
||||
enchanterRecipes.recipes[1] = defineRecipe(TOOL_AXE,4,2,ITEM_WOOD,5,ITEM_GEM,50);
|
||||
|
@ -149,6 +149,7 @@ void initRecipes(){
|
|||
enchanterRecipes.recipes[4] = defineRecipe(TOOL_SHOVEL,4,2,ITEM_WOOD,5,ITEM_GEM,50);
|
||||
enchanterRecipes.recipes[5] = defineRecipe(ITEM_ARROW_GEM,1,3,ITEM_WOOD,1,ITEM_GEM,3,ITEM_STRING,1);
|
||||
enchanterRecipes.recipes[6] = defineRecipe(ITEM_WALL_GEM,1,1,ITEM_GEM,10);
|
||||
enchanterRecipes.recipes[7] = defineRecipe(ITEM_GOLD_APPLE,1,2,ITEM_APPLE,1,ITEM_GOLDINGOT,15);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "Globals.h"
|
||||
#include "Menu.h"
|
||||
|
||||
char versionText[34] = "Version 1.3.0";
|
||||
char fpsstr[34];
|
||||
|
@ -217,7 +218,7 @@ void tickTouchQuickSelect() {
|
|||
}
|
||||
|
||||
void hurtEntity(Entity* e, int damage, int dir, u32 hurtColor){
|
||||
if (TESTGODMODE && e->type==ENTITY_PLAYER) return;
|
||||
if (shouldRenderDebug && e->type==ENTITY_PLAYER) return;
|
||||
if (e->hurtTime > 0) return;
|
||||
int xd = player.x - e->x;
|
||||
int yd = player.y - e->y;
|
||||
|
@ -700,6 +701,13 @@ s8 itemTileInteract(int tile, Item* item, int x, int y, int px, int py, int dir)
|
|||
healPlayer(1);
|
||||
--item->countLevel;
|
||||
}
|
||||
return 0;
|
||||
case ITEM_GOLD_APPLE:
|
||||
if(player.p.health < 10 && playerUseEnergy(1)){
|
||||
healPlayer(8);
|
||||
playerUseEnergy(-10);
|
||||
--item->countLevel;
|
||||
}
|
||||
return 0;
|
||||
case ITEM_FLESH:
|
||||
if(player.p.health < 10 && playerUseEnergy(4+(rand()%4))){
|
||||
|
@ -1650,28 +1658,28 @@ void initPlayer(){
|
|||
player.p.hasWon = false;
|
||||
|
||||
addItemToInventory(newItem(ITEM_WORKBENCH,0), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_POWGLOVE,0), player.p.inv);
|
||||
|
||||
/*
|
||||
addItemToInventory(newItem(ITEM_POWGLOVE,0), player.p.inv);
|
||||
if (shouldRenderDebug == true) {
|
||||
addItemToInventory(newItem(TOOL_SHOVEL,4), player.p.inv);
|
||||
addItemToInventory(newItem(TOOL_HOE,4), player.p.inv);
|
||||
addItemToInventory(newItem(TOOL_SWORD,4), player.p.inv);
|
||||
addItemToInventory(newItem(TOOL_PICKAXE,4), player.p.inv);
|
||||
addItemToInventory(newItem(TOOL_AXE,4), player.p.inv);
|
||||
|
||||
addItemToInventory(newItem(ITEM_GOLDINGOT, 60), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_APPLE, 1), player.p.inv);
|
||||
|
||||
addItemToInventory(newItem(ITEM_ANVIL,0), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_CHEST,0), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_OVEN,0), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_FURNACE,0), player.p.inv);
|
||||
addItemToInventory(newItem(ITEM_LANTERN,0), player.p.inv);
|
||||
|
||||
int i;
|
||||
for (i = 7;i < 28;++i) addItemToInventory(newItem(i,50), player.p.inv);
|
||||
//*/
|
||||
addItemToInventory(newItem(ITEM_ENCHANTER,0), player.p.inv);
|
||||
}
|
||||
}
|
||||
|
||||
void playerHurtTile(int tile, int xt, int yt, int damage, int dir){
|
||||
if(TESTGODMODE) damage = 99;
|
||||
if(shouldRenderDebug) damage = 99;
|
||||
|
||||
char hurtText[11];
|
||||
switch(tile){
|
||||
|
@ -1868,7 +1876,7 @@ void playerHurtTile(int tile, int xt, int yt, int damage, int dir){
|
|||
}
|
||||
|
||||
bool playerUseEnergy(int amount){
|
||||
if(TESTGODMODE) return true;
|
||||
if(shouldRenderDebug) return true;
|
||||
if(amount > player.p.stamina) return false;
|
||||
player.p.stamina -= amount;
|
||||
return true;
|
||||
|
@ -2163,7 +2171,7 @@ void tickPlayer(){
|
|||
|
||||
if (swimming && player.p.swimTimer % 60 == 0) {
|
||||
if (player.p.stamina > 0) {
|
||||
if(!TESTGODMODE) --player.p.stamina;
|
||||
if(!shouldRenderDebug) --player.p.stamina;
|
||||
} else {
|
||||
hurtEntity(&player,1,-1,0xFFAF00FF);
|
||||
}
|
||||
|
@ -2176,7 +2184,7 @@ void tickPlayer(){
|
|||
|
||||
if(k_attack.clicked){
|
||||
if (player.p.stamina != 0) {
|
||||
if(!TESTGODMODE) player.p.stamina--;
|
||||
if(!shouldRenderDebug) player.p.stamina--;
|
||||
player.p.staminaRecharge = 0;
|
||||
playerAttack();
|
||||
//addEntityToList(newSlimeEntity(1,200,600,1), &eManager);
|
||||
|
|
|
@ -78,8 +78,6 @@
|
|||
|
||||
#define SWAP_UINT32(x) (((x) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | ((x) << 24))
|
||||
|
||||
//TODO: Dont forget to change back
|
||||
#define TESTGODMODE true
|
||||
|
||||
bool screenShot;
|
||||
int loadedtp;
|
||||
|
|
|
@ -150,6 +150,7 @@ char* getItemName(int itemID, int countLevel){
|
|||
case ITEM_FLESH: sprintf(currentName,"%d Flesh", countLevel); return currentName;
|
||||
case ITEM_BREAD: sprintf(currentName,"%d Bread", countLevel); return currentName;
|
||||
case ITEM_APPLE: sprintf(currentName,"%d Apple", countLevel); return currentName;
|
||||
case ITEM_GOLD_APPLE: sprintf(currentName,"%d Golden Apple", countLevel); return currentName;
|
||||
case ITEM_COAL: sprintf(currentName,"%d Coal", countLevel); return currentName;
|
||||
case ITEM_IRONORE: sprintf(currentName,"%d Iron ore", countLevel); return currentName;
|
||||
case ITEM_GOLDORE: sprintf(currentName,"%d Gold ore", countLevel); return currentName;
|
||||
|
@ -260,6 +261,7 @@ char* getBasicItemName(int itemID, int countLevel){
|
|||
case ITEM_FLESH: return "Flesh";
|
||||
case ITEM_BREAD: return "Bread";
|
||||
case ITEM_APPLE: return "Apple";
|
||||
case ITEM_GOLD_APPLE: return "Gold Apple";
|
||||
case ITEM_COAL: return "Coal";
|
||||
case ITEM_IRONORE: return "Iron ore";
|
||||
case ITEM_GOLDORE: return "Gold ore";
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#define TOOL_BUCKET 101
|
||||
#define TOOL_BOW 102
|
||||
#define TOOL_MAGIC_COMPASS 103
|
||||
#define ITEM_GOLD_APPLE 104
|
||||
|
||||
typedef struct Inventory Inventory;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
char options[][12] = {"Start Game", "Join Game", "How To Play","Settings", "About", "Exit"};
|
||||
char pOptions[][24] = {"Return to game", "Save Progress", "Host World", "Exit to title"};
|
||||
char keybOptions[][24] = {"Exit and Save", "Exit and Don't save","Reset to default"};
|
||||
char setOptions[][24] = {"Rebind Buttons", "Texture packs", "Debug Text: ", "N3DS Speedup: ", "Return to title"};
|
||||
char setOptions[][24] = {"Rebind Buttons", "Texture packs", "Test Features: ", "N3DS Speedup: ", "Return to title"};
|
||||
|
||||
// Rebind buttons menu (Settings)
|
||||
int keys[] = {
|
||||
|
@ -537,7 +537,7 @@ void tickMenu(int menu){
|
|||
}
|
||||
|
||||
enterDungeon();
|
||||
} else if(TESTGODMODE) {
|
||||
} else if(shouldRenderDebug) {
|
||||
enterDungeon();
|
||||
}
|
||||
} else {
|
||||
|
@ -1301,7 +1301,8 @@ void renderMenu(int menu,int xscr,int yscr){
|
|||
drawTextColor("3DS Homebrew Edition",74,120,0xFF00FF00);
|
||||
drawSizedTextColor("This port was made by David Benepe (Davideesk)",16,144,1.0,0xFF00FF00);
|
||||
drawSizedTextColor("just for fun in September/October 2015.",44,156,1.0,0xFF00FF00);
|
||||
drawSizedTextColor("Updated and modded by Andre Schweiger (andre111)",8,168,1.0,0xFF00FF00);
|
||||
drawSizedTextColor("Modded by Andre Schweiger (andre111) and ",44,168,1.0,0xFF00FF00);
|
||||
drawSizedTextColor("Elijah Bansley (ElijahZAwesome)",71,180,1.0,0xFF00FF00);
|
||||
drawSizedTextColor("TY Notch for creating a fun game to remake!",28,192,1.0,0xFF00FF00);
|
||||
sf2d_end_frame();
|
||||
sf2d_start_frame(GFX_BOTTOM, GFX_LEFT);
|
||||
|
@ -1356,7 +1357,7 @@ void renderMenu(int menu,int xscr,int yscr){
|
|||
drawTextColor("Change the game's art",(320 - (21 * 12))/2,24,0xFF7FFFFF);
|
||||
break;
|
||||
case 2:
|
||||
drawTextColor("Show FPS/Pos/Entities",(320 - (22 * 12))/2,24,0xFF7FFFFF);
|
||||
drawTextColor("Enable Testing Features.",(320 - (22 * 12))/2,24,0xFF7FFFFF);
|
||||
break;
|
||||
case 3:
|
||||
drawTextColor("Use the N3DS 804mhz mode",(320 - (24 * 12))/2,24,0xFF7FFFFF);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <3ds.h>
|
||||
|
||||
#define NETWORK_WLANCOMMID 0x11441850
|
||||
#define NETWORK_PASSPHRASE "minicraft3ds localplay passphrase"
|
||||
#define NETWORK_PASSPHRASE "Minicraft3DS localplay passphrase"
|
||||
#define NETWORK_CHANNEL 1
|
||||
|
||||
#define NETWORK_RECVBUFSIZE UDS_DEFAULT_RECVBUFSIZE
|
||||
|
|
|
@ -84,7 +84,16 @@ void openNPCMenu(int npc) {
|
|||
//TODO: Handle upon currentNPC as well as the fitting quest progress
|
||||
switch(currentNPC) {
|
||||
case NPC_GIRL:
|
||||
|
||||
currentTalkOptions = 2;
|
||||
currentTalkOption0 = "Trade";
|
||||
currentTalkOption1 = "What do you do?";
|
||||
|
||||
currentTalk0 = "Hello!";
|
||||
currentTalk1 = "It gets a bit lonely here.";
|
||||
currentTalk2 = "I hope you stay...";
|
||||
currentTalk3 = "But if you don't thats fine.";
|
||||
currentTalk4 = "sigh";
|
||||
currentTalk5 = "";
|
||||
break;
|
||||
case NPC_PRIEST:
|
||||
currentTalkOptions = 3;
|
||||
|
@ -327,7 +336,7 @@ void tickNPCMenu() {
|
|||
questManager.questlines[1].currentQuest = 2;
|
||||
|
||||
currentTalk0 = "Thank you these will be";
|
||||
currentTalk1 = "really helpfull.";
|
||||
currentTalk1 = "really helpful.";
|
||||
currentTalk2 = "Here take this book with";
|
||||
currentTalk3 = "it you should be able to";
|
||||
currentTalk4 = "easily understand anything";
|
||||
|
@ -399,7 +408,7 @@ void renderNPCMenu(int xscr, int yscr) {
|
|||
//TODO: Handle upon currentNPC as well as the fitting quest progress
|
||||
switch(currentNPC) {
|
||||
case NPC_GIRL:
|
||||
if(currentNPCMenu==NPC_MENU_TALK) renderTalkMenu("TODO");
|
||||
if(currentNPCMenu==NPC_MENU_TALK) renderTalkMenu("Girl Jill");
|
||||
break;
|
||||
case NPC_PRIEST:
|
||||
if(currentNPCMenu==NPC_MENU_TALK) renderTalkMenu("Priest Brom");
|
||||
|
|
|
@ -1487,6 +1487,9 @@ void renderItemIcon(int itemID, int countLevel, int x, int y) {
|
|||
case ITEM_APPLE:
|
||||
render(x, y, 80, 152, 0);
|
||||
break;
|
||||
case ITEM_GOLD_APPLE:
|
||||
render(x, y, 177, 160, 0);
|
||||
break;
|
||||
case ITEM_SLIME:
|
||||
renderb(x, y, 88, 152, 0, 0xFF4DC04D);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue