Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melon file select fixes #13

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
6e77ed5
first test of item replacement (hardcoded midos)
May 25, 2022
737d1e9
more chests (kokiri sword/deku tree/dodongos)
May 25, 2022
af28053
found a dupe, need to find something more unique
May 26, 2022
c9509e2
should be unique enough now
May 26, 2022
7b47555
move logic out of z_en_box, use unordered_map
May 26, 2022
855815c
read in locations from spoilerfile
May 26, 2022
a99f3cf
add some items, update vcxproj
May 26, 2022
9c5789d
more items
May 26, 2022
2fc4b54
fix vcxproj
May 26, 2022
bf9f404
bottom of the well stuff
May 26, 2022
a9ddf6b
forest temple
May 27, 2022
1122c51
add return to extern
May 27, 2022
56cdaff
added progressive items
MelonSpeedruns May 27, 2022
4f7c778
switch upgrade magic numbers to use enum
MelonSpeedruns May 27, 2022
1772116
don't crash with no spoilerfile, fix unknown_get
May 27, 2022
31d5db4
actor item detection functions + save context for randomized file
MelonSpeedruns May 27, 2022
60be37f
Merge branch 'testing-out-item-replacement' into testing-out-item-rep…
MelonSpeedruns May 27, 2022
bb0d962
randomized save files are not compatible with normal ones
MelonSpeedruns May 27, 2022
4393cdb
Merge pull request #1 from MelonSpeedruns/testing-out-item-replacemen…
briaguya-ai May 27, 2022
0dd4ab8
fix n64 save creation with randomizer disabled
MelonSpeedruns May 27, 2022
dd19b9e
Merge branch 'testing-out-item-replacement' into testing-out-item-rep…
MelonSpeedruns May 27, 2022
427ffe7
Merge pull request #2 from MelonSpeedruns/testing-out-item-replacemen…
briaguya-ai May 27, 2022
99c5d2c
add fire temple chests
May 28, 2022
4c0c70b
Merge branch 'testing-out-item-replacement' of github.com:briaguya-ai…
May 28, 2022
745b7e0
seed loading is now per save
MelonSpeedruns May 28, 2022
b46e92f
Merge pull request #3 from MelonSpeedruns/testing-out-item-replacemen…
briaguya-ai May 28, 2022
62c3a72
water temple chests
May 28, 2022
6df0101
shadow temple chests
May 28, 2022
cd2aa66
fixed anju
MelonSpeedruns May 28, 2022
8624f23
Merge branch 'testing-out-item-replacement' into testing-out-item-rep…
MelonSpeedruns May 28, 2022
63fe06a
fix switch/case, bandaid save stuff
May 28, 2022
265ecb9
i wonder what's going on here
May 28, 2022
ee3055b
Merge branch 'testing-out-item-replacement' into testing-out-item-rep…
MelonSpeedruns May 28, 2022
b3d0034
use ints instead
May 28, 2022
c987a28
remove temporary code from testing
May 28, 2022
602215f
minor whitespace cleanup
May 28, 2022
801dc04
Merge pull request #4 from briaguya-ai/testing-out-item-replacement-w…
briaguya-ai May 28, 2022
51152f8
item cutscenes always play in rando
MelonSpeedruns May 28, 2022
49d4102
Merge branch 'testing-out-item-replacement' into testing-out-item-rep…
MelonSpeedruns May 28, 2022
f76363f
Update soh.vcxproj.filters
MelonSpeedruns May 28, 2022
84911ee
Merge pull request #5 from MelonSpeedruns/testing-out-item-replacemen…
briaguya-ai May 28, 2022
90cfd12
child spirit
May 28, 2022
857a7d8
decent start on consolidation
May 28, 2022
66e6b13
fix chests
May 28, 2022
4848bbc
remove commented out code
May 28, 2022
295f073
heart pieces now have the proper display model before picking them up
MelonSpeedruns May 28, 2022
61b7cf7
fix param order
May 28, 2022
c583d43
fix param order
May 28, 2022
f088de1
put useful comment back
May 28, 2022
3178a54
Merge pull request #8 from MelonSpeedruns/testing-out-item-replacemen…
briaguya-ai May 28, 2022
a1b2697
Merge pull request #6 from briaguya-ai/child-spirit
briaguya-ai May 28, 2022
cda4139
Merge branch 'testing-out-item-replacement' into consolidate-item-rep…
May 28, 2022
c8b5895
switch to use ogParams (gettings some segfaults)
May 28, 2022
86af9d3
use OG params
May 28, 2022
d7bb8d7
no more zr segfaults
May 28, 2022
7b1cb9a
got the hookshots rendering
May 29, 2022
5c39e52
make setup still works
May 29, 2022
f400443
hash icons render now
May 29, 2022
c7772a1
added direct3d drag support
MelonSpeedruns May 29, 2022
3a84be3
added link's pocket medallion/gem
MelonSpeedruns May 29, 2022
ee8bb45
gohma's HC & heart containers in general are randomized now
MelonSpeedruns May 29, 2022
b1a2c4d
all warps now skip cutscenes
MelonSpeedruns May 29, 2022
6f0d295
Merge branch 'develop' of https://github.com/HarbourMasters/Shipwrigh…
MelonSpeedruns May 29, 2022
7e8355c
Merge branch 'HarbourMasters-develop' into melon-file-select-fixes
MelonSpeedruns May 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions libultraship/libultraship/Lib/Fast3D/gfx_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define GFX_API_NAME "SDL2 - OpenGL"

