aboutsummaryrefslogtreecommitdiffstats
path: root/code/botlib
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-12-05 17:32:54 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-12-05 17:32:54 +0000
commit1fa5872b59f24cb05e82c4124ddb455834dd9f37 (patch)
treeeb835a752c2915f487b9d1d33e5e4e322b4dd45a /code/botlib
parent5da02a4301441953f1b20d10e7cbbc3e8498d959 (diff)
downloadioquake3-aero-1fa5872b59f24cb05e82c4124ddb455834dd9f37.tar.gz
ioquake3-aero-1fa5872b59f24cb05e82c4124ddb455834dd9f37.zip
* Replaced ALIGN macro with PAD
* Moved ALIGN16 macro from tr_local.h to ALIGN in q_shared.h git-svn-id: svn://svn.icculus.org/quake3/trunk@417 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/botlib')
-rw-r--r--code/botlib/be_aas_route.c5
-rw-r--r--code/botlib/be_ai_chat.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/code/botlib/be_aas_route.c b/code/botlib/be_aas_route.c
index de8cc03..e31202b 100644
--- a/code/botlib/be_aas_route.c
+++ b/code/botlib/be_aas_route.c
@@ -521,7 +521,8 @@ void AAS_CalculateAreaTravelTimes(void)
//
size += settings->numreachableareas * sizeof(unsigned short *);
//
- size += settings->numreachableareas * ALIGN(revreach->numlinks) * sizeof(unsigned short);
+ size += settings->numreachableareas *
+ PAD(revreach->numlinks, sizeof(long)) * sizeof(unsigned short);
} //end for
//allocate memory for the area travel times
ptr = (char *) GetClearedMemory(size);
@@ -541,7 +542,7 @@ void AAS_CalculateAreaTravelTimes(void)
for (l = 0; l < settings->numreachableareas; l++)
{
aasworld.areatraveltimes[i][l] = (unsigned short *) ptr;
- ptr += ALIGN(revreach->numlinks) * sizeof(unsigned short);
+ ptr += PAD(revreach->numlinks, sizeof(long)) * sizeof(unsigned short);
//reachability link
reach = &aasworld.reachability[settings->firstreachablearea + l];
//
diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c
index c71df9a..d61e11e 100644
--- a/code/botlib/be_ai_chat.c
+++ b/code/botlib/be_ai_chat.c
@@ -690,7 +690,7 @@ bot_synonymlist_t *BotLoadSynonyms(char *filename)
return NULL;
} //end if
len = strlen(token.string) + 1;
- len = ALIGN(len);
+ len = PAD(len, sizeof(long));
size += sizeof(bot_synonym_t) + len;
if (pass)
{
@@ -989,7 +989,7 @@ bot_randomlist_t *BotLoadRandomStrings(char *filename)
return NULL;
} //end if
len = strlen(token.string) + 1;
- len = ALIGN(len);
+ len = PAD(len, sizeof(long));
size += sizeof(bot_randomlist_t) + len;
if (pass)
{
@@ -1020,7 +1020,7 @@ bot_randomlist_t *BotLoadRandomStrings(char *filename)
return NULL;
} //end if
len = strlen(chatmessagestring) + 1;
- len = ALIGN(len);
+ len = PAD(len, sizeof(long));
size += sizeof(bot_randomstring_t) + len;
if (pass)
{
@@ -2123,7 +2123,7 @@ bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
return NULL;
} //end if
len = strlen(chatmessagestring) + 1;
- len = ALIGN(len);
+ len = PAD(len, sizeof(long));
if (pass)
{
chatmessage = (bot_chatmessage_t *) ptr;