Search found 101 matches
- Wed Feb 03, 2016 8:24 am
- Forum: SGDK
- Topic: Sprite Engine Help
- Replies: 18
- Views: 14233
Re: Sprite Engine Help
For your power-ups, maybe it's an init link problems. I can't have time to compile and test because you use a specific batch. I think, when you use the sgdk sprite-engine, you can't allow empty slot between sprites. And we see the mess in your link satb. #define SOff_paddle 0 //Always 0 232 #define ...
- Mon Jan 25, 2016 8:14 am
- Forum: SGDK
- Topic: Generated asm files
- Replies: 16
- Views: 8504
Re: Generated asm files
I think it's because you use "-S" like global value for all your compilation. If you wan to see only the asm code for your c files, try this : - Remove "-s" from default_flags - Change this in your makefile : out/%.o: %.c $(MKDIR) -p out $(MKDIR) -p out/src $(MKDIR) -p out/res $(CC) -S $(FLAGS) -c $...
- Sun Jan 24, 2016 12:49 pm
- Forum: SGDK
- Topic: Some problems with code compilation
- Replies: 10
- Views: 5627
Re: Some problems with code compilation
I'm sorry, I'm not on my computer.
You can try with "static"
static int batx=180;
You can try with "static"
static int batx=180;
- Sun Jan 24, 2016 9:26 am
- Forum: SGDK
- Topic: Some problems with code compilation
- Replies: 10
- Views: 5627
Re: Some problems with code compilation
Your global var error is certainly because you include your .h file in every file (.c or .h). So the compiler create a new variable each time.
2 solutions : include your .h only one time or put "extern" before you variable so the compiler keep only one.
extern int batx=180;
2 solutions : include your .h only one time or put "extern" before you variable so the compiler keep only one.
extern int batx=180;
- Sat Jan 23, 2016 6:04 pm
- Forum: SGDK
- Topic: Strange garbled graphics
- Replies: 7
- Views: 5358
Re: Strange garbled graphics
Thanks master
I always forget the pointer.
I always forget the pointer.
- Sat Jan 23, 2016 6:00 pm
- Forum: SGDK
- Topic: Some problems with code compilation
- Replies: 10
- Views: 5627
Re: Some problems with code compilation
Try u16 or s16. FIX16 is a function to change variable cast.
u16 x;
.....
u16 x;
.....
- Sat Jan 23, 2016 10:28 am
- Forum: SGDK
- Topic: Strange garbled graphics
- Replies: 7
- Views: 5358
Re: Strange garbled graphics
It's a long time for me too, maybe someone can explain more clearly (in English). the -> is the object of a structure. I don't have the struct of tileset but you can see with this : typedef struct { u16 compression; u16 w; u16 h; const Palette *palette; const u8 *image; } Bitmap; For reading the wid...
- Sat Jan 23, 2016 8:19 am
- Forum: SGDK
- Topic: Strange garbled graphics
- Replies: 7
- Views: 5358
Re: Strange garbled graphics
If I read your code, i see you use the same tile_index u16 ind_tileset; ind_tileset = TILE_USERINDEX; ... u16 ind_tileset2; ind_tileset2 = TILE_USERINDEX; Maybe you write tile at the same position in VRAM. You can look in debug mode your vram. Add this to make test : u16 ind_tileset; ind_tileset = T...
- Sun Dec 27, 2015 10:51 am
- Forum: SGDK
- Topic: Theorical question about the sprites
- Replies: 45
- Views: 26717
Re: Theorical question about the sprites
I don't think we can juste change the number of the sprite list when you want but some hardcoder can explain if we can.
For now, I just make a new SPR_init (x, ...) and change the number of the first value.
For now, I just make a new SPR_init (x, ...) and change the number of the first value.
- Sun Dec 27, 2015 8:38 am
- Forum: SGDK
- Topic: Theorical question about the sprites
- Replies: 45
- Views: 26717
Re: Theorical question about the sprites
Thank you for vectors, I had not seen that in the doc. I used my 2 variables struct for speed velocity so I can change that. For calculating vectors, I will not have a velocity speed problem. Maybe I should add a value for distance ratio between two points. If my two points are close (2,2) - (1,1), ...
- Sat Dec 26, 2015 5:23 pm
- Forum: SGDK
- Topic: Theorical question about the sprites
- Replies: 45
- Views: 26717
Re: Theorical question about the sprites
I don't think we can scroll the sprite layer. If you want to simulate you need to add the other two plans speed to your sprite.
I don't yet find a way to calculate the angle between two points ...
I don't yet find a way to calculate the angle between two points ...
- Fri Dec 25, 2015 5:13 pm
- Forum: SGDK
- Topic: Theorical question about the sprites
- Replies: 45
- Views: 26717
Re: Theorical question about the sprites
I continue my journey ... and I'm stuck. I have enemy ship on screen how can shoot into player direction. I use the cosFix32 and sinFix32 table (0 .. 1024) like this for my 2D Vector / Velocity in x and y, and add them to enemy position (I use fix32 value for float) : gameObject[i].speedX2 = cosFix3...
- Wed Dec 16, 2015 8:45 am
- Forum: SGDK
- Topic: Theorical question about the sprites
- Replies: 45
- Views: 26717
Re: Theorical question about the sprites
If you'd like to try it, you can use my sprite support code: https://github.com/Mikejmoffitt/LICS/blob/master/src/sprites.c and https://github.com/Mikejmoffitt/LICS/blob/master/inc/sprites.h I try your code but I have a problem with the (VDP_doVRamDMA((u32)sprite_table,sprite_addr,spr_num << 2);) I...
- Wed Dec 16, 2015 8:35 am
- Forum: SGDK
- Topic: Linux and Mac OS X GenDev builds with SGDK
- Replies: 5
- Views: 3911
Re: Linux and Mac OS X GenDev builds with SGDK
Thanks, I'll try the linux version.
It's always useful if we lack of Windows version.
It's always useful if we lack of Windows version.
- Tue Dec 15, 2015 11:04 am
- Forum: SGDK
- Topic: Drawing graphics to different planes
- Replies: 11
- Views: 6789
Re: Drawing graphics to different planes
I think you can't reload all the Plan. You have just a small time for drawing tiles in background. But a expert can explain better. If you try to load a full plan, the Megadrive need many frames. So you lose fps. When you want to make background animation, I use two methods : - you change only the t...