Skip to content

Conversation

@Vagabond
Copy link
Member

@Vagabond Vagabond commented Sep 22, 2025

Things to do:

  • Require a mod manifest in each zip file
  • Either do not load mods in netplay mode, or load only cosmetic changes (would require retaining original sprites for compatible collision detection)
  • Fix all the memory leaks
  • Support for replacing sound samples
  • Support for sprite information like collision coordinates, offsets and index reuse
  • Support for wholly new tournaments
  • Support for wholly new animations
  • Support for wholly new sprites (adding frames to an animation)
  • Support for tournament pilot photos/logos to be higher resolution
  • Switch from file IDs to filenames (eg scene_id 8 -> "ARENA0", har_id 1 -> "FIGHTR1")
  • unify with https://www.omf2097.com/wiki/doku.php?id=openomf:openomf_mod_folder_structure

Depends on #1312 to properly display high-res assets.

@@ -0,0 +1,24 @@
#ifndef MODMANAGER_H
#define MODMANAGER_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modmanager seems unnecessarily long. Maybe just prefix with "mods_" ?

#include "resources/af_move.h"
#include "resources/animation.h"
#include "resources/bk_info.h"
#include "utils/hashmap.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hashmap not used in header btw

}
}
#ifdef OPUSFILE_FOUND
} else if(strcmp(".ogg", str_c(&ext)) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str_equals(&ext, ".ogg")


for(int id = 0; id < num_hars; id++) {
if(strcasecmp(name, har_type_names[id]) == 0) {
if(omf_strncasecmp(name, har_type_names[id], strlen(har_type_names[id])) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-        if(strcasecmp(name, har_type_names[id]) == 0) {
+        if(omf_strncasecmp(name, har_type_names[id], strlen(har_type_names[id])) == 0) {

these lines lines are not equivalent, as the latter is a "is har_type_names[id] a suffix of name?" test, wheres the former is an equality test.

Do not pass strlen into the length argument of strncasecmp, this is an anti-pattern.

Perhaps: omf_strncasecmp(name, har_type_names[id], SIZE_MAX), if you want to compare the whole strings? You could add this as a helper method, call it "omf_strcasecmp."

Copy link
Member

@Nopey Nopey Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: someone already added the omf_strcasecmp helper method, please use it.

int omf_strcasecmp(char const *s1, char const *s2) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants