Conversation
38cfbe7 to
c95cddd
Compare
49fe496 to
b401e12
Compare
b50f862 to
7f414fd
Compare
192c11d to
2ab7473
Compare
|
I'm going to start prepping this for review, I am going to punt all the remaining tasks to future PRs, the only bug remaining I intend to fix is that there's a problem with pilot portrait alignment in tournament matches. |
|
"Prevent most mod assets loading during netplay" -- most. What is allowed ? |
| unsigned long long entry_size = zip_entry_uncomp_size(zip); | ||
| void *entry_buf = omf_calloc(entry_size, 1); | ||
| if(zip_entry_noallocread(zip, entry_buf, entry_size) < 0) { | ||
| log_warn("failed to load %s into memory", zip_entry_name(zip)); |
| } | ||
|
|
||
| str filename; | ||
| str_from_format(&filename, "tournaments/%s/tournament.ini", tournament_name); |
There was a problem hiding this comment.
str_free() seems to be missing before the next call to str_from_format
| // For arenas, check for 'common' for anim_ids 6 (round), 7 (number), 8 (you lose), 9 (you win), 10 (fight), | ||
| // 11 (ready), 24 (dust 1), 25 (dust 2), 26 (dust 3), 27 (match counters) | ||
|
|
||
| str_from_format(&filename, "scenes/common/%d/animdata.ini", anim_id); |
|
|
||
| if(!allow_transparency && trans) { | ||
| log_error("PNG contained transparent pixels"); | ||
| return false; |
There was a problem hiding this comment.
I think this leaks png_ptr and info_ptr
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
|
||
| // Convert | ||
| af_create(a, &tmp); | ||
| af_create(a, &tmp, &fn); |
|
|
||
| // Convert | ||
| bk_create(b, &tmp); | ||
| bk_create(b, &tmp, &fn); |
| unsigned char *buf; | ||
| size_t len; | ||
| // check the modmanager here for a music mod | ||
| path_stem(&music, &fn); |
src/resources/modmanager.c
Outdated
| unsigned int count = list_size(l); | ||
| log_info("found %d music files for %s", count, name); | ||
| if(index >= count) { | ||
| log_warn("requested index %s into list of %d members", index, count); |
| #include <confuse.h> | ||
|
|
||
| #define UPDATE_FIELD_INT(field_name, struct_field, new_value) \ | ||
| if(new_value != 0 && struct_field != new_value) { \ |
There was a problem hiding this comment.
btw, I guess this means that mods cannot set field values intentionally to 0, ever ? Is that okay ?
| if(!hashmap_get_str(&mod_resources, str_c(&filename), (void **)&obuf, &len)) { | ||
| assert(obuf->type == MOD_SPRITE); | ||
| log_info("found portrait for pilot %d in %s", pilot_id, trn_name); | ||
| // omf_free(pilot_data->photo); |
music and arena backgrounds right now |
Things to do:
Depends on #1312 to properly display high-res assets.