Skip to content

Implement the "flip" function.#2

Merged
gameblabla merged 1 commit into
gameblabla:sdl12_rs97from
mibus:implement-flip
Mar 27, 2021
Merged

Implement the "flip" function.#2
gameblabla merged 1 commit into
gameblabla:sdl12_rs97from
mibus:implement-flip

Conversation

@mibus

@mibus mibus commented Mar 27, 2021

Copy link
Copy Markdown

This necessitates plumbing through a callback function, so that SDL can be
called.

So as to not repeat ourselves, extract the code that was used around update()
calls, FPS handling, etc, and have a shared function.

While around, reshuffle some initialisation to be earlier, and make it so
there's not a 1/FPS gap before drawing a frame, but a 1/FPS gap between
frames (assuming non-zero time to calculate the next frame etc).

@mibus

mibus commented Mar 27, 2021

Copy link
Copy Markdown
Author

FWIW this is enough to get the intro screen for Picopolis to load.

https://www.lexaloffle.com/bbs/?pid=42185

(The rest of the game still doesn't, but it's one step closer ;)

This necessitates plumbing through a callback function, so that SDL can be
called.

So as to not repeat ourselves, extract the code that was used around update()
calls, FPS handling, etc, and have a shared function.

While around, reshuffle some initialisation to be earlier, and make it so
there's not a 1/FPS gap before drawing a frame, but a 1/FPS gap _between_
frames (assuming non-zero time to calculate the next frame etc).
@mibus

mibus commented Mar 27, 2021

Copy link
Copy Markdown
Author

I actually broke the main loop the first time; didn't notice that I'd lost the machine.code().update() call! Fixed now.

@mibus mibus mentioned this pull request Mar 27, 2021
@gameblabla

Copy link
Copy Markdown
Owner

Those are very interesting changes !
But the issue is that the main retro8 now has added SDL1.2 support so there's not much point to this fork... :/
I can still merge this though and make another release for the GKD350H.

@mibus

mibus commented Mar 27, 2021

Copy link
Copy Markdown
Author

Ah, I saw they'd been doing work, didn't realise it was actually usable already. I did a retrofw opk build (rs-97 compile + the desktop file from the old opk) and it seemed to work OK on my LDK Game Horizontal, so I think you'll be good if you want to do other builds.

I'll have to see if I can build upstream (and see if they still need patches like these).

Thanks!

@Jakz

Jakz commented Mar 27, 2021

Copy link
Copy Markdown

This is a missing feature on the upstream indeed! No idea about how this will integrate since some parts of code could have been changed but I'm quite positive on this.

@gameblabla gameblabla merged commit 15c6083 into gameblabla:sdl12_rs97 Mar 27, 2021
@gameblabla

Copy link
Copy Markdown
Owner

I'm merging this for now. If there are any issues, i will revert it and let you know.

@mibus

mibus commented Mar 27, 2021

Copy link
Copy Markdown
Author

FWIW, I've rewritten the two main chunks of these patches against upstream - Jakz#28 - thanks for letting me know!

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.

3 participants