Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Beginner steps (???)
Beginner steps[message #359946] Thu, 07 May 2020 11:59
Billy Bones is currently offline 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
Previous Topic: JA2 mod B2B
Next Topic: Editor & more than 255 weapons
Goto Forum:
  


Current Time: Fri Mar 29 07:04:28 GMT+2 2024

Total time taken to generate the page: 0.01125 seconds