Search found 10 matches
- Tue Nov 04, 2014 12:37 am
- Forum: SGDK
- Topic: Background size
- Replies: 10
- Views: 7669
In the code you originally posted, the call to VDP_setPlanSize sets the background plane size to 32x32 tiles. At this setting, it's too small to fit your 680 pixel image. You'd have to set the plane size to 128x32 which would give you a maximum size of 1024 x 256. If your image fits into that, then...
- Mon Nov 03, 2014 6:06 pm
- Forum: SGDK
- Topic: Background size
- Replies: 10
- Views: 7669
Hi, I made the changes with & 31 and & 127. My background image is 680 px wide and with the "& 127" modification I can't display the entire image. So maybe I need to charge another background image (maybe is less memory consuming) when the posx is bigger than 128 tiles each time or I need to place a...
- Fri Oct 31, 2014 5:05 pm
- Forum: SGDK
- Topic: Background size
- Replies: 10
- Views: 7669
Hi, I've been trying to display correctly the background with your suggestions. I made some advance but seems that I need to reset something when the background reaches the width of the plan, because its loading the background but one tile below position 0 each time. Here's is the code: #include <ge...
- Wed Oct 22, 2014 5:57 pm
- Forum: SGDK
- Topic: Background size
- Replies: 10
- Views: 7669
Thank you! I see that VDP_setPlanSize can be used to change the background size. So if I understand, I can make a bigger background image and by code I need to update the plane when the a full chunk (maybe a 32 tile width chunk) of that image has been scrolled. Maybe using u16 VDP_drawImageEx and ch...
- Tue Oct 21, 2014 10:34 pm
- Forum: SGDK
- Topic: Background size
- Replies: 10
- Views: 7669
Background size
Hi! I was playing with the sprite demo included with the sgdk download. I was trying to make the "level" bigger than it actually is so I modified the following lines of main.c: Line 25: #define MAX_POSX FIX32(3200) and Line 190: // clip camera position if (npx_cam < FIX32(0)) npx_cam = FIX32(0); els...
- Thu Sep 11, 2014 10:13 pm
- Forum: SGDK
- Topic: undefined reference to main
- Replies: 14
- Views: 9972
I see. Then the code is:
hola.c
moon.res
Thank you!
hola.c
Code: Select all
#include <genesis.h>
#include "moon.h"
int main()
{
// draw the moon at (12,12)
VDP_drawImage(VDP_PLAN_A, &moon, 12, 12);
while(1)
{
VDP_waitVSync();
}
return 0;
}
Code: Select all
IMAGE moon "moon.bmp" -1
- Thu Sep 11, 2014 4:26 pm
- Forum: SGDK
- Topic: undefined reference to main
- Replies: 14
- Views: 9972
Easier is not it ? :wink: Nice! That's a lot easier :D Now the moon example is working. Thank you! Would be nice to have an updated version in the wiki. https://farm4.staticflickr.com/3910/15022033029_35c3063554_s.jpg moonOK by tobeder , on Flickr Here is the code: hola.c #include <genesis.h> #incl...
- Wed Sep 10, 2014 10:37 pm
- Forum: SGDK
- Topic: undefined reference to main
- Replies: 14
- Views: 9972
I find that I need to create the .res file in order to generate the moon.h I can compile the example but I'm getting a weird result. Here's my code: #include <genesis.h> #include "moon.h" int main() { // get the image width (in pixel) ==> should be 8pix aligned u16 w = moon.w; // get the image heigh...
- Wed Sep 10, 2014 5:37 pm
- Forum: SGDK
- Topic: undefined reference to main
- Replies: 14
- Views: 9972
Before checking the project settings I can't compile from Eclipse so I tried the command line and I can do it. I'm stuck at the Multi tiles part of the tutorial (the moon) I can't compile the source code from the command line. Here's the error: C:\genesis\projects\tut3_TilesBitmap\3_TilesBitmap>%GDK...
- Tue Sep 09, 2014 4:45 pm
- Forum: SGDK
- Topic: undefined reference to main
- Replies: 14
- Views: 9972
undefined reference to main
Hi! I was trying to setup and run the HelloWorld demo on Windows 7 but I'm getting this message: 11:28:49 **** Build of configuration Debug for project HelloWorld **** "C:\\genesis\\sdk\\bin\\make" -f "C:/genesis/sdk\\makefile.gen" C:/genesis/sdk/bin/gcc -BC:/genesis/sdk/bin -n -T C:/genesis/sdk/md....