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,10 +76,10 @@ struct npc_type* npc_get_type(u16 npc_id)
76 76
     /* Not possible in a global scope because of gcc cow magic */
77 77
     struct npc_type** npc_tables[3] = {ow_main_table, ow_second_table, ow_third_table};
78 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 84
     u8 table = (npc_id >> 8);
85 85
     return (npc_tables[table][npc_id & 0xFF]);