Compare commits
36 Commits
alpha-rc0
...
ph3nom/red
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9c3b901d7 | ||
|
|
72da27ef0b | ||
|
|
ff9df6c760 | ||
|
|
0c0d8c88b6 | ||
|
|
ab6a65ba4f | ||
|
|
d8b6a02494 | ||
|
|
d6e5be5a5d | ||
|
|
a6a3b9e7b4 | ||
|
|
ddfc21dd97 | ||
|
|
62bfbbc3a7 | ||
|
|
a4342f3abf | ||
|
|
8023daf18a | ||
|
|
6c39b294ca | ||
|
|
2e0dcf9c3f | ||
|
|
77e43aa727 | ||
|
|
e7b97ed558 | ||
|
|
d0c97eedb5 | ||
|
|
267f39b9fd | ||
|
|
76c5fae015 | ||
|
|
f179638f46 | ||
|
|
8e6a952da3 | ||
|
|
970ac8c691 | ||
|
|
fcd2e4bb91 | ||
|
|
1e03ff65d8 | ||
|
|
c458e6c466 | ||
|
|
a12489844b | ||
|
|
d06d827833 | ||
|
|
0e3fd254b0 | ||
|
|
0bfd0a3b06 | ||
|
|
9a91660f50 | ||
|
|
5a7dd57720 | ||
|
|
292a83165b | ||
|
|
4e8f09ac66 | ||
|
|
d523140fa4 | ||
|
|
6a1fbd3704 | ||
|
|
4c07bbfd53 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -387,4 +387,6 @@ dreamcast/aud2adpcm*
|
||||
dreamcast/repack-data
|
||||
dreamcast/output.map
|
||||
dreamcast/dca3.ds.iso
|
||||
dreamcast/git-version.h
|
||||
dreamcast/git-version.tmp
|
||||
.DS_Store
|
||||
|
||||
67
README.md
67
README.md
@@ -6,15 +6,70 @@ re3 a fully reversed source code for GTA III.
|
||||
|
||||
This project was started by [Stefanos Kornilios Mitsis Poiitidis](https://x.com/poiitidis) and uses [KallistiOS](https://kos-docs.dreamcast.wiki/).
|
||||
|
||||
## Building
|
||||
## Baking the CDI
|
||||
### Prerequisites
|
||||
You need GTA 3 installed. This version has been tested and works: https://store.rockstargames.com/game/buy-grand-theft-auto-the-trilogy.
|
||||
|
||||
dca3 requires PC game assets to work, so you **must** have GTA III. We have tested the 2cd version, others might work.
|
||||
Please note that *SOME VERSIONS* of the game may not work. It has been reported that `d4_gta.mp3` is corrupted sometimes.
|
||||
|
||||
You need to have installed:
|
||||
Make sure you have a LEGIT copy with no corrupted files, as this process wont work otherwise.
|
||||
|
||||
- GTA III PC
|
||||
- [DreamSDK R3](https://github.com/dreamsdk/dreamsdk/releases/tag/r3-3.0.4.2311)
|
||||
- more instructions to follow soon
|
||||
You will also need the following tools installed
|
||||
- git-scm http://git-scm.com/downloads/win
|
||||
- dreamsdk r3 https://github.com/dreamsdk/dreamsdk/releases
|
||||
|
||||
### Preparing the gta3 folder
|
||||
- Open dreamsdk shell
|
||||
- type `mkdir gta3` (and press enter)
|
||||
- type `explorer .` (and press enter)
|
||||
- This will open a folder named gta3. Copy your gta3 files in there.
|
||||
- If you use the 2cdrom version of the game, make sure to also copy the contents of the play disc to this folder.
|
||||
- close the folder and the dreamsdk shell and proceed to the next step.
|
||||
|
||||
### Cloning the dca3-game repo and downloading the prebuilt elf
|
||||
- Open dreamsdk shell
|
||||
- type `git clone --branch alpha https://gitlab.com/skmp/dca3-game.git` (and press enter)
|
||||
- It should take a moment and successfully clone the repo
|
||||
- type `cd dca3-game/dreamcast` (and press enter)
|
||||
- type `explorer .` (and press enter).
|
||||
- A folder named dreamcast with some files should be open. Keep it on the side.
|
||||
- Download the Alpha Prebuilt Elf from https://gitlab.com/skmp/dca3-game/-/releases
|
||||
- Open artifacts.zip and extract dca3.elf to the folder that was kept open before.
|
||||
- Close the folder and dreamsdk shell
|
||||
|
||||
### Repacking and making a prebuilt cdi FOR GD-EMU
|
||||
- Open dreamsdk shell
|
||||
- type `cd dca3-game/dreamcast` (and press enter)
|
||||
- type `make cdi-prebuilt` (and press enter)
|
||||
- This should take a while (5-15 mins)
|
||||
- Due to an issue with dreamsdk, this won't fully complete the first time
|
||||
- type `make cdi-prebuilt` (and press enter)
|
||||
- It will continue where it left off before
|
||||
- It should run to completion now and show "*** Repack Completed Successfully ***"
|
||||
- type `explorer .` (and press enter)
|
||||
- The dreamcast folder should open up, and it should contain dca3.cdi for you (~ 900 megs)
|
||||
|
||||
### Repacking and making a prebuilt cdi FOR burning CD-ROM
|
||||
- Open dreamsdk shell
|
||||
- type `cd dca3-game/dreamcast` (and press enter)
|
||||
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
|
||||
- This should take a while (5-15 mins)
|
||||
- Due to an issue with dreamsdk, this won't fully complete the first time
|
||||
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
|
||||
- It will continue where it left off before
|
||||
- It should run to completion now and show "*** Repack Completed Successfully ***"
|
||||
- type `explorer .` (and press enter)
|
||||
- The dreamcast folder should open up, and it should contain dca3.cdi for you (~ 700 megs or ~260 megs)
|
||||
- If the .cdi is not ~ 700 megs (linux/mkdcdisc) or ~260 megs (windows/cdi4dc), then you did something wrong.
|
||||
- You can type `rm -rf repack-data` (and press enter)
|
||||
- And then start this step from the beggining
|
||||
|
||||
|
||||
## How to report issues
|
||||
- Take a photo of your tv/monitor and vmu
|
||||
- open a ticket via https://gitlab.com/skmp/dca3-game/-/issues/new
|
||||
- state which elf you have used (eg, https://gitlab.com/skmp/dca3-game/-/jobs/8725216645)
|
||||
- write something descriptive of what is/went wrong
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ AUDIO_STREAM_OPTION=-q
|
||||
MKDCDISC_PAD_OPTION=
|
||||
endif
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
include common.mk
|
||||
|
||||
OBJS = $(RE3_OBJS) $(RW_OBJS) \
|
||||
@@ -100,11 +102,11 @@ OBJS_NO_FAST_MATH = \
|
||||
KOS_CPPFLAGS += -fbuiltin -ffast-math -ffp-contract=fast \
|
||||
-mfsrra -mfsca
|
||||
|
||||
# The rm-elf step is to remove the target before building, to force the
|
||||
# re-creation of the rom disk.
|
||||
all: $(TARGET)
|
||||
|
||||
ifdef KOS_BASE
|
||||
include $(KOS_BASE)/Makefile.rules
|
||||
else
|
||||
$(warning "KOS_BASE is not set. Only prebuilt targets will work.")
|
||||
endif
|
||||
|
||||
DEPS = $(OBJS:.o=.d) $(OBJS_TEXCONV:.o:.d)
|
||||
|
||||
@@ -153,7 +155,7 @@ $(OBJS_NO_FAST_MATH): %.o: %.cpp
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
kos-c++ -o $(TARGET) $(OBJS) -Wl,--gc-sections -Wl,--as-needed -Wl,-Map,output.map \
|
||||
-flto=auto $(if $(WITH_IDE),-lkosfat) $(if $(WITH_SD),-lkosfat)
|
||||
-flto=auto $(if $(WITH_IDE),-lkosfat) $(if $(WITH_SD),-lkosfat) -Wl,--build-id=sha1
|
||||
@echo && echo && echo "*** Build Completed Successfully ***" && echo && echo
|
||||
|
||||
run: $(TARGET)
|
||||
@@ -210,22 +212,28 @@ $(PROJECT_NAME)-prebuilt.iso: IP.BIN 1ST_READ_PREBUILT.BIN $(REPACK_DIR)/repacke
|
||||
ifeq ($(HAVE_CDI4DC), yes)
|
||||
$(PROJECT_NAME).cdi: $(PROJECT_NAME).iso
|
||||
cdi4dc $(PROJECT_NAME).iso $(PROJECT_NAME).cdi > cdi.log
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
|
||||
$(PROJECT_NAME)-no-repack.cdi: $(PROJECT_NAME)-no-repack.iso
|
||||
cdi4dc $(PROJECT_NAME)-no-repack.iso $(PROJECT_NAME)-no-repack.cdi > cdi.log
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
|
||||
$(PROJECT_NAME)-prebuilt.cdi: $(PROJECT_NAME)-prebuilt.iso
|
||||
cdi4dc $(PROJECT_NAME).iso $(PROJECT_NAME).cdi > cdi.log
|
||||
rm 1ST_READ_PREBUILT.BIN
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
else
|
||||
$(PROJECT_NAME).cdi: $(TARGET) $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTA3SF8.b
|
||||
mkdcdisc -e $(TARGET) -o $(PROJECT_NAME).cdi -d $(REPACK_GTA_DIR)/ $(MKDCDISC_PAD_OPTION) -n DCA3 -a "the gang"
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
|
||||
$(PROJECT_NAME)-no-repack.cdi: $(TARGET) $(REPACK_GTA_DIR)/GTA3SF8.b
|
||||
mkdcdisc -e $(TARGET) -o $(PROJECT_NAME)-no-repack.cdi -d $(REPACK_GTA_DIR)/ $(MKDCDISC_PAD_OPTION) -n DCA3 -a "the gang"
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
|
||||
$(PROJECT_NAME)-prebuilt.cdi: $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTA3SF8.b
|
||||
mkdcdisc -e $(TARGET) -o $(PROJECT_NAME).cdi -d $(REPACK_GTA_DIR)/ $(MKDCDISC_PAD_OPTION) -n DCA3 -a "the gang"
|
||||
@echo && echo && echo "*** CDI Baked Successfully ***" && echo && echo
|
||||
endif
|
||||
|
||||
cdi: $(PROJECT_NAME).cdi
|
||||
@@ -345,7 +353,8 @@ STREAM_WAV_DECODED = $(addprefix $(REPACK_STREAM_DECODED_DIR)/, $(STREAM_WAV))
|
||||
|
||||
$(REPACK_DIR)/repacked: $(REPACK_GTA_DIR)/models/gta3.img $(REPACK_GTA_DIR)/models/gta3.dir $(LOOSE_FILES_DC) $(STREAM_ADPCM_DC) $(SFX_DC_RAW) $(SFX_DC_DSC)
|
||||
mkdir -p $(@D)
|
||||
touch $@
|
||||
@git archive --format zip --output "$(REPACK_GTA_DIR)/DCA3-$(GIT_VERSION).zip" HEAD
|
||||
@touch $@
|
||||
@echo && echo && echo "*** Repack Completed Successfully ***" && echo && echo
|
||||
|
||||
$(REPACK_DIR)/unpacked: imgtool $(GTA_DIR)/models/gta3.img $(GTA_DIR)/models/gta3.dir
|
||||
@@ -425,20 +434,20 @@ $(REPACK_DIR)/packed: $(IMG_TEXTURES_DC) $(IMG_MODELS_DC)
|
||||
mkdir -p $(@D)
|
||||
mkdir -p "$(REPACK_GTA_DIR)/models/gta3"
|
||||
./imgtool pack "$(REPACK_GTA_DIR)/models/gta3" "$(REPACK_IMG_DC_DIR)"
|
||||
touch $@
|
||||
@touch $@
|
||||
|
||||
$(REPACK_GTA_DIR)/models/gta3.img $(REPACK_GTA_DIR)/models/gta3.dir: $(REPACK_DIR)/packed
|
||||
touch $@
|
||||
@touch $@
|
||||
|
||||
# sfx processing
|
||||
$(REPACK_DIR)/unpacked-sfx: extract-sfx $(GTA_DIR)/audio/sfx.SDT $(GTA_DIR)/audio/sfx.RAW
|
||||
mkdir -p $(@D)
|
||||
mkdir -p "$(REPACK_SFX_ORIG_DIR)"
|
||||
./extract-sfx "$(GTA_DIR)/audio/sfx.SDT" "$(GTA_DIR)/audio/sfx.RAW" "$(REPACK_SFX_ORIG_DIR)"
|
||||
touch $@
|
||||
@touch $@
|
||||
|
||||
$(SFX_ORIG): $(REPACK_DIR)/unpacked-sfx
|
||||
touch $@
|
||||
@touch $@
|
||||
|
||||
$(SFX_ORIG_LOOP): $(SFX_ORIG)
|
||||
@touch $@
|
||||
|
||||
@@ -278,17 +278,17 @@ int validate_wav_header(wavhdr_t *wavhdr, wavhdr3_t *wavhdr3, int format, int bi
|
||||
|
||||
if (memcmp(wavhdr->hdr1, "RIFF", 4)) {
|
||||
fprintf(stderr, "Invalid RIFF header.\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
if (memcmp(wavhdr->hdr2, "WAVEfmt ", 8)) {
|
||||
fprintf(stderr, "Invalid WAVEfmt header.\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
if (wavhdr->hdrsize < 0x10) {
|
||||
fprintf(stderr, "Invalid header size, %d bytes\n", wavhdr->hdrsize);
|
||||
result = -1;
|
||||
result = 1;
|
||||
} else if (wavhdr->hdrsize > 0x10) {
|
||||
fprintf(stderr, "Unusual header size, seeking %d bytes\n", wavhdr->hdrsize - 0x10);
|
||||
fseek(in, wavhdr->hdrsize - 0x10, SEEK_CUR);
|
||||
@@ -296,29 +296,29 @@ int validate_wav_header(wavhdr_t *wavhdr, wavhdr3_t *wavhdr3, int format, int bi
|
||||
|
||||
if (wavhdr->format != format) {
|
||||
fprintf(stderr, "Unsupported format.\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
if (wavhdr->channels != 1 && wavhdr->channels != 2) {
|
||||
fprintf(stderr, "Unsupported number of channels.\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
if (wavhdr->bits != bits) {
|
||||
fprintf(stderr, "Unsupported bit depth.\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
if (fread(wavhdr3->hdr3, 1, 4, in) != 4) {
|
||||
fprintf(stderr, "Failed to read next chunk header!\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (fread(&wavhdr3->datasize, 1, 4, in) != 4) {
|
||||
fprintf(stderr, "Failed to read chunk size!\n");
|
||||
result = -1;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ int aud2adpcm(const char *infile, const char *outfile, int use_hdr, int to_mono,
|
||||
!loadMp3(infile, &pcmsize, &pcmbuf, &channels, &freq) &&
|
||||
!loadWavIMA(infile, &pcmsize, &pcmbuf, &channels, &freq)) {
|
||||
fprintf(stderr, "Cannot load input file as wav, mp3, or IMA ADPCM.\n");
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (to_mono && channels == 2) {
|
||||
@@ -544,7 +544,7 @@ int aud2adpcm(const char *infile, const char *outfile, int use_hdr, int to_mono,
|
||||
fclose(out);
|
||||
free(pcmbuf);
|
||||
free(adpcmbuf);
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
fclose(out);
|
||||
@@ -567,6 +567,7 @@ void usage() {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
if (argc == 4) {
|
||||
if (!strcmp(argv[1], "-t")) {
|
||||
return aud2adpcm(argv[2], argv[3], 1, 0, 0);
|
||||
@@ -576,10 +577,10 @@ int main(int argc, char **argv) {
|
||||
return aud2adpcm(argv[2], argv[3], 0, 0, 0);
|
||||
} else {
|
||||
usage();
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
usage();
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
GIT_VERSION := $(shell git describe --always --tags --long --dirty 2>/dev/null || echo "NO_GIT")
|
||||
CI_JOB_ID ?= 00000000
|
||||
|
||||
|
||||
git-version.tmp:
|
||||
@echo "Generating git-version.tmp with GIT_VERSION = \"$(GIT_VERSION)\""
|
||||
@echo "#pragma once" > git-version.tmp
|
||||
@echo "#ifndef VERSION_H" >> git-version.tmp
|
||||
@echo "#define VERSION_H" >> git-version.tmp
|
||||
@echo "#define GIT_VERSION \"$(GIT_VERSION)\"" >> git-version.tmp
|
||||
@echo "#define CI_JOB_ID \"$(CI_JOB_ID)\"" >> git-version.tmp
|
||||
@echo "#endif // VERSION_H" >> git-version.tmp
|
||||
|
||||
git-version.h: git-version.tmp
|
||||
@if [ ! -f git-version.h ] || ! cmp -s git-version.tmp git-version.h; then \
|
||||
echo "Updating git-version.h"; \
|
||||
cp git-version.tmp git-version.h; \
|
||||
else \
|
||||
echo "git-version.h is up to date. No change."; \
|
||||
fi
|
||||
|
||||
.PHONY: git-version.tmp
|
||||
|
||||
../src/skel/dc/dc.cpp: git-version.h
|
||||
|
||||
|
||||
# List all of your C files here, but change the extension to ".o"
|
||||
# Include "romdisk.o" if you want a rom disk.
|
||||
|
||||
@@ -3,6 +3,8 @@ TARGET ?= dca3-sim.elf
|
||||
IS_MAC := $(shell uname -s | grep -i "darwin" > /dev/null && echo "yes" || echo "no")
|
||||
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
include common.mk
|
||||
|
||||
OBJS = $(RE3_OBJS) $(RW_OBJS) \
|
||||
@@ -52,8 +54,6 @@ else
|
||||
$(CXX) -msse2 -mfpmath=sse -c -O3 -g -fno-pic -no-pie -o $@ $(CXXFLAGS) -I../vendor/koshle -I../vendor/emu -m32 -U_WIN32 -UWIN32 -UWINNT -Ui386 -DDC_SIM -D_FILE_OFFSET_BITS=64 $<
|
||||
endif
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
clean:
|
||||
-rm -f $(OBJS_SIM) $(TARGET)
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ int main(int argc, const char** argv) {
|
||||
StoreModelFile(argv[2], clump);
|
||||
} else {
|
||||
printf("Invalid format: %s\n", argv[1]);
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
380
src/core/ControllerConfig.cpp
Normal file → Executable file
380
src/core/ControllerConfig.cpp
Normal file → Executable file
@@ -2054,21 +2054,60 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
static const char* Dreamcast_DPad_Down = "D-Pad Down";
|
||||
static const char* Dreamcast_DPad_Left = "D-Pad Left";
|
||||
static const char* Dreamcast_DPad_Right = "D-Pad Right";
|
||||
static const char* Dreamcast_LefAnalog_Up = "Joystick Up";
|
||||
static const char* Dreamcast_LefAnalog_Down = "Joystick Down";
|
||||
static const char* Dreamcast_LefAnalog_Left = "Joystick Left";
|
||||
static const char* Dreamcast_LefAnalog_Right = "Joystick Right";
|
||||
static const char* Dreamcast_NotAssigned = "Not Assigned";
|
||||
static const char* Dreamcast_Stick_Up = "Joystick Up";
|
||||
static const char* Dreamcast_Stick_Down = "Joystick Down";
|
||||
static const char* Dreamcast_Stick_Left = "Joystick Left";
|
||||
static const char* Dreamcast_Stick_Right = "Joystick Right";
|
||||
static const char* Dreamcast_VehicleLookLeft = "A + Joystick Left";
|
||||
static const char* Dreamcast_VehicleLookRight = "A + Joystick Right";
|
||||
static const char* Dreamcast_CenterCamera = "Double click X";
|
||||
static const char* Dreamcast_CameraUp = "X + Joystick Up";
|
||||
static const char* Dreamcast_CameraDown = "X + Joystick Down";
|
||||
static const char* Dreamcast_CameraLeft = "X + Joystick Left";
|
||||
static const char* Dreamcast_CameraRight = "X + Joystick Right";
|
||||
static const char* Dreamcast_LookBehind = "Right trigger + Left trigger";
|
||||
static const char* Dreamcast_NotAssigned = "Not Assigned";
|
||||
|
||||
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC) // CONTROL_CLASSIC
|
||||
//Dual sticks
|
||||
static const char* LefAnalog_Up = "Left Stick Up";
|
||||
static const char* LefAnalog_Down = "Left Stick Down";
|
||||
static const char* LefAnalog_Left = "Left Stick Left";
|
||||
static const char* LefAnalog_Right = "Left Stick Right";
|
||||
|
||||
static const char* RightAnalog_Up = "Right Stick Up";
|
||||
static const char* RightAnalog_Down = "Right Stick Down";
|
||||
static const char* RightAnalog_Left = "Right Stick Left";
|
||||
static const char* RightAnalog_Right = "Right Stick Right";
|
||||
|
||||
//Xbox Specific
|
||||
static const char* Xbox_VehicleLookLeft = "LB";
|
||||
static const char* Xbox_VehicleLookRight = "RB";
|
||||
static const char* Xbox_VehicleLookBehind = "RB + LB";
|
||||
static const char* Xbox_Back = "Back";
|
||||
|
||||
|
||||
//PS2 Specific
|
||||
static const char* Dreamcast_PS2_VehicleLookLeft = "B + Joystick Left";
|
||||
static const char* Dreamcast_PS2_VehicleLookRight = "B + Joystick Right";
|
||||
static const char* PS2_L1 = "L1";
|
||||
static const char* PS2_R1 = "R1";
|
||||
static const char* PS2_L2 = "L2";
|
||||
static const char* PS2_R2 = "R2";
|
||||
static const char* PS2_Cross = "Cross";
|
||||
static const char* PS2_Square = "Square";
|
||||
static const char* PS2_Circle = "Circle";
|
||||
static const char* PS2_Triangle = "Triangle";
|
||||
|
||||
|
||||
if ((CPad::GetPad(0)->Mode == 0) && (CPad::GetPad(0)->IsDualAnalog == 0)) // Standard DC controller, Xbox like bindings
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case VEHICLE_LOOKLEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HORN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2083,28 +2122,28 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_CHANGE_RADIO_STATION:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_BRAKE:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TOGGLE_SUBMISSIONS:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_FORWARD:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_BACK:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2122,22 +2161,22 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_JUMPING:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SPRINT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CENTER_CAMERA_BEHIND_PLAYER:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_IN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2170,7 +2209,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case NETWORK_TALK: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2198,15 +2237,15 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // CONTROL_STANDARD
|
||||
if ((CPad::GetPad(0)->Mode == 0) && (CPad::GetPad(0)->IsDualAnalog == 1)) // Dual analog, Xbox like bindings
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case VEHICLE_LOOKLEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Xbox_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Xbox_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HORN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2230,19 +2269,19 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_FORWARD:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_BACK:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
@@ -2266,17 +2305,155 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CENTER_CAMERA_BEHIND_PLAYER:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_IN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_UP:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_DOWN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETLEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETRIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETUP:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETDOWN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
|
||||
for (int i = 0; (ActionText[i] = Xbox_Back[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Xbox_VehicleLookBehind[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case NETWORK_TALK: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case _CONTROLLERACTION_36: // What is that???
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TOGGLE_DPAD: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
default:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((CPad::GetPad(0)->Mode == 1) && (CPad::GetPad(0)->IsDualAnalog == 0)) // Standard DC controller, PS2 like bindings
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case VEHICLE_LOOKLEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_PS2_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_PS2_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HORN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HANDBRAKE:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_ENTER_EXIT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Y[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_ACCELERATE:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_CHANGE_RADIO_STATION:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_BRAKE:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TOGGLE_SUBMISSIONS:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_FORWARD:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_BACK:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_WEAPON_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_WEAPON_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOCK_TARGET:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_JUMPING:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SPRINT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CENTER_CAMERA_BEHIND_PLAYER:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_IN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
@@ -2308,8 +2485,147 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case NETWORK_TALK: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case _CONTROLLERACTION_36: // What is that???
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TOGGLE_DPAD: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
default:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((CPad::GetPad(0)->Mode == 1) && (CPad::GetPad(0)->IsDualAnalog == 1)) // Dual Stick, PS2 like bindings
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case VEHICLE_LOOKLEFT:
|
||||
for (int i = 0; (ActionText[i] = PS2_L2[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKRIGHT:
|
||||
for (int i = 0; (ActionText[i] = PS2_R2[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HORN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_HANDBRAKE:
|
||||
for (int i = 0; (ActionText[i] = PS2_R1[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_ENTER_EXIT:
|
||||
for (int i = 0; (ActionText[i] = PS2_Triangle[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_ACCELERATE:
|
||||
for (int i = 0; (ActionText[i] = PS2_Cross[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_CHANGE_RADIO_STATION:
|
||||
for (int i = 0; (ActionText[i] = PS2_L1[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_BRAKE:
|
||||
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case TOGGLE_SUBMISSIONS:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_LEFT:
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_FORWARD:
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case GO_BACK:
|
||||
for (int i = 0; (ActionText[i] = LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_FIREWEAPON:
|
||||
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_WEAPON_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_WEAPON_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_LOCK_TARGET:
|
||||
for (int i = 0; (ActionText[i] = PS2_R1[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_JUMPING:
|
||||
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SPRINT:
|
||||
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_LEFT:
|
||||
for (int i = 0; (ActionText[i] = PS2_L2[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = PS2_R2[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_CENTER_CAMERA_BEHIND_PLAYER:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_IN:
|
||||
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
for (int i = 0; (ActionText[i] = PS2_Cross[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_LEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_RIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_UP:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case PED_1RST_PERSON_LOOK_DOWN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETLEFT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETRIGHT:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETUP:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_TURRETDOWN:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
case NETWORK_TALK: // Not Used on Dreamcast
|
||||
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
|
||||
break;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "FileLoader.h"
|
||||
#include "frontendoption.h"
|
||||
#include "IniFile.h"
|
||||
#include "../skel/dc/dc.h"
|
||||
|
||||
// Game has colors inlined in code.
|
||||
// For easier modification we collect them here:
|
||||
@@ -234,12 +235,26 @@ const char* FrontendFilenames[][2] = {
|
||||
{"fe_iconaudio", "" },
|
||||
{"fe_icondisplay", "" },
|
||||
{"fe_iconlanguage", "" },
|
||||
|
||||
#ifdef RW_DC
|
||||
{"dc_xboxf",""},
|
||||
{"dc_xboxd",""},
|
||||
{"dc_ps2f",""},
|
||||
{"dc_ps2d",""},
|
||||
{"xbox_f",""},
|
||||
{"xbox_d",""},
|
||||
{"ps2_f",""},
|
||||
{"ps2_d",""},
|
||||
|
||||
#else
|
||||
{"fe_controller", "" },
|
||||
{"fe_controllersh", "" },
|
||||
{"fe_arrows1", "" },
|
||||
{"fe_arrows2", "" },
|
||||
{"fe_arrows3", "" },
|
||||
{"fe_arrows4", "" },
|
||||
|
||||
#endif
|
||||
{"fe_radio1", "" },
|
||||
{"fe_radio2", "" },
|
||||
{"fe_radio3", "" },
|
||||
@@ -1117,6 +1132,46 @@ CMenuManager::Draw()
|
||||
#ifdef PS2_SAVE_DIALOG
|
||||
if(!m_bRenderGameInMenu)
|
||||
#endif
|
||||
|
||||
#ifdef RW_DC
|
||||
if (aScreens[m_nCurrScreen].m_ScreenName[0] != '\0') {
|
||||
|
||||
SET_FONT_FOR_MENU_HEADER
|
||||
|
||||
if (strcmp("FET_AGS", aScreens[m_nCurrScreen].m_ScreenName) == 0)
|
||||
{
|
||||
wchar *PageName = nil;
|
||||
char asciiTemp[32];
|
||||
wchar unicodeTemp[64];
|
||||
|
||||
sprintf(asciiTemp, "CONTROLLER SETUP");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
PageName = unicodeTemp;
|
||||
|
||||
CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), PageName);
|
||||
}
|
||||
else if (strcmp("FET_CTL", aScreens[m_nCurrScreen].m_ScreenName) == 0)
|
||||
{
|
||||
wchar *PageName = nil;
|
||||
char asciiTemp[32];
|
||||
wchar unicodeTemp[64];
|
||||
|
||||
sprintf(asciiTemp, "KEYBOARD MOUSE SETUP");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
PageName = unicodeTemp;
|
||||
|
||||
CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), PageName);
|
||||
}
|
||||
else
|
||||
{
|
||||
CFont::PrintString(PAGE_NAME_X(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
|
||||
}
|
||||
|
||||
// Weird place to put that.
|
||||
nextYToUse += 24.0f + 10.0f;
|
||||
}
|
||||
|
||||
#else
|
||||
if (aScreens[m_nCurrScreen].m_ScreenName[0] != '\0') {
|
||||
|
||||
SET_FONT_FOR_MENU_HEADER
|
||||
@@ -1125,6 +1180,7 @@ CMenuManager::Draw()
|
||||
// Weird place to put that.
|
||||
nextYToUse += 24.0f + 10.0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
|
||||
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_X), MENU_Y(MENUACTION_SCALE_MULT * MENU_TEXT_SIZE_Y));
|
||||
@@ -1379,7 +1435,29 @@ CMenuManager::Draw()
|
||||
sprintf(gString, "FEM_SL%d", i);
|
||||
leftText = TheText.Get(gString);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else if ((strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FET_AGS")) == 0)
|
||||
{
|
||||
//wchar *rightText = nil;
|
||||
char asciiTemp[32];
|
||||
wchar unicodeTemp[64];
|
||||
|
||||
sprintf(asciiTemp, "CONTROLLER SETUP");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
leftText = unicodeTemp;
|
||||
}
|
||||
else if ((strcmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FET_CTL")) == 0)
|
||||
{
|
||||
//wchar *rightText = nil;
|
||||
char asciiTemp[32];
|
||||
wchar unicodeTemp[64];
|
||||
|
||||
sprintf(asciiTemp, "KEYBOARD MOUSE SETUP");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
leftText = unicodeTemp;
|
||||
}
|
||||
|
||||
else {
|
||||
leftText = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName);
|
||||
}
|
||||
|
||||
@@ -1460,10 +1538,16 @@ CMenuManager::Draw()
|
||||
case MENUACTION_CTRLCONFIG:
|
||||
switch (CPad::GetPad(0)->Mode) {
|
||||
case 0:
|
||||
rightText = TheText.Get("FEC_CF1");
|
||||
//rightText = TheText.Get("FEC_CF1");
|
||||
sprintf(asciiTemp, "XBOX LIKE");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
rightText = unicodeTemp;
|
||||
break;
|
||||
case 1:
|
||||
rightText = TheText.Get("FEC_CF2");
|
||||
//rightText = TheText.Get("FEC_CF2");
|
||||
sprintf(asciiTemp, "PS2 LIKE");
|
||||
AsciiToUnicode(asciiTemp, unicodeTemp);
|
||||
rightText = unicodeTemp;
|
||||
break;
|
||||
case 2:
|
||||
rightText = TheText.Get("FEC_CF3");
|
||||
@@ -1930,6 +2014,15 @@ CMenuManager::Draw()
|
||||
CSprite2d::DrawRect(CRect(MENU_X_LEFT_ALIGNED(181), MENU_Y(99), MENU_X_LEFT_ALIGNED(229), MENU_Y(122)), CRGBA(m_PrefsPlayerRed, m_PrefsPlayerGreen, m_PrefsPlayerBlue, FadeIn(255)));
|
||||
}
|
||||
|
||||
char strver[200];
|
||||
wchar ustr[200];
|
||||
snprintf(strver, sizeof(strver), "DCA3: %s", getExecutableTag());
|
||||
AsciiToUnicode(strver, ustr);
|
||||
|
||||
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X*3/4), MENU_Y(MENU_TEXT_SIZE_Y*3/4));
|
||||
CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
|
||||
CFont::PrintString(MENU_X_LEFT_ALIGNED(BUILDID_TEXT_LEFT_MARGIN), SCREEN_SCALE_FROM_BOTTOM(BUILDID_TEXT_BOTTOM_MARGIN), ustr);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
@@ -3715,7 +3808,11 @@ CMenuManager::LoadController(int8 type)
|
||||
}
|
||||
|
||||
// Unload current textures
|
||||
#ifdef RW_DC
|
||||
for (int i = DC_XBOXF; i <= PS2_D; i++)
|
||||
#else
|
||||
for (int i = FE_CONTROLLER; i <= FE_ARROWS4; i++)
|
||||
#endif
|
||||
m_aFrontEndSprites[i].Delete();
|
||||
|
||||
// Unload txd
|
||||
@@ -3748,7 +3845,11 @@ CMenuManager::LoadController(int8 type)
|
||||
assert(txdSlot != -1);
|
||||
// Load new textures
|
||||
CTxdStore::SetCurrentTxd(txdSlot);
|
||||
#ifdef RW_DC
|
||||
for (int i = DC_XBOXF; i <= PS2_D; i++) {
|
||||
#else
|
||||
for (int i = FE_CONTROLLER; i <= FE_ARROWS4; i++) {
|
||||
#endif
|
||||
m_aFrontEndSprites[i].SetTexture(FrontendFilenames[i][0], FrontendFilenames[i][1]);
|
||||
m_aFrontEndSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
|
||||
}
|
||||
@@ -5378,10 +5479,12 @@ CMenuManager::ProcessButtonPresses(void)
|
||||
#ifdef FIX_BUGS
|
||||
case MENUACTION_CTRLCONFIG:
|
||||
CPad::GetPad(0)->Mode += changeValueBy;
|
||||
if (CPad::GetPad(0)->Mode > 3)
|
||||
//if (CPad::GetPad(0)->Mode > 3)
|
||||
if (CPad::GetPad(0)->Mode > 1)
|
||||
CPad::GetPad(0)->Mode = 0;
|
||||
else if (CPad::GetPad(0)->Mode < 0)
|
||||
CPad::GetPad(0)->Mode = 3;
|
||||
//CPad::GetPad(0)->Mode = 3;
|
||||
CPad::GetPad(0)->Mode = 1;
|
||||
SaveSettings();
|
||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
||||
break;
|
||||
@@ -5531,7 +5634,8 @@ CMenuManager::ProcessOnOffMenuOptions()
|
||||
#ifndef FIX_BUGS
|
||||
case MENUACTION_CTRLCONFIG:
|
||||
CPad::GetPad(0)->Mode++;
|
||||
if (CPad::GetPad(0)->Mode > 3)
|
||||
//if (CPad::GetPad(0)->Mode > 3)
|
||||
if (CPad::GetPad(0)->Mode > 1)
|
||||
CPad::GetPad(0)->Mode = 0;
|
||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
|
||||
break;
|
||||
@@ -5873,7 +5977,6 @@ CMenuManager::PrintController(void)
|
||||
|
||||
#define X(f) ((f)*scale + centerX)
|
||||
#define Y(f) ((f)*scale + centerY)
|
||||
|
||||
m_aFrontEndSprites[FE_CONTROLLERSH].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X((CONTROLLER_SIZE_X + 4.8f) * scale), MENU_Y((CONTROLLER_SIZE_Y + 4.8f) * scale), CRGBA(0, 0, 0, 255));
|
||||
m_aFrontEndSprites[FE_CONTROLLER].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
|
||||
if (m_DisplayControllerOnFoot) {
|
||||
@@ -6164,7 +6267,373 @@ CMenuManager::PrintController(void)
|
||||
#undef X
|
||||
#undef Y
|
||||
}
|
||||
|
||||
#elif RW_DC
|
||||
void
|
||||
CMenuManager::PrintController(void)
|
||||
{
|
||||
// FIX: Originally this function doesn't have StretchX/Y, everything had constant pixel size (due to screen was abandoned early?)
|
||||
// Also texts and their alignment were very bad, so I tried to make them readable (commented out the original code, and marked the ones I added with X)
|
||||
|
||||
switch (CPad::GetPad(0)->Mode)
|
||||
{
|
||||
case 0: //Xbox Mode
|
||||
if (CPad::GetPad(0)->IsDualAnalog)
|
||||
{
|
||||
if (m_DisplayControllerOnFoot)
|
||||
m_aFrontEndSprites[XBOX_F].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
else
|
||||
m_aFrontEndSprites[XBOX_D].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_DisplayControllerOnFoot)
|
||||
m_aFrontEndSprites[DC_XBOXF].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
else
|
||||
m_aFrontEndSprites[DC_XBOXD].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
}
|
||||
break;
|
||||
case 1: //PS2 Mode
|
||||
if (CPad::GetPad(0)->IsDualAnalog)
|
||||
{
|
||||
if (m_DisplayControllerOnFoot)
|
||||
m_aFrontEndSprites[PS2_F].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
else
|
||||
m_aFrontEndSprites[PS2_D].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_DisplayControllerOnFoot)
|
||||
m_aFrontEndSprites[DC_PS2F].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
else
|
||||
m_aFrontEndSprites[DC_PS2D].Draw(MENU_X_LEFT_ALIGNED(65.0f), MENU_Y(75.0f), MENU_X(512.0f), MENU_Y(256.0f), CRGBA(255, 255, 255, 255));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); // X
|
||||
|
||||
// // CFont::SetScale(0.4f, 0.4f);
|
||||
// CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); // X
|
||||
|
||||
// // CFont::SetColor(CRGBA(128, 128, 128, FadeIn(255)));
|
||||
// CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255))); // X
|
||||
// CFont::SetDropShadowPosition(1); // X
|
||||
// CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255))); // X
|
||||
|
||||
// if (m_DisplayControllerOnFoot) {
|
||||
// switch (CPad::GetPad(0)->Mode) {
|
||||
// case 0:
|
||||
// if (CPad::GetPad(0)->IsDualAnalog)
|
||||
// {
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_LOF"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_ENV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_ATT"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_RUN"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(220.0f), TheText.Get("FEC_CWL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(232.0f), TheText.Get("FEC_LB"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(206.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(176.0f), TheText.Get("FEC_MOV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(247.0f), MENU_Y(101.0f), TheText.Get("FEC_TAR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(297.0f), MENU_Y(89.0f), TheText.Get("FEC_CWR"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(257.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(89.0f), TheText.Get("FEC_CMR"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(195.0f), TheText.Get("FEC_JUM"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(178.0f), TheText.Get("FEC_ENV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(212.0f), TheText.Get("FEC_RUN"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(394.0f), MENU_Y(101.0f), TheText.Get("FEC_ATT"));
|
||||
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
// break;
|
||||
// case 1:
|
||||
// if (CPad::GetPad(0)->IsDualAnalog)
|
||||
// {
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_LOF"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_ENV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_ATT"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_RUN"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(220.0f), TheText.Get("FEC_CWL"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(232.0f), TheText.Get("FEC_LB"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(206.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(176.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(247.0f), MENU_Y(101.0f), TheText.Get("FEC_CMR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(297.0f), MENU_Y(89.0f), TheText.Get("FEC_CWR"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(257.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(89.0f), TheText.Get("FEC_JUM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(178.0f), TheText.Get("FEC_ENV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(212.0f), TheText.Get("FEC_RUN"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(394.0f), MENU_Y(101.0f), TheText.Get("FEC_TAR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(195.0f), TheText.Get("FEC_ATT"));
|
||||
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
// break;
|
||||
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_LOF"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_NA"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_ENV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_ATT"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_RUN"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// // break;
|
||||
// // case 2:
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_ENV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_MOV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_LOF"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_RUN"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_ATT"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// // break;
|
||||
// // case 3:
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_NA"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_LOF"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_RUN"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_ATT"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// // break;
|
||||
// default:
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
// switch (CPad::GetPad(0)->Mode) {
|
||||
// case 0:
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_LL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_RSC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_VES"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_VES"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_HO3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_LB"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_LR"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_HAB"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_BRA"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_EXV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_CAW"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_ACC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_TUC"));
|
||||
// // // FIX: Coordinates of this line is undefined in PC...
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(304.0f), TheText.Get("FEC_SM3"));
|
||||
// // break;
|
||||
|
||||
// if (CPad::GetPad(0)->IsDualAnalog)
|
||||
// {
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_CWL"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_LOF"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_MOV"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_CWR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_TAR"));
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_JUM"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_ENV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_ATT"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_RUN"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(220.0f), TheText.Get("FEC_SUB"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(232.0f), TheText.Get("FEC_HRN"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(206.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(202.0f), MENU_Y(176.0f), TheText.Get("FEC_VES"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(247.0f), MENU_Y(101.0f), TheText.Get("FEC_BRA"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(297.0f), MENU_Y(89.0f), TheText.Get("FEC_RSC"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(257.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(89.0f), TheText.Get("FEC_CMR"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(195.0f), TheText.Get("FEC_HAB"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(212.0f), TheText.Get("FEC_PFR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(394.0f), MENU_Y(101.0f), TheText.Get("FEC_ACC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(438.45f), MENU_Y(178.0f), TheText.Get("FEC_EXV"));
|
||||
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_FPC"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_LB3"));
|
||||
// //CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_R3"));
|
||||
// }
|
||||
|
||||
|
||||
// case 1:
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_LL"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_HOR"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_CAM"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_VES"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_NA"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_RSC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_PAU"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_LB"));
|
||||
// CFont::SetRightJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_LR"));
|
||||
// CFont::SetJustifyOn(); // X
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_HAB"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_BRA"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_EXV"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_CAW"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_ACC"));
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_TUC"));
|
||||
// // FIX: Coordinates of this line is undefined in PC...
|
||||
// CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(304.0f), TheText.Get("FEC_SM3"));
|
||||
// break;
|
||||
// // case 2:
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_LL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_EXV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_VES"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_VES"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_RS3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_LB"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_LR"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_HOR"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_BRA"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_HAB"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_CAW"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_ACC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_TUC"));
|
||||
// // // FIX: Coordinates of this line is undefined in PC...
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(304.0f), TheText.Get("FEC_SM3"));
|
||||
// // break;
|
||||
// // case 3:
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(210.0f), MENU_Y(146.0f), TheText.Get("FEC_LL"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(185.0f), TheText.Get("FEC_HAB"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(225.0f), TheText.Get("FEC_TUC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(156.0f), MENU_Y(257.0f), TheText.Get("FEC_VES"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(263.0f), MENU_Y(301.0f), TheText.Get("FEC_HO3"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(290.0f), MENU_Y(288.0f), TheText.Get("FEC_CAM"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(344.0f), MENU_Y(146.0f), TheText.Get("FEC_PAU"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(185.0f), TheText.Get("FEC_LB"));
|
||||
// // CFont::SetRightJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(304.0f), MENU_Y(178.0f), TheText.Get("FEC_LR"));
|
||||
// // CFont::SetJustifyOn(); // X
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(212.0f), TheText.Get("FEC_CAW"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(225.0f), TheText.Get("FEC_SMT"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(238.0f), TheText.Get("FEC_EXV"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(254.0f), TheText.Get("FEC_RSC"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(269.0f), TheText.Get("FEC_NA"));
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(282.0f), TheText.Get("FEC_ACC"));
|
||||
// // // FIX: Coordinates of this line is undefined in PC...
|
||||
// // CFont::PrintString(MENU_X_LEFT_ALIGNED(398.0f), MENU_Y(304.0f), TheText.Get("FEC_BRA"));
|
||||
// // break;
|
||||
// default:
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// CFont::SetDropShadowPosition(0); // X
|
||||
}
|
||||
#else
|
||||
|
||||
void
|
||||
CMenuManager::PrintController(void)
|
||||
{
|
||||
@@ -6385,6 +6854,7 @@ CMenuManager::PrintController(void)
|
||||
|
||||
CFont::SetDropShadowPosition(0); // X
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MENU_MAP
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
#define HELPER_TEXT_LEFT_MARGIN 320.0f
|
||||
#define HELPER_TEXT_BOTTOM_MARGIN 120.0f
|
||||
|
||||
#define BUILDID_TEXT_LEFT_MARGIN 320.0f
|
||||
#define BUILDID_TEXT_BOTTOM_MARGIN 20.0f
|
||||
|
||||
#define PLAYERSETUP_LIST_TOP 28.0f
|
||||
#define PLAYERSETUP_LIST_BOTTOM 125.0f
|
||||
#define PLAYERSETUP_LIST_LEFT 200.0f
|
||||
@@ -102,12 +105,23 @@ enum eFrontendSprites
|
||||
FE_ICONAUDIO,
|
||||
FE_ICONDISPLAY,
|
||||
FE_ICONLANGUAGE,
|
||||
#ifdef RW_DC
|
||||
DC_XBOXF,
|
||||
DC_XBOXD,
|
||||
DC_PS2F,
|
||||
DC_PS2D,
|
||||
XBOX_F,
|
||||
XBOX_D,
|
||||
PS2_F,
|
||||
PS2_D,
|
||||
#else
|
||||
FE_CONTROLLER,
|
||||
FE_CONTROLLERSH,
|
||||
FE_ARROWS1,
|
||||
FE_ARROWS2,
|
||||
FE_ARROWS3,
|
||||
FE_ARROWS4,
|
||||
#endif
|
||||
FE_RADIO1,
|
||||
FE_RADIO2,
|
||||
FE_RADIO3,
|
||||
|
||||
@@ -662,6 +662,9 @@ bool CGame::Initialise(const char* datFile)
|
||||
CCollision::ms_collisionInMemory = currLevel;
|
||||
for (int i = 0; i < MAX_PADS; i++)
|
||||
CPad::GetPad(i)->Clear(true);
|
||||
#ifdef RW_DC
|
||||
//CPad::GetPad(0)->IsDualAnalog = false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -764,11 +764,8 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
||||
|
||||
// MENUPAGE_OPTIONS = 41
|
||||
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
|
||||
#ifdef GTA_HANDHELD
|
||||
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
|
||||
#else
|
||||
MENUACTION_CHANGEMENU, "FET_AGS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
|
||||
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
|
||||
#endif
|
||||
MENUACTION_LOADRADIO, "FET_AUD", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
|
||||
MENUACTION_CHANGEMENU, "FET_DIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
|
||||
1324
src/core/Pad.cpp
Normal file → Executable file
1324
src/core/Pad.cpp
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ public:
|
||||
int16 DPadUp, DPadDown, DPadLeft, DPadRight;
|
||||
int16 Start, Select;
|
||||
int16 Square, Triangle, Cross, Circle;
|
||||
uint32_t A, B, C, X, Y, Z;
|
||||
uint32_t A, B, C, D, X, Y, Z;
|
||||
int16 LeftShock, RightShock;
|
||||
int16 NetworkTalk;
|
||||
float GetLeftStickX(void) { return LeftStickX/32767.0f; };
|
||||
@@ -161,6 +161,13 @@ public:
|
||||
int32 LastTimeTouched;
|
||||
int32 AverageWeapon;
|
||||
int32 AverageEntries;
|
||||
bool IsKeyboardMouse;
|
||||
bool IsDualAnalog;
|
||||
bool CameraJustDown;
|
||||
bool CameraJustUp;
|
||||
uint32 CameraJustUpTime;
|
||||
uint32 CameraLastPressed;
|
||||
bool CameraIsDoublePressed;
|
||||
|
||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||
static bool IsAffectedByController;
|
||||
@@ -211,7 +218,11 @@ public:
|
||||
void StopShaking(int16 pad);
|
||||
|
||||
static CPad *GetPad(int32 pad);
|
||||
|
||||
|
||||
#ifdef RW_DC
|
||||
bool CameraSinglePress(void); //Checks if camera modifier was double clicked
|
||||
bool CameraDoublePress(void);
|
||||
#endif
|
||||
int16 GetSteeringLeftRight(void);
|
||||
int16 GetSteeringUpDown(void);
|
||||
int16 GetCarGunUpDown(void);
|
||||
|
||||
@@ -1196,8 +1196,8 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||
stacktrace();
|
||||
dbgio_dev_select("fb");
|
||||
sleep(1);
|
||||
dbgio_printf("RE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
dbgio_printf("POSIX error (may not be relevant): %s\n", strerror(errno));
|
||||
dbglog(DBG_CRITICAL, "RE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
dbglog(DBG_CRITICAL, "POSIX error (may not be relevant): %s\n", strerror(errno));
|
||||
stacktrace();
|
||||
dbgio_flush();
|
||||
abort();
|
||||
|
||||
@@ -87,7 +87,7 @@ float LowCloudsX[12] = { 1.0f, 0.7f, 0.0f, -0.7f, -1.0f, -0.7f, 0.0f, 0.7f, 0.8f
|
||||
float LowCloudsY[12] = { 0.0f, -0.7f, -1.0f, -0.7f, 0.0f, 0.7f, 1.0f, 0.7f, 0.4f, 0.4f, -0.8f, -0.8f };
|
||||
float LowCloudsZ[12] = { 0.0f, 1.0f, 0.5f, 0.0f, 1.0f, 0.3f, 0.9f, 0.4f, 1.3f, 1.4f, 1.2f, 1.7f };
|
||||
|
||||
float CoorsOffsetX[37] = {
|
||||
float CoorsOffsetX[MAX_CLOUDS] = {
|
||||
0.0f, 60.0f, 72.0f, 48.0f, 21.0f, 12.0f,
|
||||
9.0f, -3.0f, -8.4f, -18.0f, -15.0f, -36.0f,
|
||||
-40.0f, -48.0f, -60.0f, -24.0f, 100.0f, 100.0f,
|
||||
@@ -95,7 +95,7 @@ float CoorsOffsetX[37] = {
|
||||
100.0f, 100.0f, -30.0f, -20.0f, 10.0f, 30.0f,
|
||||
0.0f, -100.0f, -100.0f, -100.0f, -100.0f, -100.0f, -100.0f
|
||||
};
|
||||
float CoorsOffsetY[37] = {
|
||||
float CoorsOffsetY[MAX_CLOUDS] = {
|
||||
100.0f, 100.0f, 100.0f, 100.0f, 100.0f, 100.0f,
|
||||
100.0f, 100.0f, 100.0f, 100.0f, 100.0f, 100.0f,
|
||||
100.0f, 100.0f, 100.0f, 100.0f, -30.0f, 10.0f,
|
||||
@@ -103,7 +103,7 @@ float CoorsOffsetY[37] = {
|
||||
15.0f, 40.0f, -100.0f, -100.0f, -100.0f, -100.0f,
|
||||
-100.0f, -40.0f, -20.0f, 0.0f, 10.0f, 30.0f, 35.0f
|
||||
};
|
||||
float CoorsOffsetZ[37] = {
|
||||
float CoorsOffsetZ[MAX_CLOUDS] = {
|
||||
2.0f, 1.0f, 0.0f, 0.3f, 0.7f, 1.4f,
|
||||
1.7f, 0.24f, 0.7f, 1.3f, 1.6f, 1.0f,
|
||||
1.2f, 0.3f, 0.7f, 1.4f, 0.0f, 0.1f,
|
||||
@@ -225,13 +225,13 @@ CClouds::Render(void)
|
||||
float rot_cos = Cos(CloudRotation);
|
||||
int fluffyalpha = 160 * (1.0f - CWeather::Foggyness);
|
||||
if(fluffyalpha != 0){
|
||||
static bool bCloudOnScreen[37];
|
||||
static bool bCloudOnScreen[NUM_CLOUDS];
|
||||
float hilight;
|
||||
|
||||
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
|
||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpCloudTex[4]));
|
||||
for(i = 0; i < 37; i++){
|
||||
for(i = 0; i < NUM_CLOUDS; i++){
|
||||
RwV3d pos = { 2.0f*CoorsOffsetX[i], 2.0f*CoorsOffsetY[i], 40.0f*CoorsOffsetZ[i] + 40.0f };
|
||||
worldpos.x = pos.x*rot_cos + pos.y*rot_sin + campos.x;
|
||||
worldpos.y = pos.x*rot_sin - pos.y*rot_cos + campos.y;
|
||||
@@ -274,7 +274,7 @@ CClouds::Render(void)
|
||||
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE);
|
||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpCloudTex[3]));
|
||||
|
||||
for(i = 0; i < 37; i++){
|
||||
for(i = 0; i < NUM_CLOUDS; i++){
|
||||
RwV3d pos = { 2.0f*CoorsOffsetX[i], 2.0f*CoorsOffsetY[i], 40.0f*CoorsOffsetZ[i] + 40.0f };
|
||||
worldpos.x = pos.x*rot_cos + pos.y*rot_sin + campos.x;
|
||||
worldpos.y = pos.x*rot_sin - pos.y*rot_cos + campos.y;
|
||||
|
||||
@@ -19,3 +19,8 @@ public:
|
||||
int16 botred, int16 botgreen, int16 botblue, int16 alpha);
|
||||
static void RenderHorizon(void);
|
||||
};
|
||||
|
||||
enum {
|
||||
NUM_CLOUDS = 15,
|
||||
MAX_CLOUDS = 37
|
||||
};
|
||||
|
||||
@@ -62,6 +62,10 @@ long _dwOperatingSystemVersion;
|
||||
#include "AnimViewer.h"
|
||||
#include "Font.h"
|
||||
#include "MemoryMgr.h"
|
||||
#include "../../dreamcast/git-version.h"
|
||||
#include "dc.h"
|
||||
|
||||
#include <kos/dbglog.h>
|
||||
|
||||
// This is defined on project-level, via premake5 or cmake
|
||||
#ifdef GET_KEYBOARD_INPUT_FROM_X11
|
||||
@@ -1977,13 +1981,14 @@ __attribute__((noinline)) void stacktrace() {
|
||||
: "+r" (sp), "+r" (pr)
|
||||
:
|
||||
: );
|
||||
dbgio_printf("Stack trace: %p ", (void*)pr);
|
||||
dbglog(DBG_CRITICAL, "DCA3: %s\n", getExecutableTag());
|
||||
dbglog(DBG_CRITICAL, "Stack trace: %p ", (void*)pr);
|
||||
int found = 0;
|
||||
if(!(sp & 3) && sp > 0x8c000000 && sp < _arch_mem_top) {
|
||||
char** sp_ptr = (char**)sp;
|
||||
for (int so = 0; so < 16384; so++) {
|
||||
if (uintptr_t(&sp_ptr[so]) >= _arch_mem_top) {
|
||||
dbgio_printf("(@@%p) ", &sp_ptr[so]);
|
||||
dbglog(DBG_CRITICAL, "(@@%p) ", &sp_ptr[so]);
|
||||
break;
|
||||
}
|
||||
if (sp_ptr[so] > (char*)0x8c000000 && sp_ptr[so] < etext) {
|
||||
@@ -1999,9 +2004,9 @@ __attribute__((noinline)) void stacktrace() {
|
||||
uint16_t instr = instrp[-2];
|
||||
// BSR or BSRF or JSR @Rn ?
|
||||
if (((instr & 0xf000) == 0xB000) || ((instr & 0xf0ff) == 0x0003) || ((instr & 0xf0ff) == 0x400B)) {
|
||||
dbgio_printf("%p ", instrp);
|
||||
dbglog(DBG_CRITICAL, "%p ", instrp);
|
||||
if (found++ > 24) {
|
||||
dbgio_printf("(@%p) ", &sp_ptr[so]);
|
||||
dbglog(DBG_CRITICAL, "(@%p) ", &sp_ptr[so]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -2011,15 +2016,83 @@ __attribute__((noinline)) void stacktrace() {
|
||||
// dbglog(DBG_CRITICAL, "Stack trace: %p (@%p): out of range\n", (void*)sp_ptr[so], &sp_ptr[so]);
|
||||
}
|
||||
}
|
||||
dbgio_printf("end\n");
|
||||
dbglog(DBG_CRITICAL, "end\n");
|
||||
} else {
|
||||
dbgio_printf("(@%p)\n", (void*)sp);
|
||||
dbglog(DBG_CRITICAL, "(@%p)\n", (void*)sp);
|
||||
}
|
||||
}
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
extern "C" {
|
||||
extern const unsigned char _build_id_start[];
|
||||
extern const unsigned char _build_id_end[];
|
||||
}
|
||||
|
||||
std::string getBuildId()
|
||||
{
|
||||
// Pointer to the start of the .note.gnu.build-id section
|
||||
const unsigned char *p = _build_id_start;
|
||||
|
||||
// Parse the ELF note header
|
||||
struct NoteHeader {
|
||||
uint32_t n_namesz;
|
||||
uint32_t n_descsz;
|
||||
uint32_t n_type;
|
||||
};
|
||||
|
||||
// Read header fields (be careful with endianness if needed)
|
||||
const auto* note = reinterpret_cast<const NoteHeader*>(p);
|
||||
|
||||
// Move p beyond the note header
|
||||
p += sizeof(NoteHeader);
|
||||
|
||||
// Skip the "name" field + alignment (e.g. "GNU\0")
|
||||
// name is note->n_namesz bytes, then align up to 4 bytes
|
||||
auto nameBytes = (note->n_namesz + 3u) & ~3u;
|
||||
p += nameBytes;
|
||||
|
||||
// Now p should point to the actual build-id bytes, which are note->n_descsz in length.
|
||||
const unsigned char* buildId = p;
|
||||
auto buildIdSize = note->n_descsz;
|
||||
|
||||
// Convert it to a hex string
|
||||
std::ostringstream oss;
|
||||
oss << std::hex << std::setfill('0');
|
||||
for (uint32_t i = 0; i < buildIdSize; i++) {
|
||||
oss << std::setw(2) << static_cast<unsigned>(buildId[i]);
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#else
|
||||
std::string getBuildId() {
|
||||
return "non-dreamcast-build";
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* getSourceId() {
|
||||
return GIT_VERSION;
|
||||
}
|
||||
|
||||
const char* getCIJobId() {
|
||||
return CI_JOB_ID;
|
||||
}
|
||||
|
||||
static std::string executableTag = getBuildId().substr(0, 10) + ":" + getSourceId() + ":" + getCIJobId();
|
||||
|
||||
const char* getExecutableTag() {
|
||||
return executableTag.c_str();
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
dbglog(DBG_CRITICAL, "DCA3: %s\n", getExecutableTag());
|
||||
#if !defined(DC_SIM)
|
||||
std::set_terminate([]() {
|
||||
fflush(stdout);
|
||||
@@ -2029,8 +2102,8 @@ main(int argc, char *argv[])
|
||||
stacktrace();
|
||||
dbgio_dev_select("fb");
|
||||
sleep(1);
|
||||
dbgio_printf("std::terminate() called\n");
|
||||
dbgio_printf("POSIX error (may not be relevant): %s\n", strerror(errno));
|
||||
dbglog(DBG_CRITICAL, "std::terminate() called\n");
|
||||
dbglog(DBG_CRITICAL, "POSIX error (may not be relevant): %s\n", strerror(errno));
|
||||
stacktrace();
|
||||
dbgio_flush();
|
||||
|
||||
|
||||
7
src/skel/dc/dc.h
Normal file
7
src/skel/dc/dc.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
std::string getBuildId();
|
||||
const char* getSourceId();
|
||||
const char* getCIJobId();
|
||||
const char* getExecutableTag();
|
||||
2
vendor/dca3-kos
vendored
2
vendor/dca3-kos
vendored
Submodule vendor/dca3-kos updated: 0b2de9228b...6e9ab783f3
9
vendor/librw/src/d3d-x/d3d.cpp
vendored
9
vendor/librw/src/d3d-x/d3d.cpp
vendored
@@ -902,10 +902,15 @@ rasterToImage(Raster *raster)
|
||||
depth = 16;
|
||||
conv = conv_ARGB1555_from_RGB555;
|
||||
break;
|
||||
|
||||
default:
|
||||
case Raster::C565:
|
||||
depth = 24;
|
||||
conv = conv_RGB888_from_BGR565;
|
||||
break;
|
||||
case Raster::C4444:
|
||||
depth = 32;
|
||||
conv = conv_RGBA8888_from_BGRA4444;
|
||||
break;
|
||||
default:
|
||||
case Raster::LUM8:
|
||||
RWERROR((ERR_INVRASTER));
|
||||
return nil;
|
||||
|
||||
12
vendor/librw/src/dc/rwdc.cpp
vendored
12
vendor/librw/src/dc/rwdc.cpp
vendored
@@ -3219,6 +3219,15 @@ void pvr_poly_cxt_txr_fast(pvr_poly_hdr_t *hdr, pvr_list_t list,
|
||||
|
||||
|
||||
|
||||
size_t vertexBufferFree() {
|
||||
size_t end = PVR_GET(PVR_TA_VERTBUF_END);
|
||||
size_t pos = PVR_GET(PVR_TA_VERTBUF_POS);
|
||||
|
||||
size_t free = end - pos;
|
||||
|
||||
return free;
|
||||
}
|
||||
|
||||
|
||||
void defaultRenderCB(ObjPipeline *pipe, Atomic *atomic) {
|
||||
rw::Camera *cam = engine->currentCamera;
|
||||
@@ -3400,6 +3409,9 @@ void defaultRenderCB(ObjPipeline *pipe, Atomic *atomic) {
|
||||
|
||||
// clipping performed per meshlet
|
||||
auto renderCB = [contextId, n] {
|
||||
if (vertexBufferFree() < (128 * 1024)) {
|
||||
return;
|
||||
}
|
||||
const atomic_context_t* acp = &atomicContexts[contextId];
|
||||
auto geo = acp->geo;
|
||||
auto mesh = geo->meshHeader->getMeshes() + n;
|
||||
|
||||
28
vendor/librw/src/raster.cpp
vendored
28
vendor/librw/src/raster.cpp
vendored
@@ -313,6 +313,34 @@ conv_ARGB1555_from_RGBA5551(uint8 *out, uint8 *in)
|
||||
out[1] = g>>3 | r<<2 | a<<7;
|
||||
}
|
||||
|
||||
void conv_RGB888_from_BGR565(uint8 *out, uint8 *in)
|
||||
{
|
||||
uint16_t col = in[0] | in[1]<<8;
|
||||
|
||||
uint32 r, g, b;
|
||||
r = (col>>11) & 0x1F;
|
||||
g = (col>>5) & 0x3F;
|
||||
b = (col>>0) & 0x1F;
|
||||
out[0] = r*0xFF/0x1f;
|
||||
out[1] = g*0xFF/0x3f;
|
||||
out[2] = b*0xFF/0x1f;
|
||||
}
|
||||
|
||||
void conv_RGBA8888_from_BGRA4444(uint8 *out, uint8 *in)
|
||||
{
|
||||
uint16_t col = in[0] | in[1]<<8;
|
||||
|
||||
uint32 r, g, b, a;
|
||||
a = (col>>12) & 0xF;
|
||||
r = (col>>8) & 0xF;
|
||||
g = (col>>4) & 0xF;
|
||||
b = (col>>0) & 0xF;
|
||||
out[0] = r*0xFF/0xf;
|
||||
out[1] = g*0xFF/0xf;
|
||||
out[2] = b*0xFF/0xf;
|
||||
out[3] = a*0xFF/0xf;
|
||||
}
|
||||
|
||||
void
|
||||
conv_RGBA8888_from_ARGB1555(uint8 *out, uint8 *in)
|
||||
{
|
||||
|
||||
2
vendor/librw/src/rwobjects.h
vendored
2
vendor/librw/src/rwobjects.h
vendored
@@ -328,6 +328,8 @@ void conv_ARGB1555_from_ARGB1555(uint8 *out, uint8 *in);
|
||||
void conv_ARGB1555_from_RGB555(uint8 *out, uint8 *in);
|
||||
void conv_RGBA5551_from_ARGB1555(uint8 *out, uint8 *in);
|
||||
void conv_ARGB1555_from_RGBA5551(uint8 *out, uint8 *in);
|
||||
void conv_RGB888_from_BGR565(uint8 *out, uint8 *in);
|
||||
void conv_RGBA8888_from_BGRA4444(uint8 *out, uint8 *in);
|
||||
void conv_RGBA8888_from_ARGB1555(uint8 *out, uint8 *in);
|
||||
void conv_ABGR1555_from_ARGB1555(uint8 *out, uint8 *in);
|
||||
inline void conv_8_from_8(uint8 *out, uint8 *in) { *out = *in; }
|
||||
|
||||
Reference in New Issue
Block a user