Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mindslight

Pages: 1 ... 8 9 [10] 11
136
General Jo Engine Help / Re: Help setting up a project on CodeBlocks
« on: October 14, 2016, 01:58:45 pm »
You have (almost) the same feature in Code::blocks (see attachement) :

Maybe I will add a netbeans project on the repository because it's one one the best IDE

137
General Jo Engine Help / Re: Question about IF statements
« on: October 14, 2016, 01:52:49 pm »
It's a C language problematic.

You can implement a tree or a simple table using indexes like this:

Code: [Select]
typedef struct
{
    char                *image_name;
    int                 button_a_index;
    int                 button_b_index;
    int                 button_c_index;
}                       t_game_step;

# define                BUTTON_INACTIVE     (-1)

t_game_step             game_steps[] =
{
  { "A.TGA", 1, 2, 3 },
  { "B.TGA", 0, 2, BUTTON_INACTIVE },
  { "C.TGA", 1, 0, 3 },
  { "D.TGA", BUTTON_INACTIVE, 0, 1 },
};

int                     current_game_step = 0;

void                    change_background(char *image_name)
{
    jo_img              img;

    img.data = JO_NULL;
    if (jo_tga_loader(&img, JO_ROOT_DIR, image_name, JO_COLOR_Transparent))
    {
        jo_set_background_sprite(&img, 0, 0);
        jo_free_img(&img);
    }
}

void         my_gamepad(void)
{
    if (game_steps[current_game_step].button_a_index != BUTTON_INACTIVE && jo_is_pad1_key_down(JO_KEY_A))
    {
        current_game_step = game_steps[current_game_step].button_a_index;
        change_background(game_steps[current_game_step].image_name);
    }
    else if (game_steps[current_game_step].button_b_index != BUTTON_INACTIVE && jo_is_pad1_key_down(JO_KEY_B))
    {
        current_game_step = game_steps[current_game_step].button_b_index;
        change_background(game_steps[current_game_step].image_name);
    }
    else if (game_steps[current_game_step].button_c_index != BUTTON_INACTIVE && jo_is_pad1_key_down(JO_KEY_C))
    {
        current_game_step = game_steps[current_game_step].button_c_index;
        change_background(game_steps[current_game_step].image_name);
    }
}

void            my_draw(void)
{
}

void jo_main(void)
{
jo_core_init(JO_COLOR_Black);
        jo_core_add_callback(my_gamepad);
jo_core_add_callback(my_draw);
        current_game_step = 0;
        change_background(game_steps[current_game_step].image_name);
jo_core_run();
}

138
About you / Re: Welcome
« on: October 14, 2016, 10:59:44 am »
Thank you Danny  :)

Welcome to our community  ;)

139
General Jo Engine Help / Re: Question about IF statements
« on: October 10, 2016, 02:11:24 pm »
Hi,

I think you wants a tree like the image in attachement.

The player choose one option (A, B or C) and you have new paths to choose, etc.

That's right ?

140
Free talk / Meet me at retrobarcelona 8 and 9 October 2016
« on: October 04, 2016, 08:07:55 am »
Hi,

I will be at the retrobarcelona event with SegaSaturno (stand #39) the 8 (afternoon) and 9 october 2016  :)

More information here : http://www.retrobarcelona.org/

141
you're welcome  ;)

142
General Jo Engine Help / Read file asynchronously without blocking the game
« on: September 18, 2016, 08:36:45 pm »
I added some functions to read file asynchronously, because I working on a video reader, but it's working for any file and any usage :)

If you're interested, here 's how it works:

The function bellow will be called when the file is loaded:

Code: [Select]
void            my_async_read(char *contents, int length, int optional_token)
{
}

To read a file asynchronously, you just have to call jo_fs_read_file_async() with the filename, the callback and an optional token (user value for the callback)

Code: [Select]
jo_fs_read_file_async("DEMO.TXT", my_async_read, 0);

In attachement, you will find a sample code to load a background image (TGA) from the CD asynchronously

143
Jo-Engine release / New version 4.7 with bugs fixes
« on: September 12, 2016, 06:51:30 pm »
I made a new update today with the following fixes:

  • ld.exe: cannot find -lgcc (Thx Luiz Fernando Nai Ribeiro for bug reporting)
  • GCC 4 bug "missing braces around initializer" workaround in Advanced 3D demo (Thx SegaSaturno for bug reporting)

144
Jo Engine Wish List / Re: Is it possible to play videos?
« on: September 11, 2016, 11:52:32 am »
Hi,

It's under development :)

145
Project announcement / Re: Project Blaze
« on: September 02, 2016, 02:18:39 pm »
Sure,

I created a section called "Share your code".

BTW, Nice effects :)

146
Free talk / Re: Which one is your favorite Saturn Game?
« on: August 31, 2016, 12:37:48 pm »
NiGHTS into Dreams is definitely my favorite. I love the arcadey gameplay and the surreal dream worlds.

Yes I forget this one  :) It's one of my favorite too

147
Other release / Re: Yabause 0.9.15
« on: August 30, 2016, 07:24:06 pm »
I can't update Yabause included with Jo Engine because some DLL like libicudt57.dll is over 25Mo each  :(

148
Other release / Yabause 0.9.15
« on: August 30, 2016, 02:39:32 pm »
Cool there is a new version of Yabause  :D

Quote
Arguably, the most notable features of this release are:

– Low-level CD Block emulation
– CloneCD file format support
– High resolution for the software renderer

We also included code from other great projects:

– Musashi 68K core (code by Karl Stenerud)
– SSF sound format playing (code by R. Belmont, Richard Bannister, Neil Corlett)

As many of you should already be aware, Yabause was forked into a new project,
uoYabause, by devmiyax. We included some of his fixes back into Yabause.

Due to lack of maintainer, this release will be the last to include a gtk port.

Since our last release, we also improved our tools:

– Automated builds for linux, mac and windows
– Development builds pushed after each commit
– Translations on Transifex
– Compatibility reports on our wiki

Download link:

https://yabause.org/download/

PS: I will update Yabause in Jo Engine repository

149
Free talk / Re: Which one is your favorite Saturn Game?
« on: August 30, 2016, 12:09:31 pm »
Panzer Dragoon Saga is my favorite but I also like Sega Rally, Burning Rangers, Radiant Silvergun, Guardian Heroes and many other game  :)


150
Jo Engine Wish List / Re: Is it possible to play videos?
« on: August 30, 2016, 12:05:53 pm »
I already working on it two months ago, but it's not easy.

The best video library was made by Electronic Arts (visible on Need For Speed) but it's not open source :-\

After some research, I think I have to write my own MPEG-1 reader, but it will takes some time to do  :)


Pages: 1 ... 8 9 [10] 11
SMF spam blocked by CleanTalk