mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2025-01-27 02:29:59 +00:00
Add skeleton for fatdog RPG demo
This commit is contained in:
parent
529e4a98bc
commit
a72ac83b12
26
demos/fatdog-rpg/App.s
Normal file
26
demos/fatdog-rpg/App.s
Normal file
@ -0,0 +1,26 @@
|
||||
; Fatdog Demos
|
||||
|
||||
TYP $B3 ; S16 file
|
||||
DSK FatDogRPG
|
||||
XPL
|
||||
|
||||
; Segment #1 -- Main execution block
|
||||
|
||||
ASM Main.s
|
||||
|
||||
; Segment #2 -- Core GTE Code
|
||||
|
||||
ASM ..\..\src\Core.s
|
||||
|
||||
; Segment #3 -- GTE Rotation Table Data
|
||||
|
||||
ASM ..\..\src\RotData.s
|
||||
DS 0
|
||||
KND #$1001 ; Type and Attributes ($11=Static+Bank Relative,$01=Data)
|
||||
ALI BANK
|
||||
SNA RotData
|
||||
|
||||
|
||||
|
||||
|
||||
|
159
demos/fatdog-rpg/Main.s
Normal file
159
demos/fatdog-rpg/Main.s
Normal file
@ -0,0 +1,159 @@
|
||||
REL
|
||||
DSK MAINSEG
|
||||
|
||||
use EDS.GSOS.MACS.s
|
||||
use Tool222.Macs.s
|
||||
use ../../src/GTE.s
|
||||
use ../../src/Defs.s
|
||||
|
||||
|
||||
mx %00
|
||||
|
||||
; Space for player position variables
|
||||
PlayerX equ AppSpace
|
||||
PlayerY equ AppSpace+2
|
||||
|
||||
; Timer handle
|
||||
TimerHndl dw $FFFF
|
||||
IntroCounter ds 2
|
||||
|
||||
phk
|
||||
plb
|
||||
|
||||
jsl EngineStartUp
|
||||
|
||||
stz PlayerX
|
||||
stz PlayerY
|
||||
|
||||
ldx #0 ; Use full-screen mode
|
||||
jsl SetScreenMode
|
||||
bcs *+5
|
||||
sta TimerHndl
|
||||
|
||||
|
||||
stz IntroCounter
|
||||
ldx #^IntroTask
|
||||
lda #IntroTask
|
||||
ldy #10 ; Play at 6 fps
|
||||
jsl AddTimer
|
||||
bcs *+5
|
||||
sta TimerHndl
|
||||
|
||||
:loop
|
||||
jsl DoTimers
|
||||
jsl ReadControl
|
||||
and #$007F ; Ignore the buttons for now
|
||||
|
||||
cmp #'q'
|
||||
beq :exit
|
||||
|
||||
; Just keep drawing the player. The timer task will animate the position
|
||||
|
||||
jsr DrawPlayer
|
||||
bra :loop
|
||||
|
||||
:moveup
|
||||
lda PlayerY
|
||||
dec
|
||||
bpl *+5
|
||||
lda #0
|
||||
sta PlayerY
|
||||
jmp DrawPlayer
|
||||
|
||||
:movedown
|
||||
lda PlayerY
|
||||
inc
|
||||
cmp #160
|
||||
bcc *+5
|
||||
lda #160
|
||||
sta PlayerY
|
||||
jmp DrawPlayer
|
||||
|
||||
:moveleft
|
||||
lda PlayerX
|
||||
dec
|
||||
bpl *+5
|
||||
lda #0
|
||||
sta PlayerX
|
||||
jmp DrawPlayer
|
||||
|
||||
:moveright
|
||||
lda PlayerX
|
||||
inc
|
||||
cmp #140
|
||||
bcc *+5
|
||||
lda #140
|
||||
sta PlayerX
|
||||
jmp DrawPlayer
|
||||
|
||||
; Clean up and do a GS/OS Quit
|
||||
:exit
|
||||
jsl EngineShutDown
|
||||
|
||||
:quit
|
||||
_QuitGS qtRec
|
||||
bcs :fatal
|
||||
:fatal brk $00
|
||||
|
||||
qtRec adrl $0000
|
||||
da $00
|
||||
|
||||
; Play a scripted animation
|
||||
IntroTask
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
lda IntroCounter
|
||||
and #$0007
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
|
||||
lda IntroPath,x ; X coordinate
|
||||
sta PlayerX
|
||||
lda IntroPath+2,x ; Y coordinate
|
||||
sta PlayerY
|
||||
|
||||
inc IntroCounter
|
||||
plb
|
||||
rtl
|
||||
|
||||
IntroPath dw 0,0,10,0,20,0,20,5,20,7,35,15,50,17,80,20
|
||||
|
||||
DrawPlayer
|
||||
rts
|
||||
; lda PlayerY
|
||||
; asl
|
||||
; tax
|
||||
; ldal ScreenAddr,x
|
||||
; clc
|
||||
; adc PlayerX
|
||||
; tay
|
||||
; jsl Spr_001
|
||||
; rts
|
||||
|
||||
; Storage for tiles (not used in this demo)
|
||||
tiledata ENT
|
||||
|
||||
; Storage for sprites
|
||||
;StackAddress ds 2
|
||||
; PUT sprites/Ships.s
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
demos/fatdog-rpg/_FileInformation.txt
Normal file
1
demos/fatdog-rpg/_FileInformation.txt
Normal file
@ -0,0 +1 @@
|
||||
FatDogRPG=Type(B3),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
16
demos/fatdog-rpg/build-image.bat
Normal file
16
demos/fatdog-rpg/build-image.bat
Normal file
@ -0,0 +1,16 @@
|
||||
echo off
|
||||
|
||||
REM Copy all of the assets into the ProDOS image for emulator testing
|
||||
REM
|
||||
REM Pass the path of the Cadius tool as the first argument (%1)
|
||||
|
||||
set CADIUS="%1"
|
||||
set IMAGE="..\\..\\emu\\Target.2mg"
|
||||
set FOLDER="/GTEDEV/FatdogRPG"
|
||||
|
||||
REM Cadius does not overwrite files, so clear the root folder first
|
||||
%CADIUS% DELETEFOLDER %IMAGE% %FOLDER%
|
||||
%CADIUS% CREATEFOLDER %IMAGE% %FOLDER%
|
||||
|
||||
REM Now copy files and folders as needed
|
||||
%CADIUS% ADDFILE %IMAGE% %FOLDER% .\\FatDogRPG
|
15
demos/fatdog-rpg/build-sprites.bat
Normal file
15
demos/fatdog-rpg/build-sprites.bat
Normal file
@ -0,0 +1,15 @@
|
||||
echo off
|
||||
|
||||
set MRSPRITE="%1"
|
||||
|
||||
mkdir build
|
||||
copy assets\all-sprites.gif build\all-sprites.gif
|
||||
%MRSPRITE% EXTRACT build\all-sprites.gif 0026FF FC0204
|
||||
%MRSPRITE% RENAME build\all-sprites_spr*.gif Ship
|
||||
%MRSPRITE% CODE build\Ship_*.gif 0026FF 09162A 181425 293C5A 3A455B 5400D9 9C44FF A50989 FC0204 FF00AF FFCA00 FFFFFF
|
||||
type build\Ship_*.txt > sprites\Ships.s
|
||||
|
||||
REM Create a wallpaper and copy that for reference
|
||||
%MRSPRITE% WALLPAPER build\Ship_*.gif 0026FF FC0204
|
||||
copy build\Ship_Wall.gif sprites\Ship_Wallpaper.gif
|
||||
del /q build\*
|
34
demos/fatdog-rpg/package.json
Normal file
34
demos/fatdog-rpg/package.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "fatdog-rpg",
|
||||
"version": "1.0.0",
|
||||
"description": "Horizontal shoot-em-up",
|
||||
"main": "index.js",
|
||||
"config": {
|
||||
"merlin32": "C:\\Programs\\IIgsXDev\\bin\\Merlin32-1.1.10.exe",
|
||||
"cadius": "C:\\Programs\\IIgsXDev\\bin\\Cadius.exe",
|
||||
"gsport": "C:\\Programs\\gsport\\gsport_0.31\\GSPort.exe",
|
||||
"macros": "../../macros",
|
||||
"crossrunner": "C:\\Programs\\Crossrunner\\Crossrunner.exe",
|
||||
"mrsprite": "C:\\Programs\\IIgsXDev\\bin\\MrSprite.exe"
|
||||
},
|
||||
"scripts": {
|
||||
"build:app": "%npm_package_config_merlin32% -V %npm_package_config_macros% App.s",
|
||||
"build:image": "build-image.bat %npm_package_config_cadius%",
|
||||
"build:all": "npm run build:app && npm run build:image",
|
||||
"build": "npm run build:app && npm run build:image",
|
||||
"test": "npm run build && %npm_package_config_gsport%",
|
||||
"debug": "%npm_package_config_crossrunner% GTEShooter -Source GTEShooter_S02_MAINSEG_Output.txt -Debug -CompatibilityLayer"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lscharen/iigs-game-engine.git"
|
||||
},
|
||||
"author": "Lucas Scharenbroich",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/lscharen/iigs-game-engine/issues"
|
||||
},
|
||||
"homepage": "https://github.com/lscharen/iigs-game-engine#readme",
|
||||
"devDependencies": {
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user