static SDL_Window *wnd;
static SDL_Window* wnd;
static SDL_GLContext ctx;
static int inverted_scancode_table[512];
static int vsync_enabled = 0;
Expand Down Expand Up @@ -105,7 +105,8 @@ static void set_fullscreen(bool on, bool call_callback) {
window_width = mode.w;
window_height = mode.h;
SDL_ShowCursor(false);
} else {
}
else {
window_width = DESIRED_SCREEN_WIDTH;
window_height = DESIRED_SCREEN_HEIGHT;
}
Expand All @@ -128,9 +129,11 @@ static int target_fps = 60;
#define FRAME_INTERVAL_US_NUMERATOR 1000000
#define FRAME_INTERVAL_US_DENOMINATOR (target_fps)

static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen) {
static void gfx_sdl_init(const char* game_name, bool start_in_fullscreen) {
SDL_Init(SDL_INIT_VIDEO);

SDL_EventState(SDL_DROPFILE, SDL_ENABLE);

SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

Expand All @@ -145,7 +148,7 @@ static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen) {
int len = sprintf(title, "%s (%s)", game_name, GFX_API_NAME);

wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
window_width, window_height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
window_width, window_height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);

if (start_in_fullscreen) {
set_fullscreen(true, false);
Expand Down Expand Up @@ -199,15 +202,16 @@ static void gfx_sdl_main_loop(void (*run_one_game_iter)(void)) {
}
}

static void gfx_sdl_get_dimensions(uint32_t *width, uint32_t *height) {
static void gfx_sdl_get_dimensions(uint32_t* width, uint32_t* height) {
*width = window_width;
*height = window_height;
}

static int translate_scancode(int scancode) {
if (scancode < 512) {
return inverted_scancode_table[scancode];
} else {
}
else {
return 0;
}
}
Expand All @@ -226,30 +230,38 @@ static void gfx_sdl_onkeyup(int scancode) {
}
}

extern "C" void LoadItemLocations(const char* spoilerFileName);

static void gfx_sdl_handle_events(void) {
SDL_Event event;
char* dropped_filedir;
while (SDL_PollEvent(&event)) {
SohImGui::EventImpl event_impl;
event_impl.sdl = { &event };
SohImGui::Update(event_impl);
switch (event.type) {
#ifndef TARGET_WEB
// Scancodes are broken in Emscripten SDL2: https://bugzilla.libsdl.org/show_bug.cgi?id=3259
case SDL_KEYDOWN:
gfx_sdl_onkeydown(event.key.keysym.scancode);
break;
case SDL_KEYUP:
gfx_sdl_onkeyup(event.key.keysym.scancode);
break;
case SDL_KEYDOWN:
gfx_sdl_onkeydown(event.key.keysym.scancode);
break;
case SDL_KEYUP:
gfx_sdl_onkeyup(event.key.keysym.scancode);
break;
#endif
case SDL_WINDOWEVENT:
if (event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
window_width = event.window.data1;
window_height = event.window.data2;
}
break;
case SDL_QUIT:
exit(0);
case SDL_WINDOWEVENT:
if (event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
window_width = event.window.data1;
window_height = event.window.data2;
}
break;
case SDL_DROPFILE:
{
LoadItemLocations(event.drop.file);
break;
}
case SDL_QUIT:
exit(0);
}
}
}
Expand Down Expand Up @@ -335,4 +347,4 @@ struct GfxWindowManagerAPI gfx_sdl = {
gfx_sdl_get_detected_hz
};

#endif
#endif
6 changes: 6 additions & 0 deletions libultraship/libultraship/SohImGuiImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,12 @@ namespace SohImGui {
ImGui::EndMenu();
}

if (ImGui::BeginMenu("Randomizer"))
{
EnhancementCheckbox("Enable Randomizer", "gRandomizer");
ImGui::EndMenu();
}

if (ImGui::BeginMenu("Developer Tools"))
{
EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled");
Expand Down
1 change: 1 addition & 0 deletions libultraship/libultraship/SohImGuiImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ namespace SohImGui {
void ResetColor(const char* cvarName, ImVec4* colors, ImVec4 defaultcolors, bool has_alpha);
ImTextureID GetTextureByID(int id);
ImTextureID GetTextureByName(const std::string& name);
// void LoadItemLocations(const char* spoilerFileName);
}
Loading