Skip to content

Commit

Permalink
Merge pull request #150 from TheFakeMontyOnTheRun/lots-of-improvements
Browse files Browse the repository at this point in the history
Lots of improvements
  • Loading branch information
TheFakeMontyOnTheRun authored May 28, 2024
2 parents a90591d + 6e8306f commit c423067
Show file tree
Hide file tree
Showing 290 changed files with 109,279 additions and 1,663 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ia16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: Derelict for MS-DOS on 8088 (CGA Graphics)
path: mz_frontend/derelict.com
path: my_frontend/derelict.com
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,14 @@ IDEWorkspaceChecks.plist
gl_frontend/derelict.elf
gl_frontend/derelict.nds
filesystem
distiller
trigger
derelict.tap
newtrigger
xcschememanagement.plist
out.ram
mx_frontend/index.data
mx_frontend/index.html
mx_frontend/index.js
mx_frontend/index.wasm
core/cmake-build-debug-coverage
233 changes: 233 additions & 0 deletions art/newtitle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion common/include/EDirection_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ enum EDirection rightOf(const enum EDirection d);

struct Vec2i mapOffsetForDirection(const enum EDirection direction);

int oppositeOf(int d);
uint8_t oppositeOf(uint8_t d);

#endif
14 changes: 7 additions & 7 deletions common/include/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ typedef void ( *InitStateCallback )(enum EGameMenuState tag);

typedef void ( *RepaintCallback )(void);

typedef enum EGameMenuState ( *TickCallback )(enum ECommand, long data);
typedef enum EGameMenuState ( *TickCallback )(enum ECommand, void* data);

typedef void ( *UnloadStateCallback )(enum EGameMenuState newState);

Expand All @@ -19,47 +19,47 @@ void MainMenu_initStateCallback(enum EGameMenuState tag);

void MainMenu_repaintCallback(void);

enum EGameMenuState MainMenu_tickCallback(enum ECommand, long data);
enum EGameMenuState MainMenu_tickCallback(enum ECommand, void* data);

void MainMenu_unloadStateCallback(enum EGameMenuState newState);

void Crawler_initStateCallback(enum EGameMenuState tag);

void Crawler_repaintCallback(void);

enum EGameMenuState Crawler_tickCallback(enum ECommand, long data);
enum EGameMenuState Crawler_tickCallback(enum ECommand, void* data);

void Crawler_unloadStateCallback(enum EGameMenuState newState);

void HelpScreen_initStateCallback(enum EGameMenuState tag);

void HelpScreen_repaintCallback(void);

enum EGameMenuState HelpScreen_tickCallback(enum ECommand, long data);
enum EGameMenuState HelpScreen_tickCallback(enum ECommand, void* data);

void HelpScreen_unloadStateCallback(enum EGameMenuState newState);

void CreditsScreen_initStateCallback(enum EGameMenuState tag);

void CreditsScreen_repaintCallback(void);

enum EGameMenuState CreditsScreen_tickCallback(enum ECommand, long data);
enum EGameMenuState CreditsScreen_tickCallback(enum ECommand, void* data);

void CreditsScreen_unloadStateCallback(enum EGameMenuState newState);

void GameMenu_initStateCallback(enum EGameMenuState tag);

void GameMenu_repaintCallback(void);

enum EGameMenuState GameMenu_tickCallback(enum ECommand, long data);
enum EGameMenuState GameMenu_tickCallback(enum ECommand, void* data);

void GameMenu_unloadStateCallback(enum EGameMenuState newState);

void HackingScreen_initStateCallback(enum EGameMenuState tag);

void HackingScreen_repaintCallback(void);

enum EGameMenuState HackingScreen_tickCallback(enum ECommand, long data);
enum EGameMenuState HackingScreen_tickCallback(enum ECommand, void* data);

void HackingScreen_unloadStateCallback(enum EGameMenuState newState);

Expand Down
2 changes: 2 additions & 0 deletions common/include/Enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ enum EGameMenuState {
#endif
kBackToGame,
kEndGame,
#ifdef SUPPORTS_HACKING_MINIGAME
kHackingGame,
#endif
kGoodVictoryEpilogue,
kBadVictoryEpilogue,
kGoodGameOverEpilogue,
Expand Down
4 changes: 4 additions & 0 deletions common/include/FixP.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ typedef int32_t FixP_t;

#define fixToFloat(fp) (fixToInt(Mul((fp), intToFix(16))) / 16.0f)

FixP_t lerpFix(const FixP_t v0, const FixP_t v1, const FixP_t t, const FixP_t total);

int lerpInt(const int v0, const int v1, const long t, const long total);

#endif
2 changes: 1 addition & 1 deletion common/include/SoundSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef SOUNDSYSTEM_H
#define SOUNDSYSTEM_H

void playSound(const int action);
void playSound(const uint8_t action);

void soundTick(void);

Expand Down
2 changes: 2 additions & 0 deletions common/include/UI.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ extern int8_t cursorPosition;

void clearScreen(void);

void drawLine(uint16_t x0, uint8_t y0, uint16_t x1, uint8_t y1, uint8_t colour);

#endif /*UI_H*/
3 changes: 2 additions & 1 deletion common/src/AY-3-8910.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* AY-3-8910: used on MSX, Amstrad CPC 464 and Atari ST
* Created by Daniel Monteiro on 11/07/2023.
* */
#include <stdint.h>

#include "AY-3-8910.h"

Expand Down Expand Up @@ -71,7 +72,7 @@ void soundTick(void) {
}


void playSound(int num) {
void playSound(uint8_t num) {
soundPos = 0;
soundNum = 0;

Expand Down
6 changes: 3 additions & 3 deletions common/src/CTile3DProperties.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef WIN32
#ifdef WIN32
#include "Win32Int.h"
#else

Expand Down Expand Up @@ -96,9 +96,9 @@ void loadPropertyList(const char *propertyFile, struct MapWithCharKey *map, stru
struct Mesh* mesh;
uint8_t len = *(bufferHead++);

char* meshName = allocMem(len + 1, GENERAL_MEMORY, 1);
char* meshName = (char*)allocMem(len + 1, GENERAL_MEMORY, 1);
memcpy(meshName, bufferHead, len);
mesh = allocMem(sizeof(struct Mesh), GENERAL_MEMORY, 1);
mesh = (struct Mesh*)allocMem(sizeof(struct Mesh), GENERAL_MEMORY, 1);
sprintf(&meshNameWithExtension[0], "%s.mdl", meshName);
loadMesh(mesh, &meshNameWithExtension[0]);
setInMap(meshes, kCustomMeshStart + c, mesh);
Expand Down
Loading

0 comments on commit c423067

Please sign in to comment.