Skip to content

Commit

Permalink
Migrated all font weight constants to source exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemongrass3110 committed Jan 6, 2016
1 parent de61a19 commit 958b6cd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
11 changes: 0 additions & 11 deletions db/const.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2381,17 +2381,6 @@ THANATOS_KEEP 10009
4_F_ARUNA_POP2 10173
4_JACK_HEAD 10174

FW_DONTCARE 0
FW_THIN 100
FW_EXTRALIGHT 200
FW_LIGHT 300
FW_NORMAL 400
FW_MEDIUM 500
FW_SEMIBOLD 600
FW_BOLD 700
FW_EXTRABOLD 800
FW_HEAVY 900

VAR_HEAD 1
VAR_WEAPON 2
VAR_HEAD_TOP 3
Expand Down
8 changes: 4 additions & 4 deletions src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -10380,7 +10380,7 @@ BUILDIN_FUNC(announce)
const char *mes = script_getstr(st,2);
int flag = script_getnum(st,3);
const char *fontColor = script_hasdata(st,4) ? script_getstr(st,4) : NULL;
int fontType = script_hasdata(st,5) ? script_getnum(st,5) : 0x190; // default fontType (FW_NORMAL)
int fontType = script_hasdata(st,5) ? script_getnum(st,5) : FW_NORMAL; // default fontType
int fontSize = script_hasdata(st,6) ? script_getnum(st,6) : 12; // default fontSize
int fontAlign = script_hasdata(st,7) ? script_getnum(st,7) : 0; // default fontAlign
int fontY = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontY
Expand Down Expand Up @@ -10439,7 +10439,7 @@ BUILDIN_FUNC(mapannounce)
const char *mes = script_getstr(st,3);
int flag = script_getnum(st,4);
const char *fontColor = script_hasdata(st,5) ? script_getstr(st,5) : NULL;
int fontType = script_hasdata(st,6) ? script_getnum(st,6) : 0x190; // default fontType (FW_NORMAL)
int fontType = script_hasdata(st,6) ? script_getnum(st,6) : FW_NORMAL; // default fontType
int fontSize = script_hasdata(st,7) ? script_getnum(st,7) : 12; // default fontSize
int fontAlign = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontAlign
int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY
Expand All @@ -10465,7 +10465,7 @@ BUILDIN_FUNC(areaannounce)
const char *mes = script_getstr(st,7);
int flag = script_getnum(st,8);
const char *fontColor = script_hasdata(st,9) ? script_getstr(st,9) : NULL;
int fontType = script_hasdata(st,10) ? script_getnum(st,10) : 0x190; // default fontType (FW_NORMAL)
int fontType = script_hasdata(st,10) ? script_getnum(st,10) : FW_NORMAL; // default fontType
int fontSize = script_hasdata(st,11) ? script_getnum(st,11) : 12; // default fontSize
int fontAlign = script_hasdata(st,12) ? script_getnum(st,12) : 0; // default fontAlign
int fontY = script_hasdata(st,13) ? script_getnum(st,13) : 0; // default fontY
Expand Down Expand Up @@ -18998,7 +18998,7 @@ BUILDIN_FUNC(instance_announce) {
const char *mes = script_getstr(st,3);
int flag = script_getnum(st,4);
const char *fontColor = script_hasdata(st,5) ? script_getstr(st,5) : NULL;
int fontType = script_hasdata(st,6) ? script_getnum(st,6) : 0x190; // default fontType (FW_NORMAL)
int fontType = script_hasdata(st,6) ? script_getnum(st,6) : FW_NORMAL; // default fontType
int fontSize = script_hasdata(st,7) ? script_getnum(st,7) : 12; // default fontSize
int fontAlign = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontAlign
int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY
Expand Down
12 changes: 12 additions & 0 deletions src/map/script_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2594,6 +2594,18 @@
export_constant(QTYPE_WARG2);
export_constant(QTYPE_NONE);

/* font weight types */
export_constant(FW_DONTCARE);
export_constant(FW_THIN);
export_constant(FW_EXTRALIGHT);
export_constant(FW_LIGHT);
export_constant(FW_NORMAL);
export_constant(FW_MEDIUM);
export_constant(FW_SEMIBOLD);
export_constant(FW_BOLD);
export_constant(FW_EXTRABOLD);
export_constant(FW_HEAVY);

/* add skill types */
script_set_constant("SKILL_PERM",ADDSKILL_PERMANENT,false);
script_set_constant("SKILL_TEMP",ADDSKILL_TEMP,false);
Expand Down

0 comments on commit 958b6cd

Please sign in to comment.