Beginner steps[message #359946]
|
Thu, 07 May 2020 11:59
|
|
Billy Bones |
Messages:2
Registered:May 2020 |
|
|
Hello, World.
I am not a programmer, just a little versed. This is my first experience.
Trying to add a lot of weapons to the list. But if I add more than 255, the Editor freezes at the very beginning.
Just a black screen....
I make changes:
item Types.h:
...
UINT16 ubClassIndex;
...
#define FIRST_WEAPON 1
#define FIRST_AMMO ( FIRST_WEAPON + 257 )
#define FIRST_EXPLOSIVE (FIRST_AMMO + 60 )
#define FIRST_ARMOUR ( FIRST_EXPLOSIVE + 30 )
#define FIRST_MISC ( FIRST_ARMOUR + 40 )
#define FIRST_KEY ( FIRST_MISC + 70 )
Items.c:
{ IC_GUN, 257, TARGETCURS,...........
Weapons.c:
Add corresponding number of lines
But if I do #define FIRST_AMMO ( FIRST_WEAPON + 255 ) , then the editor works fine.
What am I doing wrong???
I do the editor by activating in builddefines.h the line #define JA2TESTVERSION.
Report message to a moderator
|
Civilian
|
|
|