MCPcopy Create free account
hub / github.com/BanjoRecomp/BanjoRecomp / recomputil_u32_value_hashmap_get

Function recomputil_u32_value_hashmap_get

src/game/recomp_data_api.cpp:230–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void recomputil_u32_value_hashmap_get(uint8_t* rdram, recomp_context* ctx) {
231 uint32_t mapkey = _arg<0, uint32_t>(rdram, ctx);
232 uint32_t key = _arg<1, uint32_t>(rdram, ctx);
233 PTR(uint32_t) val_out = _arg<2, PTR(uint32_t)>(rdram, ctx);
234
235 U32ValueMap* map;
236 if (!u32_value_hashmaps.get(mapkey, &map)) {
237 HANDLE_INVALID_ERROR();
238 }
239
240 uint32_t ret;
241 if (map->get(key, ret)) {
242 MEM_W(0, val_out) = ret;
243 _return(ctx, 1);
244 return;
245 }
246 else {
247 _return(ctx, 0);
248 return;
249 }
250}
251
252void recomputil_u32_value_hashmap_erase(uint8_t* rdram, recomp_context* ctx) {
253 uint32_t mapkey = _arg<0, uint32_t>(rdram, ctx);

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected