Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions Code/Makefile.vbcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Makefile for Sevgi_Engine projects (vbcc, first path)

EXE = sevgi_engine

################################################################################
VBCC = /opt/amiga/vbcc
NDK = /opt/amiga/ndk32
AS = /opt/amiga/vbcc/bin/vasmm68k_mot

CC = $(VBCC)/bin/vc +aos68k
OPTIONS = -DNO_INLINE_STDARG
LFLAGS = -L$(VBCC)/targets/m68k-amigaos/lib -lauto -lamiga
################################################################################

# Common options
WARNINGS =
OPTIMIZE =
DEBUG =
IDIRS = -I$(NDK)/Include_H -I./SDI_headers

CFLAGS = -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(IDIRS)
CFLAGS_NOOPT = -c $(WARNINGS) $(DEBUG) $(OPTIONS) $(IDIRS)
AFLAGS = -Faout -m68020

DEPS = assets.h palettes.h settings.h version.h

OBJS = main.o system.o keyboard.o input.o display.o diskio.o fonts.o \
color.o rainbow.o tiles.o tilemap.o audio.o ptplayer.o ui.o \
gameobject.o physics.o level.o anims.o collisions.o \
display_level.o display_loading.o display_menu.o display_splash.o
################################################################################

all : $(EXE)

main.o : main.c version.h
$(CC) $(CFLAGS) $<

audio.o : audio.c audio.h settings.h
$(CC) $(CFLAGS) $<

color.o : color.c color.h settings.h
$(CC) $(CFLAGS) $<

diskio.o : diskio.c diskio.h settings.h
$(CC) $(CFLAGS) $<

display_level.o : display_level.c level_display_loop.c level_display_gradients.c level_display_gradients.h display_level.h anims.h collisions.h settings.h
$(CC) $(CFLAGS) $<

display_loading.o : display_loading.c display_loading.h settings.h
$(CC) $(CFLAGS) $<

display_menu.o : display_menu.c display_menu.h settings.h
$(CC) $(CFLAGS) $<

display_splash.o : display_splash.c display_splash.h version.h settings.h
$(CC) $(CFLAGS) $<

fonts.o : fonts.c fonts.h assets.h settings.h
$(CC) $(CFLAGS) $<

gameobject.o : gameobject.c gameobject.h anims.h collisions.h settings.h
$(CC) $(CFLAGS) $<

input.o : input.c input.h
$(CC) $(CFLAGS_NOOPT) $<

level.o : level.c level.h assets.h settings.h palettes.h
$(CC) $(CFLAGS) $<

ptplayer.o : ptplayer.asm
$(AS) $(AFLAGS) -o $@ $<

rainbow.o : rainbow.c rainbow.h settings.h
$(CC) $(CFLAGS) $<

tiles.o : tiles.c tiles.h settings.h
$(CC) $(CFLAGS) $<

ui.o : ui.c ui.h
$(CC) $(CFLAGS) $<

$(EXE) : $(OBJS)
$(CC) -o $(EXE) $(OBJS) $(LFLAGS)

clean:
rm -f $(EXE)
rm -f $(OBJS)
rm -f ./fonts/fontcache
find . -name '*.uaem' -delete
2 changes: 1 addition & 1 deletion Code/display_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ STATIC ULONG menuDisplayLoop()
BOOL exiting = FALSE;
ULONG return_value = 0;
ULONG input_delay = 0;
clicked_button = NULL;
clicked_button = 0;

color_table->state = CT_FADE_IN;

Expand Down
4 changes: 2 additions & 2 deletions Code/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ BOOL setKeyboardAccess(VOID)
{
struct IOStdReq* ioStdReq = NULL;

if ((keyMP = CreatePort(NULL, NULL))) {
if ((keyMP = CreatePort(NULL, 0L))) {
if ((ioStdReq = (struct IOStdReq*)CreateExtIO(keyMP, sizeof(struct IOStdReq)))) {
keyIO = (struct IORequest*)ioStdReq;
if (!OpenDevice("keyboard.device", NULL, keyIO, NULL)) {
if (!OpenDevice("keyboard.device", 0L, keyIO, 0L)) {
device_ok = TRUE;
ioStdReq->io_Command = KBD_READMATRIX;
ioStdReq->io_Data = (APTR)keyMatrix;
Expand Down
17 changes: 11 additions & 6 deletions Code/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@

#define IS_IN_RECT(x, y, x1, y1, x2, y2) ((x) >= (x1) && (x) < (x2) && (y) >= (y1) && (y) < (y2))

#define LONG_MAX 0x7FFFFFFFL
#define LONG_MIN (-0x7FFFFFFFL - 1)
#ifndef LONG_MAX
#define LONG_MAX 0x7FFFFFFFL
#endif

#ifndef LONG_MIN
#define LONG_MIN (-0x7FFFFFFFL - 1)
#endif
///
///prototypes
VOID setParents(struct UIO_Group* root);
Expand All @@ -60,7 +65,7 @@ extern volatile ULONG g_frame_counter;

struct UIObject* ui_active_object = NULL; // the object in focus

STATIC ULONG ui_screen_start = NULL;
STATIC ULONG ui_screen_start = 0;
STATIC struct RastPort* ui_rastport = NULL; // the layered RastPort to draw ui graphics
STATIC struct UIObject* ui_current_clipper = NULL; // last object setClip() has been called with
STATIC struct UIObject* ui_hovered_object = NULL; // the object under the mouse pointer
Expand All @@ -72,8 +77,8 @@ STATIC struct MinList ui_anim_list;
STATIC UWORD ui_disabled_pattern1[] = {0xAAAA, 0x5555};
STATIC UWORD ui_disabled_pattern2[] = {0x5555, 0xAAAA};
#ifdef UI_USE_STRING_GADGETS
STATIC UBYTE ui_password_string[] = {UIOV_STRING_PASSWORD_CHAR, NULL};
STATIC UBYTE ui_dotted_string[] = {UIOV_STRING_DOTTED_CHAR, NULL};
STATIC UBYTE ui_password_string[] = {UIOV_STRING_PASSWORD_CHAR, 0};
STATIC UBYTE ui_dotted_string[] = {UIOV_STRING_DOTTED_CHAR, 0};
#endif // UI_USE_STRING_GADGETS
///

Expand Down Expand Up @@ -4132,7 +4137,7 @@ VOID actionString(struct UIObject* self, WORD pointer_x, WORD pointer_y, BOOL pr
case ASCII_DEL_ALL:
if (string->cursor_pos < string->content_length) {
STRPTR cursor_addr = string->content + string->cursor_pos;
*cursor_addr = NULL;
*cursor_addr = 0;
string->content_length = string->cursor_pos;
}
break;
Expand Down