Open sean-gilliam opened 5 years ago
I see someone is working in the weather system! Also I completely agree.
I'm almost done converting the weather-related vnums as a start.
There will be multiple PRs for this most likely to keep them all clean most likely. There are so many defines spread across the game right now...
What about in code/interp.h
?
#define ML MAX_LEVEL /* implementor */
#define L1 MAX_LEVEL - 1 /* creator */
#define L2 MAX_LEVEL - 2 /* supreme being */
#define L3 MAX_LEVEL - 3 /* deity */
#define L4 MAX_LEVEL - 4 /* god */
#define L5 MAX_LEVEL - 5 /* immortal */
#define L6 MAX_LEVEL - 6 /* demigod */
#define L7 MAX_LEVEL - 7 /* angel */
#define L8 MAX_LEVEL - 8 /* avatar */
#define IM LEVEL_IMMORTAL /* avatar */
#define HE LEVEL_HERO /* hero */
Is this something that would make more sense as an enum?
Honestly these look like something that should be in the configuration files
Just found a whole bunch of these that seem more like enums in code/merc.h#L323-446
I don't know if the telnet colors will, but the others are definitely enumerated values that need converted
code/merc.h
[ ] Reply Enum
[ ] Quest Type Enum
[ ] Chat To Enum
[ ] Note Type Enum
[ ] Command Type
[ ] Wearable effects
And the list goes on..
What do we think about this one for the ASCII Characters? merc.h lines 1117-1159
#define ASCII_A 0
#define ASCII_B 1
#define ASCII_C 2
#define ASCII_D 3
#define ASCII_E 4
#define ASCII_F 5
#define ASCII_G 6
#define ASCII_H 7
#define ASCII_I 8
#define ASCII_J 9
#define ASCII_K 10
#define ASCII_L 11
#define ASCII_M 12
#define ASCII_N 13
#define ASCII_O 14
#define ASCII_P 15
#define ASCII_Q 16
#define ASCII_R 17
#define ASCII_S 18
#define ASCII_T 19
#define ASCII_U 20
#define ASCII_V 21
#define ASCII_W 22
#define ASCII_X 23
#define ASCII_Y 24
#define ASCII_Z 25
#define ASCII_aa 26
#define ASCII_bb 27
#define ASCII_cc 28
#define ASCII_dd 29
#define ASCII_ee 30
#define ASCII_ff 31
#define ASCII_gg 32
#define ASCII_hh 33
#define ASCII_ii 34
#define ASCII_jj 35
#define ASCII_kk 36
#define ASCII_ll 37
#define ASCII_mm 38
#define ASCII_nn 39
#define ASCII_oo 40
#define ASCII_pp 41
#define MAX_BIT 42
That would be a good one to convert.
@sean-gilliam I've noticed that you have moved some of the weather #define
s to enums in a spearate file. Is there a certain pattern you guys are wanting to follow for where these new enums end up?
@sean-gilliam I've noticed that you have moved some of the weather
#define
s to enums in a spearate file. Is there a certain pattern you guys are wanting to follow for where these new enums end up?
It was @rezalas who moved them. I think grouping them logically is the best course so that we can eventually transition to enum classes. This will help in our continuing effort to move to C++.
There are quite a few places where defines are used instead of enumerations.
For example:
This is better expressed as an enumeration
We should consider using enumerations instead of defines.