xensik / gsc-tool

A utility to compile & decompile IW engine game scripts.
GNU General Public License v3.0
230 stars 42 forks source link

feat(compiler): produce a developer source map #167

Closed ineedbots closed 9 months ago

ineedbots commented 9 months ago

Needs better main app output path; Currently, always produces the developer map, needs to make it optional

ineedbots commented 9 months ago

the dev_map structure is as follows

#pragma pack(push, 1)
struct dev_map_instruction
{
  u32 codepos;
  position::counter_type line;
  position::counter_type col;
};

struct dev_map
{
  u32 num_instructions;
  dev_map_instruction instructions[num_instructions];
};
#pragma pack(pop)
xensik commented 9 months ago
#pragma pack(push, 1)
struct dev_map_instruction
{
  u32 codepos;
  u16 line;
  u16 col;
};

struct dev_map
{
  u32 num_instructions;
  dev_map_instruction instructions[num_instructions];
};
#pragma pack(pop)

updated to u16 for position data