aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb <caleb@openarc.net>2016-03-19 12:34:11 -0400
committerCaleb <caleb@openarc.net>2016-03-19 12:34:11 -0400
commitbe67906a1a598d50f4e4e1591fb1446303bec478 (patch)
treefcf635d9d9a8ca029af2a2c844f0760857764107
parent45aac421aa1850ad11ba06a1e911f412da4968c2 (diff)
downloadAmuletsArmor-be67906a1a598d50f4e4e1591fb1446303bec478.tar.gz
AmuletsArmor-be67906a1a598d50f4e4e1591fb1446303bec478.tar.bz2
AmuletsArmor-be67906a1a598d50f4e4e1591fb1446303bec478.zip
Merged in changes to display name/class/level in town. Updated chat list to stay active in shops. Added player exit message. Updated executable and upped version number.
-rw-r--r--Exe/AA.exebin577024 -> 603136 bytes
-rw-r--r--Include/OPTIONS.H4
-rw-r--r--Include/PACKET.H4
-rw-r--r--Include/PEOPHERE.H1
-rw-r--r--Include/STATS.H2
-rw-r--r--Include/TOWNUI.H1
-rw-r--r--Source/GUILDUI.C3
-rw-r--r--Source/PEOPHERE.C44
-rw-r--r--Source/STATS.C13
-rw-r--r--Source/TOWNUI.C5
10 files changed, 65 insertions, 12 deletions
diff --git a/Exe/AA.exe b/Exe/AA.exe
index ce2bad7..1aa7daf 100644
--- a/Exe/AA.exe
+++ b/Exe/AA.exe
Binary files differ
diff --git a/Include/OPTIONS.H b/Include/OPTIONS.H
index 15272a1..ac8c2ec 100644
--- a/Include/OPTIONS.H
+++ b/Include/OPTIONS.H
@@ -76,9 +76,9 @@
#ifdef COMPILE_OPTION_SHAREWARE_DEMO
#define VERSION_TEXT "Shareware Demo V1.2"
#elif defined(COMPILE_OPTION_CLASSIC_VERSION)
- #define VERSION_TEXT "Classic V1.05a"
+ #define VERSION_TEXT "Classic V1.05.1a"
#elif defined(COMPILE_OPTION_CLASSIC_DEV_VERSION)
- #define VERSION_TEXT "Classic Dev V1.05a"
+ #define VERSION_TEXT "Classic Dev V1.05.1a"
#else
#define VERSION_TEXT "Registered V1.0"
#endif
diff --git a/Include/PACKET.H b/Include/PACKET.H
index 453f267..c43f358 100644
--- a/Include/PACKET.H
+++ b/Include/PACKET.H
@@ -139,7 +139,7 @@ typedef T_byte8 T_playerIDState ;
#define PLAYER_ID_STATE_JOINING_GAME 2
#define PLAYER_ID_STATE_UNKNOWN 3
-typedef struct { //48 bytes
+typedef struct { //50 bytes
T_byte8 name[30] ;
T_directTalkUniqueAddress uniqueAddress ;
T_playerIDLocation location ;
@@ -147,6 +147,8 @@ typedef struct { //48 bytes
T_gameGroupID groupID ;
T_word16 adventure ;
T_word16 quest;
+ T_byte8 classType;
+ T_byte8 level;
} T_playerIDSelf ;
typedef struct {
diff --git a/Include/PEOPHERE.H b/Include/PEOPHERE.H
index cc56128..e396e65 100644
--- a/Include/PEOPHERE.H
+++ b/Include/PEOPHERE.H
@@ -9,6 +9,7 @@
#include "CMDQUEUE.H"
#define MAX_PLAYERS_PER_GAME 4
+#define MAX_CHAT_NAME_STRING 96
// Routines to setup:
T_void PeopleHereInitialize(T_void) ;
diff --git a/Include/STATS.H b/Include/STATS.H
index 08d52bd..537ea45 100644
--- a/Include/STATS.H
+++ b/Include/STATS.H
@@ -382,6 +382,8 @@ T_void StatsUpdatePastPlace(
T_word16 mapNumber) ;
T_word16 StatsFindPastPlace(T_word16 adventureNumber) ;
+char* StatsGetClassTitle(T_byte8 classType);
+
#endif /* SERVER_ONLY */
#endif
diff --git a/Include/TOWNUI.H b/Include/TOWNUI.H
index c829c63..17cb69f 100644
--- a/Include/TOWNUI.H
+++ b/Include/TOWNUI.H
@@ -13,5 +13,6 @@ T_void TownUISetAdventureCompleted(T_void);
T_void TownUIAddMessage (T_byte8 *playerName, T_byte8 *message);
E_Boolean TownUICompletedMapLevel(T_word16 mapLevel) ;
E_Boolean TownUIFinishedQuest(T_word16 multiplayerStatus, T_byte8 numPlayers, T_word16 currentQuest);
+E_Boolean TownPersonInChat(T_byte8 *personName);
#endif
diff --git a/Source/GUILDUI.C b/Source/GUILDUI.C
index 3dede4f..f975c15 100644
--- a/Source/GUILDUI.C
+++ b/Source/GUILDUI.C
@@ -707,7 +707,8 @@ T_void GuildUIAddPlayer (T_byte8 *playerName)
DebugRoutine ("GuildUIAddPlayer");
- size=TxtboxCanFit(G_displayBoxes[GUILD_GAME_DESC],playerName);
+ //size=TxtboxCanFit(G_displayBoxes[GUILD_GAME_DESC],playerName);
+ size = strlen(playerName);
data=NULL;
data=MemAlloc(size+1);
diff --git a/Source/PEOPHERE.C b/Source/PEOPHERE.C
index 59e75a6..2442397 100644
--- a/Source/PEOPHERE.C
+++ b/Source/PEOPHERE.C
@@ -204,6 +204,9 @@ static T_playerIDLocation IGetOurLocation(T_void)
location = PLAYER_ID_LOCATION_GUILD;
break;
case HARDFORM_GOTO_PLACE_OFFSET + HARD_FORM_TOWN:
+ case HARDFORM_GOTO_PLACE_OFFSET + HARD_FORM_BANK:
+ case HARDFORM_GOTO_PLACE_OFFSET + HARD_FORM_STORE:
+ case HARDFORM_GOTO_PLACE_OFFSET + HARD_FORM_INN:
location = PLAYER_ID_LOCATION_TOWN;
break;
}
@@ -237,6 +240,8 @@ T_void PeopleHereGetPlayerIDSelfStruct(T_playerIDSelf *p_self)
p_self->groupID = ClientSyncGetGameGroupID();
p_self->adventure = PeopleHereGetOurAdventure();
p_self->quest = StatsGetCurrentQuestNumber();
+ p_self->classType = StatsGetPlayerClassType();
+ p_self->level = StatsGetPlayerLevel();
DebugEnd();
}
@@ -444,6 +449,16 @@ T_void PeopleHereRespondToJoin(
DebugEnd();
}
+//Concats player data (title, level, name) into buffer
+void GetPlayerLabel(T_playerIDSelf *p_playerID, char* buffer)
+{
+ DebugRoutine("GetPlayerLabel");
+
+ sprintf(buffer, "^003%s - ^007%s Level %d", p_playerID->name, StatsGetClassTitle(p_playerID->classType), p_playerID->level);
+
+ DebugEnd();
+}
+
/*-------------------------------------------------------------------------*
* Routine: PeopleHereUpdatePlayer
*-------------------------------------------------------------------------*/
@@ -460,6 +475,8 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
T_playerIDSelf *p_find;
T_playerIDLocation location;
T_gameGroupID ourGroupID;
+ char playerLabel[MAX_CHAT_NAME_STRING];
+ char chatNotification[MAX_CHAT_NAME_STRING];
DebugRoutine("PeopleHereUpdatePlayer");
DebugCheck(p_playerID != NULL);
@@ -481,6 +498,9 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
/* If either work, go ahead and update the status. */
if (p_find) {
+ //Set up player ID string
+ GetPlayerLabel(p_find, playerLabel);
+
/* Check if the location is changing */
if (p_find->location != p_playerID->location) {
/* There is a difference, either coming or going. */
@@ -495,7 +515,7 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
break;
case PLAYER_ID_LOCATION_TOWN:
/* Update the town list. */
- TownAddPerson(p_find->name);
+ TownAddPerson(playerLabel);
break;
case PLAYER_ID_LOCATION_GUILD:
/* Action is taken care of below. */
@@ -506,8 +526,8 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
default:
/* What? */
DebugCheck(FALSE);
- break;
- }
+ break;
+ }
} else {
/* Exiting */
/* Do an action based on our location. */
@@ -516,8 +536,16 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
/* We both are nowhere. nothing happens. */
break;
case PLAYER_ID_LOCATION_TOWN:
- /* Update the town list. */
- TownRemovePerson(p_find->name);
+ //If player has left town for the guild
+ if (p_find->location == PLAYER_ID_LOCATION_TOWN && p_playerID->location == PLAYER_ID_LOCATION_NOWHERE)
+ {
+ //Notify chatbox
+ sprintf(chatNotification, "^001%s LEFT THE GAME", p_playerID->name);
+ TownUIAddMessage(NULL, chatNotification);
+ }
+
+ /* Update the town list. */
+ TownRemovePerson(playerLabel);
break;
case PLAYER_ID_LOCATION_GUILD:
/* Action is taken care of below. */
@@ -529,7 +557,7 @@ T_void PeopleHereUpdatePlayer(T_playerIDSelf *p_playerID)
/* What? */
DebugCheck(FALSE);
break;
- }
+ }
}
}
@@ -606,6 +634,7 @@ T_void PeopleHereGeneratePeopleInGame(T_gameGroupID groupID)
{
T_word16 i;
T_playerIDSelf *p = G_peopleList;
+ char playerLabel[MAX_CHAT_NAME_STRING];
DebugRoutine("PeopleHereGeneratePeopleInGame");
@@ -616,7 +645,8 @@ T_void PeopleHereGeneratePeopleInGame(T_gameGroupID groupID)
for (i = 0; i < MAX_PLAYERS_IN_WORLD; i++, p++) {
if ((CompareGameGroupIDs(p->groupID, groupID))
&& (p->location == PLAYER_ID_LOCATION_GUILD)) {
- GuildUIAddPlayer(p->name);
+ GetPlayerLabel(p, playerLabel);
+ GuildUIAddPlayer(playerLabel);
}
}
}
diff --git a/Source/STATS.C b/Source/STATS.C
index 161cda5..62d1e1c 100644
--- a/Source/STATS.C
+++ b/Source/STATS.C
@@ -3651,6 +3651,19 @@ E_Boolean StatsSaveCharacter (T_byte8 selected)
return (success);
}
+char* StatsGetClassTitle(T_byte8 classType)
+{
+ DebugRoutine("StatsGetClassTitle");
+
+ //sanity check
+ if (classType >= NUM_CLASSES)
+ classType = 0;
+
+ DebugEnd();
+
+ return ((char*)G_statsCharacterTypeNames[classType]);
+}
+
/* @} */
/*-------------------------------------------------------------------------*
* End of File: STATS.C
diff --git a/Source/TOWNUI.C b/Source/TOWNUI.C
index 870d9c2..620601f 100644
--- a/Source/TOWNUI.C
+++ b/Source/TOWNUI.C
@@ -146,6 +146,8 @@ T_void TownUIStart(T_word32 formNum)
}
if (G_isOnePlayer == FALSE) {
+
+
/* set up display textboxes for multiplayer chat room */
G_userListBox = TxtboxCreate(6, 35, 61, 137, "FontTiny", 0, 0, FALSE,
Txtbox_JUSTIFY_CENTER, Txtbox_MODE_VIEW_SCROLL_FORM, NULL );
@@ -512,7 +514,8 @@ T_void TownAddPerson(T_byte8 *personName)
data = NULL;
data = MemAlloc(size + 1);
DebugCheck(data != NULL);
- tocpy = TxtboxCanFit(G_userListBox, personName);
+ //tocpy = TxtboxCanFit(G_userListBox, personName);
+ tocpy = strlen(personName);
strncpy(data, personName, tocpy);
data[tocpy] = '\0';
/* add personName to list */