LCOV - code coverage report
Current view: top level - asar - assembleblock.h (source / functions) Coverage Total Hit
Test: asar build #66 Lines: 100.0 % 8 8
Test Date: 2024-01-16 02:45:19 Functions: 100.0 % 2 2
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #pragma once
       2                 :             : 
       3                 :             : enum { arch_65816, arch_spc700, arch_superfx };
       4                 :             : extern int arch;
       5                 :             : 
       6                 :             : bool assemblemapper(char** word, int numwords);
       7                 :             : 
       8                 :         156 : struct snes_struct {
       9                 :             :         string parent;
      10                 :             :         int base_end;
      11                 :             :         int struct_size;
      12                 :             :         int object_size;
      13                 :             :         bool is_static;
      14                 :             : };
      15                 :             : 
      16                 :             : extern assocarr<snes_struct> structs;
      17                 :             : extern int label_counter;
      18                 :             : 
      19                 :             : 
      20                 :             : struct snes_label {
      21                 :             :         unsigned int pos;
      22                 :             :         int id;
      23                 :             :         int freespace_id;
      24                 :             :         bool is_static;
      25                 :             : 
      26                 :        3250 :         snes_label()
      27                 :        3250 :         {
      28                 :        3250 :                 pos = 0;
      29                 :        3250 :                 is_static = false;
      30                 :        3250 :                 freespace_id = 0;
      31                 :        3250 :                 id = label_counter++;
      32                 :        3250 :         }
      33                 :             : };
      34                 :             : 
      35                 :             : 
      36                 :             : // RPG Hacker: Really the only purpose of this struct is to support pushtable and pulltable
      37                 :             : // Also don't know where else to put this, so putting it in this header
      38                 :             : /*struct chartabledata {
      39                 :             :         unsigned int table[256];
      40                 :             : };
      41                 :             : 
      42                 :             : extern chartabledata table;
      43                 :             : unsigned int get_table_val(int inp);
      44                 :             : void set_table_val(int inp, unsigned int out);*/
      45                 :             : 
      46                 :             : struct whiletracker {
      47                 :             :         bool iswhile;
      48                 :             :         int startline;
      49                 :             :         bool cond;
      50                 :             :         bool is_for;
      51                 :             :         string for_variable;
      52                 :             :         string for_var_backup;
      53                 :             :         bool for_has_var_backup;
      54                 :             :         int for_start;
      55                 :             :         int for_end;
      56                 :             :         int for_cur;
      57                 :             : };
      58                 :             : 
      59                 :             : extern autoarray<whiletracker> whilestatus;
      60                 :             : 
      61                 :             : // 0 - not first block, not in for
      62                 :             : // 1 - first block
      63                 :             : // 2 - inside single-line for
      64                 :             : // 3 - after endfor
      65                 :             : extern int single_line_for_tracker;
      66                 :             : 
      67                 :             : bool confirmname(const char * name);
      68                 :             : string posneglabelname(const char ** input, bool define);
      69                 :             : 
      70                 :             : void write1_pick(unsigned int num);
      71                 :             : void write2(unsigned int num);
      72                 :             : void write3(unsigned int num);
      73                 :             : void write4(unsigned int num);
      74                 :             : 
      75                 :             : int snestopc_pick(int addr);
      76                 :             : 
      77                 :             : int getlenfromchar(char c);
      78                 :             : 
      79                 :             : snes_label labelval(const char ** rawname, bool define = false);
      80                 :             : snes_label labelval(string name, bool define = false);
      81                 :             : bool labelval(const char ** rawname, snes_label * rval, bool define = false);
      82                 :             : bool labelval(string name, snes_label * rval, bool define = false);
      83                 :             : 
      84                 :             : const char * safedequote(char * str);
      85                 :             : 
      86                 :             : void checkbankcross();
      87                 :             : 
      88                 :             : void initstuff();
      89                 :             : void finishpass();
      90                 :             : 
      91                 :             : void assembleblock(const char * block, int& single_line_for_tracker);
      92                 :             : 
      93                 :             : extern int snespos;
      94                 :             : extern int realsnespos;
      95                 :             : extern int startpos;
      96                 :             : extern int realstartpos;
      97                 :             : 
      98                 :             : extern int bytes;
      99                 :             : 
     100                 :             : extern int numopcodes;
     101                 :             : 
     102                 :             : extern int numif;
     103                 :             : extern int numtrue;
     104                 :             : 
     105                 :             : extern int freespaceid;
     106                 :             : 
     107                 :             : extern assocarr<snes_label> labels;
     108                 :             : 
     109                 :             : extern autoarray<int>* macroposlabels;
     110                 :             : extern autoarray<int>* macroneglabels;
     111                 :             : extern autoarray<string>* macrosublabels;
     112                 :             : 
     113                 :             : extern autoarray<string> sublabels;
     114                 :             : extern string ns;
     115                 :             : extern autoarray<string> namespace_list;
     116                 :             : 
     117                 :             : extern autoarray<string> includeonce;
        

Generated by: LCOV version 2.0-1