Browse Source

non_pointer var functions

SBird1337 7 years ago
parent
commit
098b9120c1
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/overworld/overworld.c

+ 3
- 3
src/overworld/overworld.c View File

76
     /* Not possible in a global scope because of gcc cow magic */
76
     /* Not possible in a global scope because of gcc cow magic */
77
     struct npc_type** npc_tables[3] = {ow_main_table, ow_second_table, ow_third_table};
77
     struct npc_type** npc_tables[3] = {ow_main_table, ow_second_table, ow_third_table};
78
     //struct npc_type** npc_tables[] = {ow_main_table, ow_second_table, ow_third_table};
78
     //struct npc_type** npc_tables[] = {ow_main_table, ow_second_table, ow_third_table};
79
-    u16* replace_ow = var_access(OW_REPLACE_VAR);
80
-    if(*replace_ow > 0 && *replace_ow - 1 == npc_id)
79
+    u16 replace_ow = var_get(OW_REPLACE_VAR);
80
+    if(replace_ow > 0 && replace_ow - 1 == npc_id)
81
     {
81
     {
82
-        npc_id = *var_access(OW_REPLACE_TO_VAR);
82
+        npc_id = var_get(OW_REPLACE_TO_VAR);
83
     }
83
     }
84
     u8 table = (npc_id >> 8);
84
     u8 table = (npc_id >> 8);
85
     return (npc_tables[table][npc_id & 0xFF]);
85
     return (npc_tables[table][npc_id & 0xFF]);