So I've been working on designing a widget framework. Over the weekend I've managed to implement a nice structured system for widgets. It's C code (technically a C++ file, but C code). I've emulated interface inheritance of OOP systems, but casting structs to void, but having a parent struct inside that identifies the type (for recasting), so I stuff a bunch of different struct widgets as dependencies to a parent widget, or a layer. Callbacks by function pointers are done the same wave (values are cast as void and recast back on match). They have internal states, collision boxes, etc. Honestly, I wrote the new structure over the weekend and it worked at first shot (which makes me REALLY suspicious hahaha). Next, I'll work on designing how relationships can work between parent and children widgets (or all the way down the tree), if and how widget siblings should be able to talk to each other (I'm thinking a messaging queue that they subscribe to when attached to a parent).
My first drawing widget:
DrawColorWX.check(&DrawColorWX, mouse_x, mouse_y, buttonEvent, mouseLeftButton); You have to pass itself to itself (which is passed as void, then casted as a generic widget type to get the type element, then casted to what it's supposed to be).
And finally how it's deployed in the processing loop.
OpenBmpWX.widgetHeader.process(&OpenBmpWX, &inputEvent); I don't have a list yet to attach the widgets to, but since they can be cast to void* or a standard type it shouldn't be too difficult to implement. Ultimately I'd like to have a config data structure (xml or json) that's human readable, to create and initialize widgets. C doesn't support native dictionary type support, so I'd have to do a hashmap with function pointers, and the initialization code would match the function 'key' to the map (not too bad, just registering a function by adding it to the hashmap).
spenoza: Seriously? Lucretia is finally going to happen? Geez Louise.
Feb 7, 2020 16:43:05 GMT
videofestival: There is a category in the saru discord for updates
Feb 7, 2020 18:05:52 GMT
bigusschmuck: Nice! Yeah if I recall Jim Powers on the pce is mostly in English.
Feb 7, 2020 18:12:55 GMT
spenoza: I don't use Discord. Someone needs to pop over and keep us updated, too. I nominate you!
Feb 7, 2020 18:36:08 GMT
_jash: I'll pick up Jim Powers. I love the scrolling, would be cool if they made the game less grueling.
Feb 7, 2020 19:00:24 GMT
_jash: Also, yeah- who knows on Lucretia, There is a category, but I'm not sure any release day is set or anything.
Feb 7, 2020 19:00:57 GMT
bigusschmuck: I'm half expecting folk to put in the notice if you bought this from pceworks aka Tobias then you are a dumbass. Lol
Feb 7, 2020 20:36:28 GMT
videofestival: A trend I've been seeing for at least a year now: fellow collectors don't like to trade stuff anymore. They rather stop responding. No matter how much over value, I am offering. Best ones try to find my source of some rarities and try to backdoor cheaper.
Feb 10, 2020 17:20:38 GMT
videofestival: When I started collecting, trading rare stuff was the way to go. Everyone had collected rare, later expensive stuff cheap at some point and had stuff to trade.
Feb 10, 2020 17:22:17 GMT
spenoza: There's actually quite a lot of interest in the PC Engine and Turbo out there, but many collectors have moved away from forums like this. There's a LOT of activity you don't see in these spaces. They may be holding out for valuation changes.
Feb 11, 2020 15:21:25 GMT
Black_Tiger: Shipping from Canada is so expensive now that it's not worth doing trades. It's $100 to ship a game to Europe with tracking and insurance.
Feb 11, 2020 19:15:55 GMT
videofestival: Those shipping costs are crazy! This very forum has been nice to do trades actually- did two so far and both are great guys, who enjoy playing and collecting. Might be a regional problem in western Europe. Collectors seem more like lonely investors now.
Feb 11, 2020 20:21:43 GMT
stealthrush: I'm no longer own a PCE if anybody is interested i'm selling PCE CD games and a few HU cards.
Feb 11, 2020 22:15:52 GMT
dshadoff: I agree that shipping from Canada is crazy expensive. It's too bad, there's no point in making any hobby projects in this country, and especially not production-size batches of anything (for separate reasons)
Feb 12, 2020 1:20:11 GMT
spenoza: stealthrush You should make a thread for that, with some references.
Feb 12, 2020 15:05:05 GMT
soop: Does anyone remember someone posting the original art from soldier blade?
Feb 12, 2020 22:41:02 GMT
soop: Like from the actual.artist without titles etc
Feb 12, 2020 22:41:26 GMT
spenoza: I don't remember that, but I want
Feb 13, 2020 15:29:57 GMT
spenoza: So, how many engines you guys got in your PCs?
Feb 20, 2020 14:50:33 GMT