Преглед на файлове

non_pointer var functions

SBird1337 преди 7 години
родител
ревизия
098b9120c1
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3
    3
      src/overworld/overworld.c

+ 3
- 3
src/overworld/overworld.c Целия файл

@@ -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]);