Author Topic: [C /axe?] Hinawa Battle Engine  (Read 26871 times)

0 Members and 1 Guest are viewing this topic.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #75 on: December 05, 2014, 04:51:31 am »
Not really HBE's code relatedn but I started implmenting MAkefile-wise mutli-target system. With a variable change (here TARGET), you can choose to compile for "DESKTOP" (use your computer's gcc) or "FX_9860" (use sh3-eb-gcc). Obviously, compilations flags will depend of your target.

Now, platform dependant code is locate in {include, src}/$(TARGET) . That'll help making the engine platform independant. Does anyone has a way to make that a little bit cleaner? (like moving the source into an arch folder or something else)?

Addendum : How could I program Axe on computer? It would be fun to have an Axe target! :p (But quite unmaintenable or unusable as the engine will surely take too much  ram for a simple C compilation)

EDIT : I started to draft an UML schema to help me vizualize the struture. Here's the thing at this moment. Do you have an idea about what's going on with it? Does it seem clear to you right now?
« Last Edit: December 05, 2014, 07:05:04 am by Eiyeron »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [C /axe?] Hinawa Battle Engine
« Reply #76 on: December 05, 2014, 10:23:57 am »
Well you have SDCC which can output z80 code. You need to implement the OS calls though.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #77 on: December 05, 2014, 11:54:00 am »
Does it make a good work optimizing? It's pretty critical to have size optimizations when one have 20KB of RAM.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: [C /axe?] Hinawa Battle Engine
« Reply #78 on: December 05, 2014, 12:25:32 pm »
Contra and deeph also did some work with C over at yAronet:
CTI83Compiler un programme en C pour ti83
[C] TI-Lib - a C library for writing games, essentially making GBA Lib usable in C programs. deeph says it's based off GBA lib 2, but ticalc only lists GBA lib v1.0.

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: [C /axe?] Hinawa Battle Engine
« Reply #79 on: December 05, 2014, 12:35:07 pm »
deeph says it's based off GBA lib 2, but ticalc only lists GBA lib v1.0.
Yes the author, Martin Bousquet, only sent it to me for debug purpose, but since it never came out I decided to publish it so everyone could enjoy it.

And concerning TI-Lib I haven't continued it (yet) as it seems to have no interest for anyone but me.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #80 on: December 05, 2014, 01:15:04 pm »
Thanks for the link but I meant "how will be able to fit a medium/heavy battle engine, with sprites (forget attack animations or just basic ones), hypothetic battle background and enemies sprites in a  nutshell! :p

At the moment I'm working at the core engine. Graphisms, input, I/O will be for later. I need to figure the rest of the thing and it'll take some time as I'm not a program designer.

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: [C /axe?] Hinawa Battle Engine
« Reply #81 on: December 05, 2014, 03:01:33 pm »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #82 on: December 05, 2014, 04:29:08 pm »
Oh thanks, I've never seen the third one. Thanks for the link! (I already had a sort of RLE on the Axe prototype)

EDIT : I made progress in the UML schema but I'm having troubles with arrays/ multiples function arguments. ><"
« Last Edit: December 06, 2014, 08:15:25 am by Eiyeron »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #83 on: December 09, 2014, 11:02:45 am »
Sooo, I've been some tweaks to port Monochromelib (FX-9860 graphical librairy). It works on SDL2 and mostly works. This help testing here and there things on computer easier than on calc (avoiding Casio's SDK, ddd to debug, etc...) Buuut:

What I need to finish

- Converting variable size sprites blitting functions (ML_bmp_(or|xor|and), not ML_(8|16)_x ). As endianess is totally different from computers, I'll maybe try implementing it the worst way possible (pixel per pixel), unless someone has some functions like that.
- Scrolling is borken for same problem : endianness.
- Finding a way to rescale the SDL_surface when I rescale the window and scale/center the output.
- Free SDL things.
- Checking with some tests.

You can use it as you would use ML but you have to do two things:
- Check ML_SCALE and change it to change the screen scale
- Use ML_Init() in main() to initiate the screen.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C /axe?] Hinawa Battle Engine
« Reply #84 on: December 12, 2014, 05:24:04 pm »
I took the time to make a page, finally. I'll sum all the info/screenshots/download there : http://geekbros.tk/retro-actif/portfolio/hinawa-battle-engine/