├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── Scripts
├── all_to_h.sh
└── compile_all.bat
├── Trogdor-Reburninated.sln
├── Trogdor-Reburninated
├── CMakeLists.txt
├── Makefiles
│ ├── Makefile_3ds
│ ├── Makefile_gc
│ ├── Makefile_gc_sdl1
│ ├── Makefile_linux
│ ├── Makefile_pc
│ ├── Makefile_pc_x86
│ ├── Makefile_psp
│ ├── Makefile_switch
│ ├── Makefile_wii
│ ├── Makefile_wii_sdl1
│ ├── Makefile_xbox
│ ├── make_rg35xx.sh
│ ├── make_vita.sh
│ └── make_wii_u.sh
├── Trogdor-Reburninated.rc
├── Trogdor-Reburninated.vcxproj
├── Trogdor-Reburninated.vcxproj.filters
├── data
│ └── demo.gba
├── release-resources
│ ├── Trogdor-Reburninated_rg35xx.sh
│ ├── app_3ds.rsf
│ ├── background_psp.png
│ ├── background_vita.png
│ ├── banner_3ds.bnr
│ ├── banner_3ds.png
│ ├── gamecontrollerdb_rg35xx.txt
│ ├── logo_icon_3ds_24.png
│ ├── logo_icon_3ds_24_alt.png
│ ├── logo_icon_3ds_48.png
│ ├── logo_icon_android_144.png
│ ├── logo_icon_android_144_alt.png
│ ├── logo_icon_android_192.png
│ ├── logo_icon_android_48.png
│ ├── logo_icon_android_48_alt.png
│ ├── logo_icon_android_72.png
│ ├── logo_icon_android_72_alt.png
│ ├── logo_icon_android_86.png
│ ├── logo_icon_android_96.png
│ ├── logo_icon_android_96_alt.png
│ ├── logo_icon_pc_256.ico
│ ├── logo_icon_pc_256.png
│ ├── logo_icon_pc_64.ico
│ ├── logo_icon_pc_64.png
│ ├── logo_icon_psp.png
│ ├── logo_icon_psp_alt.png
│ ├── logo_icon_psp_old.png
│ ├── logo_icon_switch.jpg
│ ├── logo_icon_switch_alt.png
│ ├── logo_icon_vita.png
│ ├── logo_icon_wii.png
│ ├── logo_icon_wiiu.png
│ ├── logo_startup_vita.png
│ ├── meta_wii.xml
│ ├── meta_wiiu.xml
│ ├── resource.rc
│ ├── sound_banner_3ds.wav
│ ├── splash_screen_wiiu_gamepad.png
│ ├── splash_screen_wiiu_tv.png
│ └── template_vita.xml
├── resource.h
└── src
│ ├── OSLibAudio
│ ├── VirtualFile.c
│ ├── VirtualFile.h
│ ├── audio.c
│ ├── audio.h
│ ├── bgm.c
│ ├── bgm.h
│ ├── oslib.h
│ ├── readwav.h
│ ├── sample
│ │ └── main.c
│ └── vfsFile.c
│ ├── SDL_rotozoom.c
│ ├── SDL_rotozoom.h
│ ├── classes.cpp
│ ├── classes.h
│ ├── config.cpp
│ ├── config.h
│ ├── cutscenes.cpp
│ ├── cutscenes.h
│ ├── fonts_h
│ ├── 29_NOKIA_5110_FontSet.cpp
│ ├── 29_NOKIA_5110_FontSet.h
│ ├── 54_serif_v01.cpp
│ ├── 54_serif_v01.h
│ ├── Commodore_Pixelized_v1_2.cpp
│ ├── Commodore_Pixelized_v1_2.h
│ ├── serif_v01.cpp
│ └── serif_v01.h
│ ├── general.cpp
│ ├── general.h
│ ├── goombasend.c
│ ├── goombasend.h
│ ├── graphics_h
│ ├── archer.cpp
│ ├── archer.h
│ ├── arrow.cpp
│ ├── arrow.h
│ ├── arrow_funnyjoke.cpp
│ ├── arrow_funnyjoke.h
│ ├── backgrounds
│ │ ├── bg_1.cpp
│ │ ├── bg_1.h
│ │ ├── bg_2.cpp
│ │ ├── bg_2.h
│ │ ├── bg_3.cpp
│ │ ├── bg_3.h
│ │ ├── bg_4.cpp
│ │ ├── bg_4.h
│ │ ├── bg_treasure_hut.cpp
│ │ └── bg_treasure_hut.h
│ ├── bm_empty.cpp
│ ├── bm_empty.h
│ ├── bm_full.cpp
│ ├── bm_full.h
│ ├── burninate_message_fire.cpp
│ ├── burninate_message_fire.h
│ ├── burninate_text.cpp
│ ├── burninate_text.h
│ ├── cottage.cpp
│ ├── cottage.h
│ ├── cottage_fire.cpp
│ ├── cottage_fire.h
│ ├── death_message.cpp
│ ├── death_message.h
│ ├── end_of_level_flash.cpp
│ ├── end_of_level_flash.h
│ ├── end_of_level_trogdor.cpp
│ ├── end_of_level_trogdor.h
│ ├── game_over_banner.cpp
│ ├── game_over_banner.h
│ ├── game_over_text.cpp
│ ├── game_over_text.h
│ ├── game_over_trogdor.cpp
│ ├── game_over_trogdor.h
│ ├── heart.cpp
│ ├── heart.h
│ ├── jonathan_howe.cpp
│ ├── jonathan_howe.h
│ ├── kerrek.cpp
│ ├── kerrek.h
│ ├── kerrek_smoked.cpp
│ ├── kerrek_smoked.h
│ ├── knight.cpp
│ ├── knight.h
│ ├── knight_funnyjoke.cpp
│ ├── knight_funnyjoke.h
│ ├── level_beaten_smoke.cpp
│ ├── level_beaten_smoke.h
│ ├── level_beaten_trogdor_scaled.cpp
│ ├── level_beaten_trogdor_scaled.h
│ ├── loot.cpp
│ ├── loot.h
│ ├── menu_cursor.cpp
│ ├── menu_cursor.h
│ ├── options_menu.cpp
│ ├── options_menu.h
│ ├── options_menu_240p.cpp
│ ├── options_menu_240p.h
│ ├── overlays
│ │ ├── basement_bottom.cpp
│ │ ├── basement_bottom.h
│ │ ├── basement_bottom_240p.cpp
│ │ ├── basement_bottom_240p.h
│ │ ├── basement_left.cpp
│ │ ├── basement_left.h
│ │ ├── basement_left_240p.cpp
│ │ ├── basement_left_240p.h
│ │ ├── basement_right.cpp
│ │ ├── basement_right.h
│ │ ├── basement_right_240p.cpp
│ │ ├── basement_right_240p.h
│ │ ├── basement_top.cpp
│ │ ├── basement_top.h
│ │ ├── basement_top_240p.cpp
│ │ ├── basement_top_240p.h
│ │ ├── compy_bottom.cpp
│ │ ├── compy_bottom.h
│ │ ├── compy_bottom_240p.cpp
│ │ ├── compy_bottom_240p.h
│ │ ├── compy_left.cpp
│ │ ├── compy_left.h
│ │ ├── compy_left_240p.cpp
│ │ ├── compy_left_240p.h
│ │ ├── compy_right.cpp
│ │ ├── compy_right.h
│ │ ├── compy_right_240p.cpp
│ │ ├── compy_right_240p.h
│ │ ├── compy_top.cpp
│ │ ├── compy_top.h
│ │ ├── compy_top_240p.cpp
│ │ ├── compy_top_240p.h
│ │ ├── strong_badia_bottom.cpp
│ │ ├── strong_badia_bottom.h
│ │ ├── strong_badia_bottom_240p.cpp
│ │ ├── strong_badia_bottom_240p.h
│ │ ├── strong_badia_left.cpp
│ │ ├── strong_badia_left.h
│ │ ├── strong_badia_left_240p.cpp
│ │ ├── strong_badia_left_240p.h
│ │ ├── strong_badia_right.cpp
│ │ ├── strong_badia_right.h
│ │ ├── strong_badia_right_240p.cpp
│ │ ├── strong_badia_right_240p.h
│ │ ├── strong_badia_top.cpp
│ │ ├── strong_badia_top.h
│ │ ├── strong_badia_top_240p.cpp
│ │ └── strong_badia_top_240p.h
│ ├── peasant.cpp
│ ├── peasant.h
│ ├── peasantometer.cpp
│ ├── peasantometer.h
│ ├── strong_bad.cpp
│ ├── strong_bad.h
│ ├── strong_bad_ending.cpp
│ ├── strong_bad_ending.h
│ ├── title_screen.cpp
│ ├── title_screen.h
│ ├── trogdor.cpp
│ ├── trogdor.h
│ ├── trogdor_bighead.cpp
│ ├── trogdor_bighead.h
│ ├── trogdor_dead.cpp
│ ├── trogdor_dead.h
│ ├── trogdor_ending.cpp
│ ├── trogdor_ending.h
│ ├── trogdor_fire.cpp
│ ├── trogdor_fire.h
│ ├── trogdor_flexing.cpp
│ ├── trogdor_flexing.h
│ ├── trogdor_logo.cpp
│ ├── trogdor_logo.h
│ ├── videlectrix_logo_big.cpp
│ └── videlectrix_logo_big.h
│ ├── include.h
│ ├── include_fonts.h
│ ├── include_graphics.h
│ ├── include_sfx.h
│ ├── input.cpp
│ ├── input.h
│ ├── level_data.h
│ ├── main.cpp
│ ├── main.h
│ ├── media_objects_init.cpp
│ ├── media_objects_init.h
│ ├── menu.cpp
│ ├── menu.h
│ ├── on_open_and_close.cpp
│ ├── on_open_and_close.h
│ ├── sfx_h
│ ├── arrow.h
│ ├── burn_hut.cpp
│ ├── burn_hut.h
│ ├── burninate.cpp
│ ├── burninate.h
│ ├── cutscene.cpp
│ ├── cutscene.h
│ ├── death.cpp
│ ├── death.h
│ ├── gameover.cpp
│ ├── gameover.h
│ ├── kick.cpp
│ ├── kick.h
│ ├── sbdooj_short.cpp
│ ├── sbdooj_short.h
│ ├── soundboard_itsover.cpp
│ ├── soundboard_itsover.h
│ ├── speedincreased.cpp
│ ├── speedincreased.h
│ ├── squish.cpp
│ ├── squish.h
│ ├── trog_arrow.cpp
│ ├── trog_arrow.h
│ ├── trog_goldget.cpp
│ ├── trog_goldget.h
│ ├── trog_peasantscream.cpp
│ ├── trog_peasantscream.h
│ ├── trog_sb1.cpp
│ ├── trog_sb1.h
│ ├── trog_sb2.cpp
│ ├── trog_sb2.h
│ ├── trog_sb3.cpp
│ ├── trog_sb3.h
│ ├── trog_sb4.cpp
│ ├── trog_sb4.h
│ ├── trog_sb5.cpp
│ ├── trog_sb5.h
│ ├── trog_sb6.cpp
│ ├── trog_sb6.h
│ ├── trog_sb7.cpp
│ ├── trog_sb7.h
│ ├── trog_sbarch.cpp
│ ├── trog_sbarch.h
│ ├── trog_sbarchend.cpp
│ ├── trog_sbarchend.h
│ ├── trog_sbbest.cpp
│ ├── trog_sbbest.h
│ ├── trog_sbdooj.cpp
│ ├── trog_sbdooj.h
│ ├── trog_sbgameover.cpp
│ ├── trog_sbgameover.h
│ ├── trog_sbkerrek.cpp
│ ├── trog_sbkerrek.h
│ ├── trog_sblevelbeat.cpp
│ ├── trog_sblevelbeat.h
│ ├── trog_sbscore.cpp
│ ├── trog_sbscore.h
│ ├── trog_sbsecret.cpp
│ ├── trog_sbsecret.h
│ ├── trog_sbsquish1.cpp
│ ├── trog_sbsquish1.h
│ ├── trog_sbsquish2.cpp
│ ├── trog_sbsquish2.h
│ ├── trog_sbwin.cpp
│ ├── trog_sbwin.h
│ ├── trog_sbwin2.cpp
│ ├── trog_sbwin2.h
│ ├── trog_sbworst.cpp
│ ├── trog_sbworst.h
│ ├── trog_sfx2.cpp
│ ├── trog_sfx2.h
│ ├── trogador.cpp
│ └── trogador.h
│ ├── sound_logic.cpp
│ ├── sound_logic.h
│ ├── sprite_objects.cpp
│ ├── sprite_objects.h
│ ├── text_objects.cpp
│ ├── text_objects.h
│ ├── window.cpp
│ └── window.h
└── screenshots
├── gameplay_v1.0.png
├── gameplay_v1.0_3ds.png
├── gameplay_v1.0_psp.png
├── gameplay_v1.0_switch.png
├── gameplay_v1.0_vita.png
└── options_v1.0.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Nuget personal access tokens and Credentials
210 | # nuget.config
211 |
212 | # Microsoft Azure Build Output
213 | csx/
214 | *.build.csdef
215 |
216 | # Microsoft Azure Emulator
217 | ecf/
218 | rcf/
219 |
220 | # Windows Store app package directories and files
221 | AppPackages/
222 | BundleArtifacts/
223 | Package.StoreAssociation.xml
224 | _pkginfo.txt
225 | *.appx
226 | *.appxbundle
227 | *.appxupload
228 |
229 | # Visual Studio cache files
230 | # files ending in .cache can be ignored
231 | *.[Cc]ache
232 | # but keep track of directories ending in .cache
233 | !?*.[Cc]ache/
234 |
235 | # Others
236 | ClientBin/
237 | ~$*
238 | *~
239 | *.dbmdl
240 | *.dbproj.schemaview
241 | *.jfm
242 | *.pfx
243 | *.publishsettings
244 | orleans.codegen.cs
245 |
246 | # Including strong name files can present a security risk
247 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
248 | #*.snk
249 |
250 | # Since there are multiple workflows, uncomment next line to ignore bower_components
251 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
252 | #bower_components/
253 |
254 | # RIA/Silverlight projects
255 | Generated_Code/
256 |
257 | # Backup & report files from converting an old project file
258 | # to a newer Visual Studio version. Backup files are not needed,
259 | # because we have git ;-)
260 | _UpgradeReport_Files/
261 | Backup*/
262 | UpgradeLog*.XML
263 | UpgradeLog*.htm
264 | ServiceFabricBackup/
265 | *.rptproj.bak
266 |
267 | # SQL Server files
268 | *.mdf
269 | *.ldf
270 | *.ndf
271 |
272 | # Business Intelligence projects
273 | *.rdl.data
274 | *.bim.layout
275 | *.bim_*.settings
276 | *.rptproj.rsuser
277 | *- [Bb]ackup.rdl
278 | *- [Bb]ackup ([0-9]).rdl
279 | *- [Bb]ackup ([0-9][0-9]).rdl
280 |
281 | # Microsoft Fakes
282 | FakesAssemblies/
283 |
284 | # GhostDoc plugin setting file
285 | *.GhostDoc.xml
286 |
287 | # Node.js Tools for Visual Studio
288 | .ntvs_analysis.dat
289 | node_modules/
290 |
291 | # Visual Studio 6 build log
292 | *.plg
293 |
294 | # Visual Studio 6 workspace options file
295 | *.opt
296 |
297 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
298 | *.vbw
299 |
300 | # Visual Studio LightSwitch build output
301 | **/*.HTMLClient/GeneratedArtifacts
302 | **/*.DesktopClient/GeneratedArtifacts
303 | **/*.DesktopClient/ModelManifest.xml
304 | **/*.Server/GeneratedArtifacts
305 | **/*.Server/ModelManifest.xml
306 | _Pvt_Extensions
307 |
308 | # Paket dependency manager
309 | .paket/paket.exe
310 | paket-files/
311 |
312 | # FAKE - F# Make
313 | .fake/
314 |
315 | # CodeRush personal settings
316 | .cr/personal
317 |
318 | # Python Tools for Visual Studio (PTVS)
319 | __pycache__/
320 | *.pyc
321 |
322 | # Cake - Uncomment if you are using it
323 | # tools/**
324 | # !tools/packages.config
325 |
326 | # Tabs Studio
327 | *.tss
328 |
329 | # Telerik's JustMock configuration file
330 | *.jmconfig
331 |
332 | # BizTalk build output
333 | *.btp.cs
334 | *.btm.cs
335 | *.odx.cs
336 | *.xsd.cs
337 |
338 | # OpenCover UI analysis results
339 | OpenCover/
340 |
341 | # Azure Stream Analytics local run output
342 | ASALocalRun/
343 |
344 | # MSBuild Binary and Structured Log
345 | *.binlog
346 |
347 | # NVidia Nsight GPU debugger configuration file
348 | *.nvuser
349 |
350 | # MFractors (Xamarin productivity tool) working folder
351 | .mfractor/
352 |
353 | # Local History for Visual Studio
354 | .localhistory/
355 |
356 | # BeatPulse healthcheck temp database
357 | healthchecksdb
358 |
359 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
360 | MigrationBackup/
361 |
362 | # Ionide (cross platform F# VS Code tools) working folder
363 | .ionide/
364 |
365 | # Fody - auto-generated XML schema
366 | FodyWeavers.xsd
367 |
368 | # VS Code files for those working on multiple tools
369 | .vscode/*
370 | !.vscode/settings.json
371 | !.vscode/tasks.json
372 | !.vscode/launch.json
373 | !.vscode/extensions.json
374 | *.code-workspace
375 |
376 | # Local History for Visual Studio Code
377 | .history/
378 |
379 | # Windows Installer files from build outputs
380 | *.cab
381 | *.msi
382 | *.msix
383 | *.msm
384 | *.msp
385 |
386 | # JetBrains Rider
387 | .idea/
388 | *.sln.iml
389 |
390 | SDL2/
391 | SDL1/
392 | Release (SDL1)/
393 | build_wii/
394 | build_gc/
395 | build_switch/
396 | build_wii_u/
397 | build_vita/
398 | build_3ds/
399 | build_linux/
400 | build_rg35xx/
401 | music_wav/
402 | sfx_wav/
403 | music_ogg/
404 | sfx_ogg/
405 | sfx_all/
406 | music_psp/
407 | music_all/
408 | save.bin
409 | docs/
410 | *.dol
411 | *.elf
412 | fonts/
413 | graphics/
414 | graphics_unused/
415 | music/
416 | sfx/
417 | Preparation/
418 | dist/
419 | OSLibAudio-master/
420 | Helpful Scripts/
421 | *.dll
422 | Makefile
423 | *.nacp
424 | *.nro
425 | *.o
426 | *.lnk
427 | *.SFO
428 | *.PBP
429 | *.3dsx
430 | *.smdh
431 | *.d
432 | *.iso
433 | *.exe
434 | *.lib
435 | Trogdor-Reburninated.zip
436 | out/
437 | trogdorrb
438 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Mips96
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Trogdor Reburninated
2 | This is an enhanced recreation of the Homestar Runner Flash game, _Trogdor_. It is currently available for PC, Switch, Wii U, Wii, Gamecube, 3DS, Vita, PSP, and [PortMaster](https://portmaster.games/detail.html?name=trogdorrb).
3 |
4 | Homestar Runner is no stranger to [fan ports](https://www.mrphlip.com/ds/pop_tire/) of its [Flash games](https://www.mrphlip.com/ds/secret/), and its impact on Flash media, as well as Internet media as a whole, cannot be overstated. Though the original game is still playable on modern devices through its [HTML5 port](https://old.homestarrunner.com/trogdor-canvas/index.html), this project aims to expand on the original release with new features and multiplatform libraries that allow for porting to a wide variety of systems.
5 |
6 | All screenshots are from PC v1.0 (unless otherwise specified) and can be found in the [screenshots](https://github.com/Mode8fx/Trogdor-Reburninated/tree/main/screenshots) folder.
7 |
8 |
9 |
10 | ## Features
11 | - A faithful recreation of the original Flash game, including intermissions
12 | - Change gameplay settings such as enemy speed and points needed for extra lives, or use one of the new difficulty presets
13 | - Support for any frame rate (or up to 30 FPS on 3DS)
14 | - Save data support, including mid-game progress and high score
15 | - Level select and shuffle
16 | - New cheats, in addition to the original game's Konami code
17 | - Optional soundtrack from the Homestar Runner game *Stinkoman 20X6*
18 | - Screen scaling options for both full-screen and integer scaling/"pixel-perfect"
19 | - Bugs from the original game have been fixed
20 | - Big head mode!
21 |
22 |
23 |
24 | ## FAQ
25 | ### Is this a port? Remake? Remaster?
26 | A bit of everything, but I'm calling it a "recreation".
27 |
28 | It was made by opening the original game in a Flash decompiler and porting its ActionScript code and Flash assets to C++ code by hand. There's no way to automate this as far as I know, so everything was rewritten manually. Additionally, Flash and C++ are two completely separate beasts that handle many things in completely different ways; many things that do not require coding in Flash (like animation frames and screen scaling) need to be recreated as code in C++.
29 |
30 | That being said, almost all art and sound assets are ported directly from the original game, just reorganized into sprite sheets, with modifications only being made when necessary.
31 |
32 | ### Will this be ported to \_\_\_\_\_?
33 | This game was made to be compatible with both SDL 1.2 and SDL2 specifically so it could be ported to many systems. You have my permission to port this wherever you want.
34 |
35 | ### Legal Stuff
36 | This is an unofficial fan project made without any involvement from anyone who contributed to the original game. Trogdor and Homestar Runner are owned by the Brothers Chaps, Mike and Matt Chapman. The original Flash game was programmed by Jonathan Howe.
37 |
--------------------------------------------------------------------------------
/Scripts/all_to_h.sh:
--------------------------------------------------------------------------------
1 | # When you run this script, every file in the current directory will be processed into a .cpp and .h file. These two files can then be imported and embedded into the game as assets.
2 |
3 | for file in *; do
4 | if [ -f "$file" ]; then
5 | filename="${file%.*}" # Extract filename without extension
6 | extension="${file##*.}" # Extract file extension
7 |
8 | # Convert the file to a C++ file using xxd
9 | echo "#include \"${filename}.h\"" > "$filename.cpp"
10 | echo "" >> "$filename.cpp"
11 | xxd -i "$file" >> "$filename.cpp"
12 |
13 | # Set the two initial underscores based on whether the filename starts with a number
14 | if [[ $filename =~ ^[0-9] ]]; then
15 | us="__"
16 | else
17 | us=""
18 | fi
19 |
20 | # Create a header file for the C++ file
21 | echo "extern unsigned char ${us}${filename}_${extension}[];" > "$filename.h"
22 | echo "extern unsigned int ${us}${filename}_${extension}_len;" >> "$filename.h"
23 | fi
24 | done
25 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.8.34511.84
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Trogdor-Reburninated", "Trogdor-Reburninated\Trogdor-Reburninated.vcxproj", "{B369D965-D1F2-460D-ACC7-AF789B2353BE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release (SDL1)|x64 = Release (SDL1)|x64
13 | Release (SDL1)|x86 = Release (SDL1)|x86
14 | Release|x64 = Release|x64
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Debug|x64.ActiveCfg = Debug|x64
19 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Debug|x64.Build.0 = Debug|x64
20 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Debug|x86.ActiveCfg = Debug|Win32
21 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Debug|x86.Build.0 = Debug|Win32
22 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release (SDL1)|x64.ActiveCfg = Release (SDL1)|x64
23 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release (SDL1)|x64.Build.0 = Release (SDL1)|x64
24 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release (SDL1)|x86.ActiveCfg = Release (SDL1)|Win32
25 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release (SDL1)|x86.Build.0 = Release (SDL1)|Win32
26 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release|x64.ActiveCfg = Release|x64
27 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release|x64.Build.0 = Release|x64
28 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release|x86.ActiveCfg = Release|Win32
29 | {B369D965-D1F2-460D-ACC7-AF789B2353BE}.Release|x86.Build.0 = Release|Win32
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | GlobalSection(ExtensibilityGlobals) = postSolution
35 | SolutionGuid = {4DE636B1-4B88-4B90-A51E-10660B0ED0F0}
36 | EndGlobalSection
37 | EndGlobal
38 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_gc:
--------------------------------------------------------------------------------
1 | # When building for GC/Wii, there is currently an issue where a clean build will fail after compiling demo_gba.o. To compile these versions, simply attempt a build via `make`, allow it to fail, then run `make` again.
2 |
3 | #---------------------------------------------------------------------------------
4 | # Clear the implicit built in rules
5 | #---------------------------------------------------------------------------------
6 | .SUFFIXES:
7 | #---------------------------------------------------------------------------------
8 | # prevent deletion of implicit targets
9 | #---------------------------------------------------------------------------------
10 | .SECONDARY:
11 | #---------------------------------------------------------------------------------
12 |
13 | ifeq ($(strip $(DEVKITPPC)),)
14 | $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC")
15 | endif
16 |
17 | include $(DEVKITPPC)/gamecube_rules
18 |
19 | #---------------------------------------------------------------------------------
20 | # TARGET is the name of the output
21 | # BUILD is the directory where object files & intermediate files will be placed
22 | # SOURCES is a list of directories containing source code
23 | # INCLUDES is a list of directories containing extra header files
24 | #---------------------------------------------------------------------------------
25 | TARGET := boot
26 | BUILD := build_gc
27 | SOURCES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
28 | DATA := data
29 | TEXTURES :=
30 | INCLUDES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
31 |
32 | #---------------------------------------------------------------------------------
33 | # options for code generation
34 | #---------------------------------------------------------------------------------
35 |
36 | CFLAGS = `$(PREFIX)pkg-config --cflags sdl2 SDL2_ttf SDL2_gfx SDL2_mixer SDL2_image freetype2` -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DGAMECUBE -DNINTENDO_LAYOUT
37 | CXXFLAGS = $(CFLAGS)
38 |
39 | LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
40 |
41 | #---------------------------------------------------------------------------------
42 | # any extra libraries we wish to link with the project
43 | #---------------------------------------------------------------------------------
44 | LIBS := `$(PREFIX)pkg-config --libs sdl2 SDL2_ttf SDL2_gfx SDL2_mixer SDL2_image freetype2` -lfat -logc -lm -lopus
45 |
46 | #---------------------------------------------------------------------------------
47 | # list of directories containing libraries, this must be the top level containing
48 | # include and lib
49 | #---------------------------------------------------------------------------------
50 | LIBDIRS := "$(DEVKITPRO)/portlibs/ppc" "$(DEVKITPRO)/portlibs/gamecube"
51 |
52 | #---------------------------------------------------------------------------------
53 | # no real need to edit anything past this point unless you need to add additional
54 | # rules for different file extensions
55 | #---------------------------------------------------------------------------------
56 | ifneq ($(BUILD),$(notdir $(CURDIR)))
57 | #---------------------------------------------------------------------------------
58 |
59 | export OUTPUT := $(CURDIR)/$(TARGET)
60 |
61 | export VPATH := $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
62 | $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
63 | $(foreach dir,$(TEXTURES),$(CURDIR)/$(dir))
64 |
65 |
66 | export DEPSDIR := $(CURDIR)/$(BUILD)
67 |
68 | #---------------------------------------------------------------------------------
69 | # automatically build a list of object files for our project
70 | #---------------------------------------------------------------------------------
71 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
72 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
73 | sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
74 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
75 | BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
76 | SCFFILES := $(foreach dir,$(TEXTURES),$(notdir $(wildcard $(dir)/*.scf)))
77 | TPLFILES := $(SCFFILES:.scf=.tpl)
78 |
79 | #---------------------------------------------------------------------------------
80 | # use CXX for linking C++ projects, CC for standard C
81 | #---------------------------------------------------------------------------------
82 | ifeq ($(strip $(CPPFILES)),)
83 | export LD := $(CC)
84 | else
85 | export LD := $(CXX)
86 | endif
87 |
88 | export OFILES_BIN := $(addsuffix .o,$(BINFILES)) $(addsuffix .o,$(TPLFILES))
89 | export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
90 | export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
91 |
92 | export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(addsuffix .h,$(subst .,_,$(TPLFILES)))
93 |
94 | #---------------------------------------------------------------------------------
95 | # build a list of include paths
96 | #---------------------------------------------------------------------------------
97 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
98 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
99 | -I$(CURDIR)/$(BUILD) \
100 | -I$(LIBOGC_INC)
101 |
102 | #---------------------------------------------------------------------------------
103 | # build a list of library paths
104 | #---------------------------------------------------------------------------------
105 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
106 | -L$(LIBOGC_LIB)
107 |
108 | export OUTPUT := $(CURDIR)/$(TARGET)
109 | .PHONY: $(BUILD) clean
110 |
111 | #---------------------------------------------------------------------------------
112 | $(BUILD):
113 | @[ -d $@ ] || mkdir -p $@
114 | @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefiles/Makefile_gc
115 |
116 | #---------------------------------------------------------------------------------
117 | clean:
118 | @echo clean ...
119 | @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
120 | #---------------------------------------------------------------------------------
121 | run:
122 | wiiload $(OUTPUT).dol
123 |
124 | #---------------------------------------------------------------------------------
125 | else
126 |
127 | #---------------------------------------------------------------------------------
128 | # main targets
129 | #---------------------------------------------------------------------------------
130 | $(OUTPUT).dol: $(OUTPUT).elf
131 | $(OUTPUT).elf: $(OFILES)
132 |
133 | $(OFILES_SOURCES) : $(HFILES)
134 |
135 | #---------------------------------------------------------------------------------
136 | # This rule links in binary data with the .gba extension
137 | #---------------------------------------------------------------------------------
138 | %.gba.o : %.gba
139 | #---------------------------------------------------------------------------------
140 | @echo $(notdir $<)
141 | $(bin2o)
142 |
143 |
144 | -include $(DEPSDIR)/*.d
145 |
146 | #---------------------------------------------------------------------------------
147 | endif
148 | #---------------------------------------------------------------------------------
149 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_gc_sdl1:
--------------------------------------------------------------------------------
1 | # When building for GC/Wii, there is currently an issue where a clean build will fail after compiling demo_gba.o. To compile these versions, simply attempt a build via `make`, allow it to fail, then run `make` again.
2 |
3 | #---------------------------------------------------------------------------------
4 | # Clear the implicit built in rules
5 | #---------------------------------------------------------------------------------
6 | .SUFFIXES:
7 | #---------------------------------------------------------------------------------
8 | # prevent deletion of implicit targets
9 | #---------------------------------------------------------------------------------
10 | .SECONDARY:
11 | #---------------------------------------------------------------------------------
12 |
13 | ifeq ($(strip $(DEVKITPPC)),)
14 | $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC")
15 | endif
16 |
17 | include $(DEVKITPPC)/gamecube_rules
18 |
19 | #---------------------------------------------------------------------------------
20 | # TARGET is the name of the output
21 | # BUILD is the directory where object files & intermediate files will be placed
22 | # SOURCES is a list of directories containing source code
23 | # INCLUDES is a list of directories containing extra header files
24 | #---------------------------------------------------------------------------------
25 | TARGET := boot
26 | BUILD := build_gc
27 | SOURCES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
28 | DATA := data
29 | TEXTURES :=
30 | INCLUDES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
31 |
32 | #---------------------------------------------------------------------------------
33 | # options for code generation
34 | #---------------------------------------------------------------------------------
35 |
36 | CFLAGS = `$(PREFIX)pkg-config --cflags sdl SDL_ttf SDL_gfx SDL_mixer SDL_image freetype2` -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DSDL1 -DGAMECUBE -DNINTENDO_LAYOUT
37 | CXXFLAGS = $(CFLAGS)
38 |
39 | LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
40 |
41 | #---------------------------------------------------------------------------------
42 | # any extra libraries we wish to link with the project
43 | #---------------------------------------------------------------------------------
44 | LIBS := `$(PREFIX)pkg-config --libs sdl SDL_ttf SDL_gfx SDL_mixer SDL_image freetype2` -lfat -logc -lm
45 |
46 | #---------------------------------------------------------------------------------
47 | # list of directories containing libraries, this must be the top level containing
48 | # include and lib
49 | #---------------------------------------------------------------------------------
50 | LIBDIRS := "$(DEVKITPRO)/portlibs/ppc" "$(DEVKITPRO)/portlibs/gamecube"
51 |
52 | #---------------------------------------------------------------------------------
53 | # no real need to edit anything past this point unless you need to add additional
54 | # rules for different file extensions
55 | #---------------------------------------------------------------------------------
56 | ifneq ($(BUILD),$(notdir $(CURDIR)))
57 | #---------------------------------------------------------------------------------
58 |
59 | export OUTPUT := $(CURDIR)/$(TARGET)
60 |
61 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
62 | $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
63 | $(foreach dir,$(TEXTURES),$(CURDIR)/$(dir))
64 |
65 |
66 | export DEPSDIR := $(CURDIR)/$(BUILD)
67 |
68 | #---------------------------------------------------------------------------------
69 | # automatically build a list of object files for our project
70 | #---------------------------------------------------------------------------------
71 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
72 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
73 | sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
74 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
75 | BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
76 | SCFFILES := $(foreach dir,$(TEXTURES),$(notdir $(wildcard $(dir)/*.scf)))
77 | TPLFILES := $(SCFFILES:.scf=.tpl)
78 |
79 | #---------------------------------------------------------------------------------
80 | # use CXX for linking C++ projects, CC for standard C
81 | #---------------------------------------------------------------------------------
82 | ifeq ($(strip $(CPPFILES)),)
83 | export LD := $(CC)
84 | else
85 | export LD := $(CXX)
86 | endif
87 |
88 | export OFILES_BIN := $(addsuffix .o,$(BINFILES)) $(addsuffix .o,$(TPLFILES))
89 | export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
90 | export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
91 |
92 | export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(addsuffix .h,$(subst .,_,$(TPLFILES)))
93 |
94 | #---------------------------------------------------------------------------------
95 | # build a list of include paths
96 | #---------------------------------------------------------------------------------
97 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
98 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
99 | -I$(CURDIR)/$(BUILD) \
100 | -I$(LIBOGC_INC)
101 |
102 | #---------------------------------------------------------------------------------
103 | # build a list of library paths
104 | #---------------------------------------------------------------------------------
105 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
106 | -L$(LIBOGC_LIB)
107 |
108 | export OUTPUT := $(CURDIR)/$(TARGET)
109 | .PHONY: $(BUILD) clean
110 |
111 | #---------------------------------------------------------------------------------
112 | $(BUILD):
113 | @[ -d $@ ] || mkdir -p $@
114 | @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefiles/Makefile_gc_sdl1
115 |
116 | #---------------------------------------------------------------------------------
117 | clean:
118 | @echo clean ...
119 | @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
120 | #---------------------------------------------------------------------------------
121 | run:
122 | wiiload $(OUTPUT).dol
123 |
124 | #---------------------------------------------------------------------------------
125 | else
126 |
127 | #---------------------------------------------------------------------------------
128 | # main targets
129 | #---------------------------------------------------------------------------------
130 | $(OUTPUT).dol: $(OUTPUT).elf
131 | $(OUTPUT).elf: $(OFILES)
132 |
133 | $(OFILES_SOURCES) : $(HFILES)
134 |
135 | #---------------------------------------------------------------------------------
136 | # This rule links in binary data with the .gba extension
137 | #---------------------------------------------------------------------------------
138 | %.gba.o : %.gba
139 | #---------------------------------------------------------------------------------
140 | @echo $(notdir $<)
141 | $(bin2o)
142 |
143 |
144 | -include $(DEPSDIR)/*.d
145 |
146 | #---------------------------------------------------------------------------------
147 | endif
148 | #---------------------------------------------------------------------------------
149 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_linux:
--------------------------------------------------------------------------------
1 | OBJ_DIR = ./build_linux
2 | EXE=trogdorrb
3 |
4 | SRC_DIR = src
5 | EXCLUDED = $(SRC_DIR)/goombasend.c $(SRC_DIR)/SDL_rotozoom.c $(SRC_DIR)/fonts_h/54_serif_v01.cpp $(wildcard $(SRC_DIR)/sfx_h/*) $(wildcard $(SRC_DIR)/OSLibAudio/*)
6 | SRCS = $(filter-out $(EXCLUDED), $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/**/*.c) $(wildcard $(SRC_DIR)/graphics_h/**/*.cpp) $(wildcard $(SRC_DIR)/graphics_h/**/*.c))
7 | OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
8 |
9 |
10 | CXX ?= g++
11 | SDLCONFIG ?= sdl2-config
12 | CXXFLAGS ?= -Os -Wall -Wextra -DLINUX -DPC
13 | LDFLAGS ?= -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lstdc++ -lmikmod
14 |
15 | CXXFLAGS += `$(SDLCONFIG) --cflags`
16 | LDFLAGS += `$(SDLCONFIG) --libs`
17 |
18 | .PHONY: all clean
19 |
20 | all: $(EXE)
21 |
22 | $(EXE): $(OBJS)
23 | $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $^ $(LDFLAGS) -o $@
24 |
25 | $(OBJ_DIR)/%.o: %.cpp
26 | mkdir -p $(@D)
27 | $(CXX) $(CXXFLAGS) -c $< -o $@
28 |
29 | $(OBJ_DIR):
30 | mkdir -p $@
31 |
32 | clean:
33 | $(RM) -rv *~ $(OBJS) $(EXE)
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_pc:
--------------------------------------------------------------------------------
1 | OBJ_DIR = ./build_windows
2 | EXE=Trogdor-Reburninated.exe
3 |
4 | SRC_DIR = src
5 | EXCLUDED = $(SRC_DIR)/goombasend.c $(SRC_DIR)/SDL_rotozoom.c $(SRC_DIR)/fonts_h/54_serif_v01.cpp $(wildcard $(SRC_DIR)/sfx_h/*) $(wildcard $(SRC_DIR)/OSLibAudio/*)
6 | SRCS = $(filter-out $(EXCLUDED), $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/**/*.c) $(wildcard $(SRC_DIR)/graphics_h/**/*.cpp) $(wildcard $(SRC_DIR)/graphics_h/**/*.c))
7 | OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
8 | RC = windres
9 | RESOURCES = release-resources/resource.o
10 |
11 |
12 | CXX ?= x86_64-w64-mingw32-g++
13 | CXXFLAGS += $(shell pkg-config --cflags sdl2 SDL2_image SDL2_ttf SDL2_mixer) -DPC
14 | LDFLAGS += $(shell pkg-config --libs sdl2 SDL2_image SDL2_ttf SDL2_mixer)
15 |
16 | .PHONY: all clean
17 |
18 | all: $(RESOURCES) $(EXE)
19 |
20 | $(RESOURCES): release-resources/resource.rc
21 | $(RC) -o $@ $<
22 |
23 | $(EXE): $(OBJS)
24 | $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $^ $(RESOURCES) $(LDFLAGS) -o $@
25 |
26 | $(OBJ_DIR)/%.o: %.cpp
27 | mkdir -p $(@D)
28 | $(CXX) $(CXXFLAGS) -c $< -o $@
29 |
30 | $(OBJ_DIR):
31 | mkdir -p $@
32 |
33 | clean:
34 | $(RM) -rv *~ $(RESOURCES) $(OBJS) $(EXE)
35 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_pc_x86:
--------------------------------------------------------------------------------
1 | OBJ_DIR = ./build_windows_x86
2 | EXE=Trogdor-Reburninated.exe
3 |
4 | SRC_DIR = src
5 | EXCLUDED = $(SRC_DIR)/goombasend.c $(SRC_DIR)/SDL_rotozoom.c $(SRC_DIR)/fonts_h/54_serif_v01.cpp $(wildcard $(SRC_DIR)/sfx_h/*) $(wildcard $(SRC_DIR)/OSLibAudio/*)
6 | SRCS = $(filter-out $(EXCLUDED), $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/**/*.c) $(wildcard $(SRC_DIR)/graphics_h/**/*.cpp) $(wildcard $(SRC_DIR)/graphics_h/**/*.c))
7 | OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
8 | RC = windres
9 | RESOURCES = release-resources/resource.o
10 |
11 |
12 | CXX ?= i686-w64-mingw32-g++
13 | CXXFLAGS += $(shell pkg-config --cflags sdl2 SDL2_image SDL2_ttf SDL2_mixer) -DPC
14 | LDFLAGS += $(shell pkg-config --libs sdl2 SDL2_image SDL2_ttf SDL2_mixer)
15 |
16 | .PHONY: all clean
17 |
18 | all: $(RESOURCES) $(EXE)
19 |
20 | $(RESOURCES): release-resources/resource.rc
21 | $(RC) -o $@ $<
22 |
23 | $(EXE): $(OBJS)
24 | $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $^ $(RESOURCES) $(LDFLAGS) -o $@
25 |
26 | $(OBJ_DIR)/%.o: %.cpp
27 | mkdir -p $(@D)
28 | $(CXX) $(CXXFLAGS) -c $< -o $@
29 |
30 | $(OBJ_DIR):
31 | mkdir -p $@
32 |
33 | clean:
34 | $(RM) -rv *~ $(RESOURCES) $(OBJS) $(EXE)
35 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_psp:
--------------------------------------------------------------------------------
1 | PSP_LARGE_MEMORY=1
2 |
3 | TARGET = trogdor-reburninated
4 | BUILD = build_psp
5 | SRC_DIR = src
6 | EXCLUDED = $(SRC_DIR)/goombasend.c $(SRC_DIR)/SDL_rotozoom.c $(SRC_DIR)/fonts_h/54_serif_v01.cpp $(wildcard $(SRC_DIR)/sfx_h/*)
7 | SRCS = $(filter-out $(EXCLUDED), $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/**/*.c) $(wildcard $(SRC_DIR)/graphics_h/**/*.cpp) $(wildcard $(SRC_DIR)/graphics_h/**/*.c))
8 | OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
9 |
10 | INCDIR =
11 | CFLAGS = -G0 -O2 -DPSP
12 | CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -fpermissive
13 | ASFLAGS = $(CFLAGS)
14 |
15 | LIBDIR =
16 | LDFLAGS =
17 | LIBS = -lSDL2main -lSDL2_image -lpng -ljpeg -lSDL2_mixer -lstdc++ -lSDL2_ttf -lSDL2 -lGL -lGLU -lglut -lfreetype -lz -lbz2 -lpspmp3 -lmad -logg -lvorbisenc -lvorbis -lvorbisfile -lmikmod \
18 | -lpspvfpu -lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgum -lpspgu -lpspaudiolib -lpspaudio \
19 | -lm -lpspvram
20 |
21 | # -lpsphttp -lpspssl -lpspwlan -lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl
22 |
23 | EXTRA_TARGETS = EBOOT.PBP
24 | PSP_EBOOT_TITLE = trogdor-reburninated
25 | PSP_EBOOT_ICON = release-resources/logo_icon_psp.png
26 | PSP_EBOOT_PIC1 = release-resources/background_psp.png
27 | # psp sound file: PSP_EBOOT_SND0=SND0.at3
28 |
29 | PSPSDK=$(shell psp-config --pspsdk-path)
30 | include $(PSPSDK)/lib/build.mak
31 | #PSPSDK=/usr/local/pspdev/psp/sdk
32 |
33 | #PSPSDK=C:/pspsdk/psp/sdk
34 | #include C:/pspsdk/psp/sdk/lib/build.mak
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_switch:
--------------------------------------------------------------------------------
1 | #---------------------------------------------------------------------------------
2 | .SUFFIXES:
3 | #---------------------------------------------------------------------------------
4 |
5 | ifeq ($(strip $(DEVKITPRO)),)
6 | $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=/devkitpro")
7 | endif
8 |
9 | TOPDIR ?= $(CURDIR)
10 | include $(DEVKITPRO)/libnx/switch_rules
11 |
12 | #---------------------------------------------------------------------------------
13 | # TARGET is the name of the output
14 | # BUILD is the directory where object files & intermediate files will be placed
15 | # SOURCES is a list of directories containing source code
16 | # DATA is a list of directories containing data files
17 | # INCLUDES is a list of directories containing header files
18 | # ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
19 | #
20 | # NO_ICON: if set to anything, do not use icon.
21 | # NO_NACP: if set to anything, no .nacp file is generated.
22 | # APP_TITLE is the name of the app stored in the .nacp file (Optional)
23 | # APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
24 | # APP_VERSION is the version of the app stored in the .nacp file (Optional)
25 | # APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
26 | # ICON is the filename of the icon (.jpg), relative to the project folder.
27 | # If not set, it attempts to use one of the following (in this order):
28 | # - .jpg
29 | # - icon.jpg
30 | # - /default_icon.jpg
31 | #
32 | # CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder.
33 | # If not set, it attempts to use one of the following (in this order):
34 | # - .json
35 | # - config.json
36 | # If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead
37 | # of a homebrew executable (.nro). This is intended to be used for sysmodules.
38 | # NACP building is skipped as well.
39 | #---------------------------------------------------------------------------------
40 | TARGET := $(notdir $(CURDIR))
41 | BUILD := build_switch
42 | SOURCES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
43 | DATA :=
44 | INCLUDES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
45 | # ROMFS := romfs
46 |
47 | APP_TITLE := Trogdor: Reburninated
48 | APP_AUTHOR := Mode8fx
49 | APP_VERSION := 2.21
50 | ICON := release-resources/logo_icon_switch.jpg
51 |
52 | #---------------------------------------------------------------------------------
53 | # options for code generation
54 | #---------------------------------------------------------------------------------
55 | ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
56 |
57 | CFLAGS := `$(PREFIX)pkg-config --cflags sdl2 SDL2_mixer SDL2_image` -Wall -O2 -ffunction-sections \
58 | $(ARCH) $(DEFINES)
59 |
60 | CFLAGS += $(INCLUDE) -D__SWITCH__ -DSWITCH -DNINTENDO_LAYOUT
61 |
62 | CXXFLAGS := $(CFLAGS) -fno-rtti -fexceptions
63 |
64 | ASFLAGS := -g $(ARCH)
65 | LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
66 |
67 | LIBS := `$(PREFIX)pkg-config --libs sdl2 SDL2_mixer SDL2_image SDL2_ttf` \
68 | -lnx
69 |
70 | #---------------------------------------------------------------------------------
71 | # list of directories containing libraries, this must be the top level containing
72 | # include and lib
73 | #---------------------------------------------------------------------------------
74 | LIBDIRS := $(PORTLIBS) $(LIBNX)
75 |
76 |
77 | #---------------------------------------------------------------------------------
78 | # no real need to edit anything past this point unless you need to add additional
79 | # rules for different file extensions
80 | #---------------------------------------------------------------------------------
81 | ifneq ($(BUILD),$(notdir $(CURDIR)))
82 | #---------------------------------------------------------------------------------
83 |
84 | export OUTPUT := $(CURDIR)/$(TARGET)
85 | export TOPDIR := $(CURDIR)
86 |
87 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
88 | $(foreach dir,$(DATA),$(CURDIR)/$(dir))
89 |
90 | export DEPSDIR := $(CURDIR)/$(BUILD)
91 |
92 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
93 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
94 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
95 | BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
96 |
97 | #---------------------------------------------------------------------------------
98 | # use CXX for linking C++ and libEGL dependent projects
99 | #---------------------------------------------------------------------------------
100 | export LD := $(CXX)
101 |
102 | export OFILES_BIN := $(addsuffix .o,$(BINFILES))
103 | export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
104 | export OFILES := $(OFILES_BIN) $(OFILES_SRC)
105 | export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
106 |
107 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
108 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
109 | -I$(CURDIR)/$(BUILD)
110 |
111 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
112 |
113 | ifeq ($(strip $(CONFIG_JSON)),)
114 | jsons := $(wildcard *.json)
115 | ifneq (,$(findstring $(TARGET).json,$(jsons)))
116 | export APP_JSON := $(TOPDIR)/$(TARGET).json
117 | else
118 | ifneq (,$(findstring config.json,$(jsons)))
119 | export APP_JSON := $(TOPDIR)/config.json
120 | endif
121 | endif
122 | else
123 | export APP_JSON := $(TOPDIR)/$(CONFIG_JSON)
124 | endif
125 |
126 | ifeq ($(strip $(ICON)),)
127 | icons := $(wildcard *.jpg)
128 | ifneq (,$(findstring $(TARGET).jpg,$(icons)))
129 | export APP_ICON := $(TOPDIR)/$(TARGET).jpg
130 | else
131 | ifneq (,$(findstring icon.jpg,$(icons)))
132 | export APP_ICON := $(TOPDIR)/icon.jpg
133 | endif
134 | endif
135 | else
136 | export APP_ICON := $(TOPDIR)/$(ICON)
137 | endif
138 |
139 | ifeq ($(strip $(NO_ICON)),)
140 | export NROFLAGS += --icon=$(APP_ICON)
141 | endif
142 |
143 | ifeq ($(strip $(NO_NACP)),)
144 | export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp
145 | endif
146 |
147 | ifneq ($(APP_TITLEID),)
148 | export NACPFLAGS += --titleid=$(APP_TITLEID)
149 | endif
150 |
151 | ifneq ($(ROMFS),)
152 | export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
153 | endif
154 |
155 | .PHONY: $(BUILD) clean all
156 |
157 | #---------------------------------------------------------------------------------
158 | all: $(BUILD)
159 |
160 | $(BUILD):
161 | @[ -d $@ ] || mkdir -p $@
162 | @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefiles/Makefile_switch
163 |
164 | #---------------------------------------------------------------------------------
165 | clean:
166 | @echo clean ...
167 | ifeq ($(strip $(APP_JSON)),)
168 | @rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf
169 | else
170 | @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf
171 | endif
172 |
173 |
174 | #---------------------------------------------------------------------------------
175 | else
176 | .PHONY: all
177 |
178 | DEPENDS := $(OFILES:.o=.d)
179 |
180 | #---------------------------------------------------------------------------------
181 | # main targets
182 | #---------------------------------------------------------------------------------
183 | ifeq ($(strip $(APP_JSON)),)
184 |
185 | all : $(OUTPUT).nro
186 |
187 | ifeq ($(strip $(NO_NACP)),)
188 | $(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp
189 | else
190 | $(OUTPUT).nro : $(OUTPUT).elf
191 | endif
192 |
193 | else
194 |
195 | all : $(OUTPUT).nsp
196 |
197 | $(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm
198 |
199 | $(OUTPUT).nso : $(OUTPUT).elf
200 |
201 | endif
202 |
203 | $(OUTPUT).elf : $(OFILES)
204 |
205 | $(OFILES_SRC) : $(HFILES_BIN)
206 |
207 | #---------------------------------------------------------------------------------
208 | # you need a rule like this for each extension you use as binary data
209 | #---------------------------------------------------------------------------------
210 | %.bin.o %_bin.h : %.bin
211 | #---------------------------------------------------------------------------------
212 | @echo $(notdir $<)
213 | @$(bin2o)
214 |
215 | -include $(DEPENDS)
216 |
217 | #---------------------------------------------------------------------------------------
218 | endif
219 | #---------------------------------------------------------------------------------------
220 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_wii:
--------------------------------------------------------------------------------
1 | # When building for GC/Wii, there is currently an issue where a clean build will fail after compiling demo_gba.o. To compile these versions, simply attempt a build via `make`, allow it to fail, then run `make` again.
2 |
3 | #---------------------------------------------------------------------------------
4 | # Clear the implicit built in rules
5 | #---------------------------------------------------------------------------------
6 | .SUFFIXES:
7 | #---------------------------------------------------------------------------------
8 | # prevent deletion of implicit targets
9 | #---------------------------------------------------------------------------------
10 | .SECONDARY:
11 | #---------------------------------------------------------------------------------
12 |
13 | ifeq ($(strip $(DEVKITPPC)),)
14 | $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC")
15 | endif
16 |
17 | include $(DEVKITPPC)/wii_rules
18 |
19 | #---------------------------------------------------------------------------------
20 | # TARGET is the name of the output
21 | # BUILD is the directory where object files & intermediate files will be placed
22 | # SOURCES is a list of directories containing source code
23 | # INCLUDES is a list of directories containing extra header files
24 | #---------------------------------------------------------------------------------
25 | TARGET := boot
26 | BUILD := build_wii
27 | SOURCES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
28 | DATA := data
29 | TEXTURES :=
30 | INCLUDES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
31 |
32 | #---------------------------------------------------------------------------------
33 | # options for code generation
34 | #---------------------------------------------------------------------------------
35 |
36 | CFLAGS = `$(PREFIX)pkg-config --cflags sdl2 SDL2_ttf SDL2_mixer SDL2_image freetype2` -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DWII -DNINTENDO_LAYOUT
37 | CXXFLAGS = $(CFLAGS)
38 |
39 | LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
40 |
41 | #---------------------------------------------------------------------------------
42 | # any extra libraries we wish to link with the project
43 | #---------------------------------------------------------------------------------
44 | LIBS := `$(PREFIX)pkg-config --libs sdl2 SDL2_ttf SDL2_mixer SDL2_image freetype2` -lfat -lwiiuse -lbte -lwiikeyboard -logc -lm -lopus
45 |
46 | #---------------------------------------------------------------------------------
47 | # list of directories containing libraries, this must be the top level containing
48 | # include and lib
49 | #---------------------------------------------------------------------------------
50 | LIBDIRS := "$(DEVKITPRO)/portlibs/ppc" "$(DEVKITPRO)/portlibs/wii"
51 |
52 | #---------------------------------------------------------------------------------
53 | # no real need to edit anything past this point unless you need to add additional
54 | # rules for different file extensions
55 | #---------------------------------------------------------------------------------
56 | ifneq ($(BUILD),$(notdir $(CURDIR)))
57 | #---------------------------------------------------------------------------------
58 |
59 | export OUTPUT := $(CURDIR)/$(TARGET)
60 |
61 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
62 | $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
63 | $(foreach dir,$(TEXTURES),$(CURDIR)/$(dir))
64 |
65 |
66 | export DEPSDIR := $(CURDIR)/$(BUILD)
67 |
68 | #---------------------------------------------------------------------------------
69 | # automatically build a list of object files for our project
70 | #---------------------------------------------------------------------------------
71 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
72 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
73 | sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
74 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
75 | BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
76 | SCFFILES := $(foreach dir,$(TEXTURES),$(notdir $(wildcard $(dir)/*.scf)))
77 | TPLFILES := $(SCFFILES:.scf=.tpl)
78 |
79 | #---------------------------------------------------------------------------------
80 | # use CXX for linking C++ projects, CC for standard C
81 | #---------------------------------------------------------------------------------
82 | ifeq ($(strip $(CPPFILES)),)
83 | export LD := $(CC)
84 | else
85 | export LD := $(CXX)
86 | endif
87 |
88 | export OFILES_BIN := $(addsuffix .o,$(BINFILES)) $(addsuffix .o,$(TPLFILES))
89 | export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
90 | export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
91 |
92 | export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(addsuffix .h,$(subst .,_,$(TPLFILES)))
93 |
94 | #---------------------------------------------------------------------------------
95 | # build a list of include paths
96 | #---------------------------------------------------------------------------------
97 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
98 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
99 | -I$(CURDIR)/$(BUILD) \
100 | -I$(LIBOGC_INC)
101 |
102 | #---------------------------------------------------------------------------------
103 | # build a list of library paths
104 | #---------------------------------------------------------------------------------
105 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
106 | -L$(LIBOGC_LIB)
107 |
108 | export OUTPUT := $(CURDIR)/$(TARGET)
109 | .PHONY: $(BUILD) clean
110 |
111 | #---------------------------------------------------------------------------------
112 | $(BUILD):
113 | @[ -d $@ ] || mkdir -p $@
114 | @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefiles/Makefile_wii
115 |
116 | #---------------------------------------------------------------------------------
117 | clean:
118 | @echo clean ...
119 | @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
120 | #---------------------------------------------------------------------------------
121 | run:
122 | wiiload $(OUTPUT).dol
123 |
124 | #---------------------------------------------------------------------------------
125 | else
126 |
127 | #---------------------------------------------------------------------------------
128 | # main targets
129 | #---------------------------------------------------------------------------------
130 | $(OUTPUT).dol: $(OUTPUT).elf
131 | $(OUTPUT).elf: $(OFILES)
132 |
133 | $(OFILES_SOURCES) : $(HFILES)
134 |
135 | #---------------------------------------------------------------------------------
136 | # This rule links in binary data with the .gba extension
137 | #---------------------------------------------------------------------------------
138 | %.gba.o : %.gba
139 | #---------------------------------------------------------------------------------
140 | @echo $(notdir $<)
141 | $(bin2o)
142 |
143 |
144 | -include $(DEPSDIR)/*.d
145 |
146 | #---------------------------------------------------------------------------------
147 | endif
148 | #---------------------------------------------------------------------------------
149 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_wii_sdl1:
--------------------------------------------------------------------------------
1 | # When building for GC/Wii, there is currently an issue where a clean build will fail after compiling demo_gba.o. To compile these versions, simply attempt a build via `make`, allow it to fail, then run `make` again.
2 |
3 | #---------------------------------------------------------------------------------
4 | # Clear the implicit built in rules
5 | #---------------------------------------------------------------------------------
6 | .SUFFIXES:
7 | #---------------------------------------------------------------------------------
8 | # prevent deletion of implicit targets
9 | #---------------------------------------------------------------------------------
10 | .SECONDARY:
11 | #---------------------------------------------------------------------------------
12 |
13 | ifeq ($(strip $(DEVKITPPC)),)
14 | $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC")
15 | endif
16 |
17 | include $(DEVKITPPC)/wii_rules
18 |
19 | #---------------------------------------------------------------------------------
20 | # TARGET is the name of the output
21 | # BUILD is the directory where object files & intermediate files will be placed
22 | # SOURCES is a list of directories containing source code
23 | # INCLUDES is a list of directories containing extra header files
24 | #---------------------------------------------------------------------------------
25 | TARGET := boot
26 | BUILD := build_wii
27 | SOURCES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
28 | DATA := data
29 | TEXTURES :=
30 | INCLUDES := src src/fonts_h src/graphics_h src/graphics_h/backgrounds src/graphics_h/overlays
31 |
32 | #---------------------------------------------------------------------------------
33 | # options for code generation
34 | #---------------------------------------------------------------------------------
35 |
36 | CFLAGS = `$(PREFIX)pkg-config --cflags sdl SDL_ttf SDL_mixer SDL_image freetype2` -g -O2 -Wall $(MACHDEP) $(INCLUDE) -DSDL1 -DWII -DNINTENDO_LAYOUT
37 | CXXFLAGS = $(CFLAGS)
38 |
39 | LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
40 |
41 | #---------------------------------------------------------------------------------
42 | # any extra libraries we wish to link with the project
43 | #---------------------------------------------------------------------------------
44 | LIBS := `$(PREFIX)pkg-config --libs sdl SDL_ttf SDL_mixer SDL_image freetype2` -lfat -lwiiuse -lbte -lwiikeyboard -logc -lm
45 |
46 | #---------------------------------------------------------------------------------
47 | # list of directories containing libraries, this must be the top level containing
48 | # include and lib
49 | #---------------------------------------------------------------------------------
50 | LIBDIRS := "$(DEVKITPRO)/portlibs/ppc" "$(DEVKITPRO)/portlibs/wii"
51 |
52 | #---------------------------------------------------------------------------------
53 | # no real need to edit anything past this point unless you need to add additional
54 | # rules for different file extensions
55 | #---------------------------------------------------------------------------------
56 | ifneq ($(BUILD),$(notdir $(CURDIR)))
57 | #---------------------------------------------------------------------------------
58 |
59 | export OUTPUT := $(CURDIR)/$(TARGET)
60 |
61 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
62 | $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
63 | $(foreach dir,$(TEXTURES),$(CURDIR)/$(dir))
64 |
65 |
66 | export DEPSDIR := $(CURDIR)/$(BUILD)
67 |
68 | #---------------------------------------------------------------------------------
69 | # automatically build a list of object files for our project
70 | #---------------------------------------------------------------------------------
71 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
72 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
73 | sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
74 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
75 | BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
76 | SCFFILES := $(foreach dir,$(TEXTURES),$(notdir $(wildcard $(dir)/*.scf)))
77 | TPLFILES := $(SCFFILES:.scf=.tpl)
78 |
79 | #---------------------------------------------------------------------------------
80 | # use CXX for linking C++ projects, CC for standard C
81 | #---------------------------------------------------------------------------------
82 | ifeq ($(strip $(CPPFILES)),)
83 | export LD := $(CC)
84 | else
85 | export LD := $(CXX)
86 | endif
87 |
88 | export OFILES_BIN := $(addsuffix .o,$(BINFILES)) $(addsuffix .o,$(TPLFILES))
89 | export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
90 | export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
91 |
92 | export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(addsuffix .h,$(subst .,_,$(TPLFILES)))
93 |
94 | #---------------------------------------------------------------------------------
95 | # build a list of include paths
96 | #---------------------------------------------------------------------------------
97 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
98 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
99 | -I$(CURDIR)/$(BUILD) \
100 | -I$(LIBOGC_INC)
101 |
102 | #---------------------------------------------------------------------------------
103 | # build a list of library paths
104 | #---------------------------------------------------------------------------------
105 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
106 | -L$(LIBOGC_LIB)
107 |
108 | export OUTPUT := $(CURDIR)/$(TARGET)
109 | .PHONY: $(BUILD) clean
110 |
111 | #---------------------------------------------------------------------------------
112 | $(BUILD):
113 | @[ -d $@ ] || mkdir -p $@
114 | @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefiles/Makefile_wii_sdl1
115 |
116 | #---------------------------------------------------------------------------------
117 | clean:
118 | @echo clean ...
119 | @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
120 | #---------------------------------------------------------------------------------
121 | run:
122 | wiiload $(OUTPUT).dol
123 |
124 | #---------------------------------------------------------------------------------
125 | else
126 |
127 | #---------------------------------------------------------------------------------
128 | # main targets
129 | #---------------------------------------------------------------------------------
130 | $(OUTPUT).dol: $(OUTPUT).elf
131 | $(OUTPUT).elf: $(OFILES)
132 |
133 | $(OFILES_SOURCES) : $(HFILES)
134 |
135 | #---------------------------------------------------------------------------------
136 | # This rule links in binary data with the .gba extension
137 | #---------------------------------------------------------------------------------
138 | %.gba.o : %.gba
139 | #---------------------------------------------------------------------------------
140 | @echo $(notdir $<)
141 | $(bin2o)
142 |
143 |
144 | -include $(DEPSDIR)/*.d
145 |
146 | #---------------------------------------------------------------------------------
147 | endif
148 | #---------------------------------------------------------------------------------
149 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/Makefile_xbox:
--------------------------------------------------------------------------------
1 | XBE_TITLE = Trogdor\ Reburninated
2 | GEN_XISO = $(XBE_TITLE).iso
3 | SRC_DIR = src
4 | EXCLUDED = $(SRC_DIR)/goombasend.c $(SRC_DIR)/SDL_rotozoom.c $(SRC_DIR)/fonts_h/54_serif_v01.cpp $(wildcard $(SRC_DIR)/sfx_h/*) $(wildcard $(SRC_DIR)/OSLibAudio/*)
5 | SRCS = $(filter-out $(EXCLUDED), $(wildcard $(SRC_DIR)/*.cpp) $(wildcard $(SRC_DIR)/*.c) $(wildcard $(SRC_DIR)/**/*.cpp) $(wildcard $(SRC_DIR)/**/*.c) $(wildcard $(SRC_DIR)/graphics_h/**/*.cpp) $(wildcard $(SRC_DIR)/graphics_h/**/*.c))
6 |
7 | NXDK_DIR ?= ~/nxdk
8 | NXDK_SDL = y
9 |
10 | NXDK_CXX = y
11 |
12 | CFLAGS += -O2 -DXBOX
13 |
14 | include $(NXDK_DIR)/Makefile
15 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/make_rg35xx.sh:
--------------------------------------------------------------------------------
1 | export RGTOOLCHAIN=/usr/local/rg35xx/arm-buildroot-linux-gnueabihf_sdk-buildroot
2 | rm -r build_rg35xx
3 | mkdir build_rg35xx
4 | cd build_rg35xx
5 | cmake ../ -DCMAKE_TOOLCHAIN_FILE=$RGTOOLCHAIN/share/buildroot/toolchainfile.cmake -DRG35XX=ON -DLINUX=ON -DPRELOAD_SOUNDS=ON
6 | make
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/make_vita.sh:
--------------------------------------------------------------------------------
1 | export VITASDK=/usr/local/vitasdk
2 | rm -r build_vita
3 | mkdir build_vita
4 | cd build_vita
5 | cmake ../ -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake -DVITA=ON -DPRELOAD_SOUNDS=ON
6 | make
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Makefiles/make_wii_u.sh:
--------------------------------------------------------------------------------
1 | export DEVKITPRO=/opt/devkitpro
2 | rm -r build_wii_u
3 | mkdir build_wii_u
4 | cd build_wii_u
5 | cmake ../ -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/wut/share/wut.toolchain.cmake -DWIIU=ON -DNINTENDO_LAYOUT=ON -DPRELOAD_SOUNDS=ON
6 | make
--------------------------------------------------------------------------------
/Trogdor-Reburninated/Trogdor-Reburninated.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "winres.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (United States) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 | #pragma code_page(1252)
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_ICON1 ICON "release-resources\\logo_icon_pc_256.ico"
56 |
57 | #endif // English (United States) resources
58 | /////////////////////////////////////////////////////////////////////////////
59 |
60 |
61 |
62 | #ifndef APSTUDIO_INVOKED
63 | /////////////////////////////////////////////////////////////////////////////
64 | //
65 | // Generated from the TEXTINCLUDE 3 resource.
66 | //
67 |
68 |
69 | /////////////////////////////////////////////////////////////////////////////
70 | #endif // not APSTUDIO_INVOKED
71 |
72 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/data/demo.gba:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/data/demo.gba
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/Trogdor-Reburninated_rg35xx.sh:
--------------------------------------------------------------------------------
1 | export PORTS_FOLDER=$(realpath $(dirname $0))
2 | export GAMEDIR="${PORTS_FOLDER}/Trogdor-Reburninated"
3 | export HOME="${GAMEDIR}"
4 | export SDL_ASSERT=always_ignore
5 | export SDL_GAMECONTROLLERCONFIG=$(grep "Deeplay" "${GAMEDIR}/gamecontrollerdb.txt")
6 |
7 | chmod +x $GAMEDIR/trogdorrb
8 |
9 | cd $GAMEDIR
10 | ./trogdorrb
11 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/app_3ds.rsf:
--------------------------------------------------------------------------------
1 | BasicInfo:
2 | Title : Trogdor - Reburninated
3 | ProductCode : CTR-P-CTAP # default
4 | Logo : Homebrew
5 |
6 | TitleInfo:
7 | Category : Application
8 | UniqueId : 0xCB52C # random
9 |
10 | Option:
11 | UseOnSD : true # true if App is to be installed to SD
12 | FreeProductCode : true # Removes limitations on ProductCode
13 | MediaFootPadding : false # If true CCI files are created with padding
14 | EnableCrypt : false # Enables encryption for NCCH and CIA
15 | EnableCompress : true # Compresses where applicable (currently only exefs:/.code)
16 |
17 | AccessControlInfo:
18 | CoreVersion : 2
19 |
20 | # Exheader Format Version
21 | DescVersion : 2
22 |
23 | # Minimum Required Kernel Version (below is for 4.5.0)
24 | ReleaseKernelMajor : "02"
25 | ReleaseKernelMinor : "46"
26 |
27 | # ExtData
28 | UseExtSaveData : false # enables ExtData
29 | #ExtSaveDataId : 0x300 # only set this when the ID is different to the UniqueId
30 |
31 | # FS:USER Archive Access Permissions
32 | # Uncomment as required
33 | FileSystemAccess:
34 | - CategorySystemApplication
35 | - CategoryHardwareCheck
36 | - CategoryFileSystemTool
37 | - Debug
38 | - TwlCardBackup
39 | - TwlNandData
40 | - Boss
41 | - DirectSdmc
42 | - Core
43 | - CtrNandRo
44 | - CtrNandRw
45 | - CtrNandRoWrite
46 | - CategorySystemSettings
47 | - CardBoard
48 | - ExportImportIvs
49 | - DirectSdmcWrite
50 | - SwitchCleanup
51 | - SaveDataMove
52 | - Shop
53 | - Shell
54 | - CategoryHomeMenu
55 | - SeedDB
56 | IoAccessControl:
57 | - FsMountNand
58 | - FsMountNandRoWrite
59 | - FsMountTwln
60 | - FsMountWnand
61 | - FsMountCardSpi
62 | - UseSdif3
63 | - CreateSeed
64 | - UseCardSpi
65 |
66 | # Process Settings
67 | MemoryType : Application # Application/System/Base
68 | SystemMode : 64MB # 64MB(Default)/96MB/80MB/72MB/32MB
69 | IdealProcessor : 0
70 | AffinityMask : 1
71 | Priority : 16
72 | MaxCpu : 0x9E # Default
73 | HandleTableSize : 0x200
74 | DisableDebug : false
75 | EnableForceDebug : false
76 | CanWriteSharedPage : true
77 | CanUsePrivilegedPriority : false
78 | CanUseNonAlphabetAndNumber : true
79 | PermitMainFunctionArgument : true
80 | CanShareDeviceMemory : true
81 | RunnableOnSleep : false
82 | SpecialMemoryArrange : true
83 |
84 | # New3DS Exclusive Process Settings
85 | SystemModeExt : Legacy # Legacy(Default)/124MB/178MB Legacy:Use Old3DS SystemMode
86 | CpuSpeed : 268MHz # 268MHz(Default)/804MHz
87 | EnableL2Cache : false # false(default)/true
88 | CanAccessCore2 : false
89 |
90 | # Virtual Address Mappings
91 | IORegisterMapping:
92 | - 1ff00000-1ff7ffff # DSP memory
93 | MemoryMapping:
94 | - 1f000000-1f5fffff:r # VRAM
95 |
96 | # Accessible SVCs, :
97 | SystemCallAccess:
98 | ControlMemory: 1
99 | QueryMemory: 2
100 | ExitProcess: 3
101 | GetProcessAffinityMask: 4
102 | SetProcessAffinityMask: 5
103 | GetProcessIdealProcessor: 6
104 | SetProcessIdealProcessor: 7
105 | CreateThread: 8
106 | ExitThread: 9
107 | SleepThread: 10
108 | GetThreadPriority: 11
109 | SetThreadPriority: 12
110 | GetThreadAffinityMask: 13
111 | SetThreadAffinityMask: 14
112 | GetThreadIdealProcessor: 15
113 | SetThreadIdealProcessor: 16
114 | GetCurrentProcessorNumber: 17
115 | Run: 18
116 | CreateMutex: 19
117 | ReleaseMutex: 20
118 | CreateSemaphore: 21
119 | ReleaseSemaphore: 22
120 | CreateEvent: 23
121 | SignalEvent: 24
122 | ClearEvent: 25
123 | CreateTimer: 26
124 | SetTimer: 27
125 | CancelTimer: 28
126 | ClearTimer: 29
127 | CreateMemoryBlock: 30
128 | MapMemoryBlock: 31
129 | UnmapMemoryBlock: 32
130 | CreateAddressArbiter: 33
131 | ArbitrateAddress: 34
132 | CloseHandle: 35
133 | WaitSynchronization1: 36
134 | WaitSynchronizationN: 37
135 | SignalAndWait: 38
136 | DuplicateHandle: 39
137 | GetSystemTick: 40
138 | GetHandleInfo: 41
139 | GetSystemInfo: 42
140 | GetProcessInfo: 43
141 | GetThreadInfo: 44
142 | ConnectToPort: 45
143 | SendSyncRequest1: 46
144 | SendSyncRequest2: 47
145 | SendSyncRequest3: 48
146 | SendSyncRequest4: 49
147 | SendSyncRequest: 50
148 | OpenProcess: 51
149 | OpenThread: 52
150 | GetProcessId: 53
151 | GetProcessIdOfThread: 54
152 | GetThreadId: 55
153 | GetResourceLimit: 56
154 | GetResourceLimitLimitValues: 57
155 | GetResourceLimitCurrentValues: 58
156 | GetThreadContext: 59
157 | Break: 60
158 | OutputDebugString: 61
159 | ControlPerformanceCounter: 62
160 | CreatePort: 71
161 | CreateSessionToPort: 72
162 | CreateSession: 73
163 | AcceptSession: 74
164 | ReplyAndReceive1: 75
165 | ReplyAndReceive2: 76
166 | ReplyAndReceive3: 77
167 | ReplyAndReceive4: 78
168 | ReplyAndReceive: 79
169 | BindInterrupt: 80
170 | UnbindInterrupt: 81
171 | InvalidateProcessDataCache: 82
172 | StoreProcessDataCache: 83
173 | FlushProcessDataCache: 84
174 | StartInterProcessDma: 85
175 | StopDma: 86
176 | GetDmaState: 87
177 | RestartDma: 88
178 | DebugActiveProcess: 96
179 | BreakDebugProcess: 97
180 | TerminateDebugProcess: 98
181 | GetProcessDebugEvent: 99
182 | ContinueDebugEvent: 100
183 | GetProcessList: 101
184 | GetThreadList: 102
185 | GetDebugThreadContext: 103
186 | SetDebugThreadContext: 104
187 | QueryDebugProcessMemory: 105
188 | ReadProcessMemory: 106
189 | WriteProcessMemory: 107
190 | SetHardwareBreakPoint: 108
191 | GetDebugThreadParam: 109
192 | ControlProcessMemory: 112
193 | MapProcessMemory: 113
194 | UnmapProcessMemory: 114
195 | CreateCodeSet: 115
196 | CreateProcess: 117
197 | TerminateProcess: 118
198 | SetProcessResourceLimits: 119
199 | CreateResourceLimit: 120
200 | SetResourceLimitValues: 121
201 | AddCodeSegment: 122
202 | Backdoor: 123
203 | KernelSetState: 124
204 | QueryProcessMemory: 125
205 |
206 | # Service List
207 | # Maximum 34 services (32 if firmware is prior to 9.6.0)
208 | ServiceAccessControl:
209 | - APT:U
210 | - ac:u
211 | - am:net
212 | - boss:U
213 | - cam:u
214 | - cecd:u
215 | - cfg:nor
216 | - cfg:u
217 | - csnd:SND
218 | - dsp::DSP
219 | - frd:u
220 | - fs:USER
221 | - gsp::Gpu
222 | - gsp::Lcd
223 | - hid:USER
224 | - http:C
225 | - ir:rst
226 | - ir:u
227 | - ir:USER
228 | - mic:u
229 | - ndm:u
230 | - news:s
231 | - nwm::EXT
232 | - nwm::UDS
233 | - ptm:sysm
234 | - ptm:u
235 | - pxi:dev
236 | - soc:U
237 | - ssl:C
238 | - y2r:u
239 |
240 |
241 | SystemControlInfo:
242 | SaveDataSize: 0KB # Change if the app uses savedata
243 | RemasterVersion: 2
244 | StackSize: 0x40000
245 |
246 | # Modules that run services listed above should be included below
247 | # Maximum 48 dependencies
248 | # :
249 | Dependency:
250 | ac: 0x0004013000002402
251 | #act: 0x0004013000003802
252 | am: 0x0004013000001502
253 | boss: 0x0004013000003402
254 | camera: 0x0004013000001602
255 | cecd: 0x0004013000002602
256 | cfg: 0x0004013000001702
257 | codec: 0x0004013000001802
258 | csnd: 0x0004013000002702
259 | dlp: 0x0004013000002802
260 | dsp: 0x0004013000001a02
261 | friends: 0x0004013000003202
262 | gpio: 0x0004013000001b02
263 | gsp: 0x0004013000001c02
264 | hid: 0x0004013000001d02
265 | http: 0x0004013000002902
266 | i2c: 0x0004013000001e02
267 | ir: 0x0004013000003302
268 | mcu: 0x0004013000001f02
269 | mic: 0x0004013000002002
270 | ndm: 0x0004013000002b02
271 | news: 0x0004013000003502
272 | #nfc: 0x0004013000004002
273 | nim: 0x0004013000002c02
274 | nwm: 0x0004013000002d02
275 | pdn: 0x0004013000002102
276 | ps: 0x0004013000003102
277 | ptm: 0x0004013000002202
278 | #qtm: 0x0004013020004202
279 | ro: 0x0004013000003702
280 | socket: 0x0004013000002e02
281 | spi: 0x0004013000002302
282 | ssl: 0x0004013000002f02
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/background_psp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/background_psp.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/background_vita.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/background_vita.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/banner_3ds.bnr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/banner_3ds.bnr
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/banner_3ds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/banner_3ds.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_3ds_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_3ds_24.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_3ds_24_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_3ds_24_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_3ds_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_3ds_48.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_144.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_144_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_144_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_192.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_48.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_48_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_48_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_72.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_72_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_72_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_86.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_86.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_96.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_android_96_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_android_96_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_pc_256.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_pc_256.ico
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_pc_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_pc_256.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_pc_64.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_pc_64.ico
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_pc_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_pc_64.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_psp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_psp.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_psp_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_psp_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_psp_old.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_psp_old.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_switch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_switch.jpg
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_switch_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_switch_alt.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_vita.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_vita.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_wii.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_wii.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_icon_wiiu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_icon_wiiu.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/logo_startup_vita.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/logo_startup_vita.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/meta_wii.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Trogdor: Reburninated
4 | Mode8fx
5 | 2.21
6 | 202408122200
7 | Burninate the countryside!
8 | A recreation of the Homestar Runner Flash game "Trogdor" with new features, made with SDL2. In-game button prompts are for Wii Remote, but a Gamecube controller also works.
9 |
10 | https://github.com/Mode8fx/Trogdor-Reburninated
11 |
12 | Trogdor is originally created and owned by the Brothers Chaps, and programmed by Jonathan Howe; credits are listed in-game.
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/meta_wiiu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Trogdor: Reburninated
4 | Mode8fx
5 | 2.21
6 | 20240812220000
7 | Burninate the countryside!
8 | A recreation of the Homestar Runner Flash game "Trogdor" with new features, made with SDL2.
9 |
10 | https://github.com/Mode8fx/Trogdor-Reburninated
11 |
12 | Trogdor is originally created and owned by the Brothers Chaps, and programmed by Jonathan Howe; credits are listed in-game.
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/resource.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON "logo_icon_pc_256.ico"
2 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/sound_banner_3ds.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/sound_banner_3ds.wav
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/splash_screen_wiiu_gamepad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/splash_screen_wiiu_gamepad.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/splash_screen_wiiu_tv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/release-resources/splash_screen_wiiu_tv.png
--------------------------------------------------------------------------------
/Trogdor-Reburninated/release-resources/template_vita.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | bg.png
6 |
7 |
8 |
9 | startup.png
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Trogdor-Reburninated.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/VirtualFile.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/src/OSLibAudio/VirtualFile.c
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/VirtualFile.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/src/OSLibAudio/VirtualFile.h
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/bgm.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/src/OSLibAudio/bgm.c
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/bgm.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/Trogdor-Reburninated/src/OSLibAudio/bgm.h
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/oslib.h:
--------------------------------------------------------------------------------
1 | /*! \file oslib.h
2 | \brief Main Oldschool Library file.
3 | */
4 |
5 | /** OSLib version */
6 |
7 | // This is a modified version of OSLib MOD that only has WAV and BGM audio
8 |
9 | #define OSL_VERSION "MOD 1.1.2"
10 |
11 | #ifndef _OSLIB_H_
12 | #define _OSLIB_H_
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #define oslFatalError printf
31 | #define oslHandleLoadNoFailError printf
32 |
33 | #define oslAbs(x) (((x)<0)?(-(x)):(x))
34 | #define oslMin(x, y) (((x)<(y))?(x):(y))
35 | #define oslMax(x, y) (((x)>(y))?(x):(y))
36 | #define oslMinMax(x, min, max) ((x) < (max) ? ((x) > (min) ? (x) : (min)) : (max))
37 |
38 | #include "VirtualFile.h"
39 | #include "audio.h"
40 | #include "bgm.h"
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/readwav.h:
--------------------------------------------------------------------------------
1 | //NOT A HEADER FILE!
2 | #ifndef READWAV_H
3 | #define READWAV_H
4 |
5 | #include
6 | #include
7 |
8 | /* WAVE READING CODE ***********************************************/
9 |
10 | typedef struct WAVE_FMT
11 | {
12 | unsigned short int format;
13 | unsigned short int channels;
14 | unsigned int sample_rate;
15 | unsigned int bytes_sec;
16 | unsigned short int frame_size;
17 | unsigned short int bits_sample;
18 | } WAVE_FMT;
19 |
20 |
21 | typedef struct WAVE_SRC
22 | {
23 | WAVE_FMT fmt;
24 | VIRTUAL_FILE *fp;
25 | size_t chunk_left, chunk_base;
26 | int cur_chn;
27 | unsigned char *data, *database;
28 | int basefp;
29 | unsigned char *streambuffer;
30 | int stream;
31 | } WAVE_SRC;
32 |
33 | int open_wave_src(WAVE_SRC *wav, const char *filename);
34 | int get_next_wav_sample(WAVE_SRC *wav);
35 | void close_wave_src(WAVE_SRC *wav);
36 |
37 | int osl_fgetc(VIRTUAL_FILE *f) {
38 | char c;
39 | VirtualFileRead(&c, 1, 1, f);
40 | return c;
41 | }
42 |
43 | unsigned int fgetu16(VIRTUAL_FILE *fp)
44 | {
45 | unsigned char a = osl_fgetc(fp);
46 | unsigned char b = osl_fgetc(fp);
47 |
48 | return a | (b << 8);
49 | }
50 |
51 | unsigned long fgetu32(VIRTUAL_FILE *fp)
52 | {
53 | unsigned char a = osl_fgetc(fp);
54 | unsigned char b = osl_fgetc(fp);
55 | unsigned char c = osl_fgetc(fp);
56 | unsigned char d = osl_fgetc(fp);
57 |
58 | return a | (b << 8) | (c << 16) | (d << 24);
59 | }
60 |
61 |
62 | /* get_fmt() ***************************
63 | Reads a format chunk from a wav file.
64 | Returns 0 for success or negative for failure.
65 | */
66 | int get_fmt(WAVE_FMT *format, VIRTUAL_FILE *fp)
67 | {
68 | unsigned int fmt_len = fgetu32(fp);
69 |
70 | if(fmt_len < 16)
71 | return -3;
72 |
73 | format->format = fgetu16(fp);
74 | format->channels = fgetu16(fp);
75 | format->sample_rate = fgetu32(fp);
76 | format->bytes_sec = fgetu32(fp);
77 | format->frame_size = fgetu16(fp);
78 | format->bits_sample = fgetu16(fp);
79 |
80 | VirtualFileSeek(fp, fmt_len - 16, SEEK_CUR);
81 | return 0;
82 | }
83 |
84 |
85 | void close_wave_src(WAVE_SRC *wav)
86 | {
87 | VirtualFileClose(wav->fp);
88 | wav->fp = 0;
89 | }
90 |
91 | /* open_wave_src() *********************
92 | Opens a RIFF WAVE (.wav) file for reading through
93 | get_next_wav_sample(). Returns the following error codes:
94 | -1 could not open; details are in errno
95 | -2 bad signature
96 | -3 bad format metadata or no format metadata before sample data
97 | -4 no sample data
98 | */
99 | int open_wave_src(WAVE_SRC *wav, const char *filename)
100 | {
101 | char buf[256];
102 | int got_fmt = 0;
103 |
104 | /* open the file */
105 | wav->fp = VirtualFileOpen((void*)filename, 0, VF_AUTO, VF_O_READ);
106 | if(wav->fp < 0)
107 | return -1;
108 |
109 | /* read the header */
110 | if(VirtualFileRead(buf, 12, 1, wav->fp) < 12)
111 | {
112 | close_wave_src(wav);
113 | return -2;
114 | }
115 |
116 | /* check for RIFF/WAVE signature */
117 | if(memcmp("RIFF", buf, 4) || memcmp("WAVE", buf + 8, 4))
118 | {
119 | close_wave_src(wav);
120 | return -2;
121 | }
122 |
123 | /* parse chunks */
124 | while(VirtualFileRead(buf, 4, 1, wav->fp))
125 | {
126 | if(!memcmp("fmt ", buf, 4))
127 | {
128 | int errc = get_fmt(&(wav->fmt), wav->fp);
129 | if(errc < 0)
130 | {
131 | close_wave_src(wav);
132 | return -3;
133 | }
134 | got_fmt = 1;
135 | }
136 | else if(!memcmp("data", buf, 4))
137 | {
138 | if(!got_fmt)
139 | {
140 | close_wave_src(wav);
141 | return -3;
142 | }
143 |
144 | wav->chunk_left = fgetu32(wav->fp);
145 | if(wav->chunk_left == 0)
146 | {
147 | close_wave_src(wav);
148 | return -4;
149 | }
150 |
151 | /* at this point, we have success */
152 | wav->cur_chn = 0;
153 | return 0;
154 | }
155 | else /* skip unrecognized chunk type */
156 | {
157 | unsigned long chunk_size = fgetu32(wav->fp);
158 |
159 | VirtualFileSeek(wav->fp, chunk_size, SEEK_CUR);
160 | }
161 | }
162 | /* we've come to the end of all the chunks and found no data */
163 | close_wave_src(wav);
164 | return -4;
165 | }
166 |
167 |
168 | /* get_next_wav_sample() ***************
169 | Get the next sample from a wav file.
170 | */
171 | int get_next_wav_sample(WAVE_SRC *wav)
172 | {
173 | int cur_sample = 0;
174 | int i;
175 |
176 | if(wav->chunk_left == 0)
177 | return 0;
178 |
179 | for(i = 0; i < wav->fmt.bits_sample && wav->chunk_left > 0; i += 8)
180 | {
181 | int c;
182 | if (wav->stream)
183 | c=*wav->streambuffer++;
184 | else
185 | c=*wav->data++;
186 |
187 | cur_sample >>= 8;
188 | cur_sample |= (c & 0xff) << 8;
189 | wav->chunk_left--;
190 | }
191 |
192 | if(wav->fmt.bits_sample <= 8) /* handle unsigned samples */
193 | cur_sample -= 32768;
194 | cur_sample = (signed short)cur_sample; /* sign-extend */
195 |
196 | if(++wav->cur_chn >= wav->fmt.channels)
197 | wav->cur_chn = 0;
198 |
199 | return cur_sample;
200 | }
201 |
202 | #endif
203 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/sample/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | * PSP Software Development Kit - https://github.com/pspdev
3 | * -----------------------------------------------------------------------
4 | * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 | *
6 | * main.c - Basic Input demo -- reads from control pad and indicates button
7 | * presses.
8 | *
9 | * Copyright (c) 2005 Marcus R. Brown
10 | * Copyright (c) 2005 James Forshaw
11 | * Copyright (c) 2005 John Kelley
12 | * Copyright (c) 2005 Donour Sizemore
13 | *
14 | */
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include
23 |
24 | /* Define the module info section */
25 | PSP_MODULE_INFO("OSLIBAUDIOTEST", 0, 1, 1);
26 |
27 | /* Define the main thread's attribute value (optional) */
28 | PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
29 |
30 | /* Define printf, just to make typing easier */
31 | #define printf pspDebugScreenPrintf
32 |
33 | void dump_threadstatus(void);
34 |
35 | int done = 0;
36 |
37 | /* Exit callback */
38 | int exit_callback(int arg1, int arg2, void *common)
39 | {
40 | done = 1;
41 | return 0;
42 | }
43 |
44 | /* Callback thread */
45 | int CallbackThread(SceSize args, void *argp)
46 | {
47 | int cbid;
48 |
49 | cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
50 | sceKernelRegisterExitCallback(cbid);
51 | sceKernelSleepThreadCB();
52 |
53 | return 0;
54 | }
55 |
56 | /* Sets up the callback thread and returns its thread id */
57 | int SetupCallbacks(void)
58 | {
59 | int thid = 0;
60 |
61 | thid = sceKernelCreateThread("update_thread", CallbackThread,
62 | 0x11, 0xFA0, 0, 0);
63 | if(thid >= 0)
64 | {
65 | sceKernelStartThread(thid, 0, 0);
66 | }
67 |
68 | return thid;
69 | }
70 |
71 | int main(void)
72 | {
73 | SceCtrlData pad;
74 |
75 | pspDebugScreenInit();
76 | SetupCallbacks();
77 |
78 | oslInitAudio();
79 |
80 | // Load BGM, streaming
81 | OSL_SOUND* bgm = oslLoadSoundFile("song.bgm", 1);
82 |
83 | // Load sound, no streaming
84 | OSL_SOUND* sound = oslLoadSoundFile("sound.wav", 0);
85 |
86 | // Play BGM on channel 0
87 | oslPlaySound(bgm, 0);
88 |
89 | sceCtrlSetSamplingCycle(0);
90 | sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
91 |
92 | bool pressedX = false;
93 | while(!done){
94 | pspDebugScreenSetXY(0, 2);
95 |
96 | sceCtrlReadBufferPositive(&pad, 1);
97 |
98 | printf("Cross: play sound effect\n");
99 | printf("Triangle: Resume music\n");
100 | printf("Circle: Pause music\n");
101 |
102 | if (pad.Buttons & PSP_CTRL_CROSS)
103 | {
104 | if (!pressedX) oslPlaySound(sound, 1);
105 | pressedX = true;
106 | }
107 | else
108 | {
109 | pressedX = false;
110 | }
111 |
112 | if (pad.Buttons & PSP_CTRL_SQUARE)
113 | {
114 | oslPlaySound(sound, 2);
115 | }
116 |
117 | if (pad.Buttons & PSP_CTRL_CIRCLE)
118 | {
119 | oslPauseSound(bgm, 1);
120 | }
121 |
122 | if (pad.Buttons & PSP_CTRL_TRIANGLE)
123 | {
124 | oslPauseSound(bgm, 0);
125 | }
126 |
127 | }
128 |
129 | oslDeleteSound(bgm);
130 | oslDeleteSound(sound);
131 |
132 | oslDeinitAudio();
133 |
134 | sceKernelExitGame();
135 | return 0;
136 | }
137 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/OSLibAudio/vfsFile.c:
--------------------------------------------------------------------------------
1 | #include "oslib.h"
2 |
3 | /*
4 | SOURCE VFS: file
5 | */
6 |
7 | #define FLAG_EOF 1
8 |
9 | int VF_FILE = -1;
10 |
11 | #define _file_ ((SceUID)f->ioPtr)
12 |
13 | int vfsFileOpen(void *param1, int param2, int type, int mode, VIRTUAL_FILE* f) {
14 | int stdMode = PSP_O_RDONLY;
15 | if (mode == VF_O_WRITE)
16 | stdMode = PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC;
17 | else if (mode == VF_O_READWRITE)
18 | stdMode = PSP_O_RDWR;
19 |
20 | f->ioPtr = (void*)sceIoOpen((char*)param1, stdMode, 0777);
21 | return (s32)f->ioPtr >= 0;
22 | }
23 |
24 | int vfsFileClose(VIRTUAL_FILE *f) {
25 | sceIoClose(_file_);
26 | return 1;
27 | }
28 |
29 | int vfsFileWrite(const void *ptr, size_t size, size_t n, VIRTUAL_FILE* f) {
30 | return sceIoWrite(_file_, ptr, size * n);
31 | }
32 |
33 | int vfsFileRead(void *ptr, size_t size, size_t n, VIRTUAL_FILE* f) {
34 | int readSize = sceIoRead(_file_, ptr, size * n);
35 | if (readSize < size * n)
36 | f->userData |= FLAG_EOF;
37 | return readSize;
38 | }
39 |
40 | int vfsFileGetc(VIRTUAL_FILE *f) {
41 | /* unsigned char car = -1;
42 | sceIoRead(_file_, &car, sizeof(car));
43 | return (int)car;*/
44 | return vfsMemGetc(f);
45 | }
46 |
47 | int vfsFilePutc(int caractere, VIRTUAL_FILE *f) {
48 | /* unsigned char car = (unsigned char)caractere;
49 | return sceIoWrite(_file_, &car, sizeof(car));*/
50 | return vfsMemPutc(caractere, f);
51 | }
52 |
53 | char *vfsFileGets(char *str, int maxLen, VIRTUAL_FILE *f) {
54 | return vfsMemGets(str, maxLen, f);
55 | }
56 |
57 | void vfsFilePuts(const char *s, VIRTUAL_FILE *f) {
58 | return vfsMemPuts(s, f);
59 | }
60 |
61 | void vfsFileSeek(VIRTUAL_FILE *f, int offset, int whence) {
62 | // int oldOffset = sceIoLseek32(_file_, 0, SEEK_CUR);
63 | // if (!(offset == 0 && whence == SEEK_CUR))
64 | // sceIoLseek32(_file_, offset, whence);
65 | sceIoLseek32(_file_, offset, whence);
66 | f->userData &= ~FLAG_EOF;
67 | }
68 |
69 | int vfsFileTell(VIRTUAL_FILE *f) {
70 | return sceIoLseek32(_file_, 0, SEEK_CUR);
71 | }
72 |
73 | int vfsFileEof(VIRTUAL_FILE *f) {
74 | return f->userData & FLAG_EOF;
75 | }
76 |
77 | VIRTUAL_FILE_SOURCE vfsFile = {
78 | vfsFileOpen,
79 | vfsFileClose,
80 | vfsFileRead,
81 | vfsFileWrite,
82 | vfsFileGetc,
83 | vfsFilePutc,
84 | vfsFileGets,
85 | vfsFilePuts,
86 | vfsFileSeek,
87 | vfsFileTell,
88 | vfsFileEof,
89 | };
90 |
91 | int oslInitVfsFile() {
92 | VF_FILE = VirtualFileRegisterSource(&vfsFile);
93 | return VF_FILE;
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/SDL_rotozoom.h:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | SDL_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces
4 |
5 | Copyright (C) 2001-2012 Andreas Schiffler
6 |
7 | This software is provided 'as-is', without any express or implied
8 | warranty. In no event will the authors be held liable for any damages
9 | arising from the use of this software.
10 |
11 | Permission is granted to anyone to use this software for any purpose,
12 | including commercial applications, and to alter it and redistribute it
13 | freely, subject to the following restrictions:
14 |
15 | 1. The origin of this software must not be misrepresented; you must not
16 | claim that you wrote the original software. If you use this software
17 | in a product, an acknowledgment in the product documentation would be
18 | appreciated but is not required.
19 |
20 | 2. Altered source versions must be plainly marked as such, and must not be
21 | misrepresented as being the original software.
22 |
23 | 3. This notice may not be removed or altered from any source
24 | distribution.
25 |
26 | Andreas Schiffler -- aschiffler at ferzkopp dot net
27 |
28 | */
29 |
30 | /*
31 |
32 | In accordance with the above disclaimer, one modification has been made:
33 | All code is wrapped in an #if defined(SDL1) block.
34 |
35 | */
36 |
37 | #if defined(SDL1)
38 |
39 | #ifndef _SDL_rotozoom_h
40 | #define _SDL_rotozoom_h
41 |
42 | #include
43 |
44 | /* Set up for C function definitions, even when using C++ */
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | #ifndef M_PI
50 | #define M_PI 3.141592654
51 | #endif
52 |
53 | #include "SDL.h"
54 |
55 | /* ---- Defines */
56 |
57 | /*!
58 | \brief Disable anti-aliasing (no smoothing).
59 | */
60 | #define SMOOTHING_OFF 0
61 |
62 | /*!
63 | \brief Enable anti-aliasing (smoothing).
64 | */
65 | #define SMOOTHING_ON 1
66 |
67 | /* ---- Function Prototypes */
68 |
69 | #ifdef _MSC_VER
70 | # if defined(DLL_EXPORT) && !defined(LIBSDL_GFX_DLL_IMPORT)
71 | # define SDL_ROTOZOOM_SCOPE __declspec(dllexport)
72 | # else
73 | # ifdef LIBSDL_GFX_DLL_IMPORT
74 | # define SDL_ROTOZOOM_SCOPE __declspec(dllimport)
75 | # endif
76 | # endif
77 | #endif
78 | #ifndef SDL_ROTOZOOM_SCOPE
79 | # define SDL_ROTOZOOM_SCOPE extern
80 | #endif
81 |
82 | /*
83 |
84 | Rotozoom functions
85 |
86 | */
87 |
88 | SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth);
89 |
90 | SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurfaceXY
91 | (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth);
92 |
93 |
94 | SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth,
95 | int *dstheight);
96 |
97 | SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY
98 | (int width, int height, double angle, double zoomx, double zoomy,
99 | int *dstwidth, int *dstheight);
100 |
101 | /*
102 |
103 | Zooming functions
104 |
105 | */
106 |
107 | SDL_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth);
108 |
109 | SDL_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight);
110 |
111 | /*
112 |
113 | Shrinking functions
114 |
115 | */
116 |
117 | SDL_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory);
118 |
119 | /*
120 |
121 | Specialized rotation functions
122 |
123 | */
124 |
125 | SDL_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns);
126 |
127 | /* Ends C function definitions when using C++ */
128 | #ifdef __cplusplus
129 | }
130 | #endif
131 |
132 | #endif /* _SDL_rotozoom_h */
133 |
134 | #endif
135 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/config.cpp:
--------------------------------------------------------------------------------
1 | #include "config.h"
2 | #include "menu.h"
3 | #include "window.h"
4 |
5 | #if defined(WII) && defined(SDL1)
6 | Uint16 DEFAULT_WIDTH = 640;
7 | Uint16 DEFAULT_HEIGHT = 480;
8 | #endif
9 |
10 | void saveGameState_settings() {
11 | gameState.settings_general = getSettingsGeneral();
12 | gameState.settings_difficulty = getSettingsDifficulty();
13 | gameState.settings_cosmetic = getSettingsCosmetic();
14 | gameState.settings_other = getSettingsOther();
15 | gameState.settings_cheats = getSettingsCheats();
16 | gameState.settings_unlocks = getSettingsUnlocks();
17 | gameState.addon_v_2_1 = getSettings_v_2_1();
18 | gameState.addon_v_2_2_1 = getSettings_v_2_2_1();
19 | saveGameState_all();
20 | }
21 |
22 | void loadGameState() {
23 | #if defined(LINUX)
24 | mkdir((string(getenv("HOME")) + "/.trogdorrb").c_str(), 0777);
25 | #endif
26 | saveBin = SDL_RWFromFile(SAVE_FILE, "rb");
27 |
28 | if (saveBin) {
29 | SDL_RWread(saveBin, &gameState, sizeof(gameState), 1);
30 | SDL_RWclose(saveBin);
31 | fixSaveDataIntegrity();
32 | setOptionsFromSaveData();
33 | }
34 | else {
35 | // File does not exist, initialize default game state
36 | initializeDefaultGameState();
37 | }
38 | }
39 |
40 | void loadGameState_partial() { // used for display init (saved scaling option wouldn't load properly otherwise)
41 | saveBin = SDL_RWFromFile(SAVE_FILE, "rb");
42 |
43 | if (saveBin) {
44 | SDL_RWread(saveBin, &gameState, sizeof(gameState), 1);
45 | SDL_RWclose(saveBin);
46 | gameState.settings_cosmetic.scaling %= 4;
47 | }
48 | else {
49 | // File does not exist, use default scaling
50 | #if defined(VITA) || defined(WII_U) || defined(SWITCH)
51 | gameState.settings_cosmetic.scaling = 1;
52 | #elif defined(PSP)
53 | gameState.settings_cosmetic.scaling = 3;
54 | #else
55 | gameState.settings_cosmetic.scaling = 0;
56 | #endif
57 | }
58 | }
59 |
60 | void setOptionsFromSaveData() {
61 | menu_difficulty.setOptionChoice(MENU_PRESET_INDEX, gameState.settings_difficulty.preset);
62 | menu_difficulty.setOptionChoice(MENU_EXTRA_LIVES_INDEX, gameState.settings_difficulty.extraLives);
63 | menu_difficulty.setOptionChoice(MENU_LIVES_INTERVAL_INDEX, gameState.settings_difficulty.livesInterval);
64 | menu_difficulty.setOptionChoice(MENU_PEASANT_PENALTY_INDEX, gameState.settings_difficulty.peasantPenalty);
65 | menu_difficulty.setOptionChoice(MENU_KNIGHT_SPEED_INDEX, gameState.settings_difficulty.knightSpeed);
66 | menu_difficulty.setOptionChoice(MENU_ARROW_SPEED_INDEX, gameState.settings_difficulty.arrowSpeed);
67 | menu_difficulty.setOptionChoice(MENU_ARCHER_FREQ_INDEX, gameState.settings_difficulty.archerFreq);
68 | menu_difficulty.setOptionChoice(MENU_TREASURE_HUTS_INDEX, gameState.settings_difficulty.treasureHuts);
69 | menu_cosmetic.setOptionChoice(MENU_FRAME_RATE_INDEX, gameState.settings_cosmetic.frameRate);
70 | updateFrameRate();
71 | menu_cosmetic.setOptionChoice(MENU_MUSIC_INDEX, gameState.settings_cosmetic.music);
72 | menu_cosmetic.setOptionChoice(MENU_COMMENT_FREQ_INDEX, gameState.settings_cosmetic.commentFreq);
73 | menu_cosmetic.setOptionChoice(MENU_BIG_HEAD_MODE_INDEX, gameState.settings_cosmetic.bigHeadMode);
74 | menu_cosmetic.setOptionChoice(MENU_SCALING_INDEX, gameState.settings_cosmetic.scaling);
75 | menu_cosmetic.setOptionChoice(MENU_OVERLAY_INDEX, gameState.addon_v_2_2_1.overlay);
76 | overlayType = gameState.addon_v_2_2_1.overlay;
77 | menu_other.setOptionChoice(MENU_STARTING_LEVEL_INDEX, gameState.settings_other.startingLevel);
78 | menu_other.setOptionChoice(MENU_SHUFFLE_LEVELS_INDEX, gameState.settings_other.shuffleLevels);
79 | menu_other.setOptionChoice(MENU_RESPAWN_BEHAVIOR_INDEX, gameState.settings_other.respawnBehavior);
80 | menu_other.setOptionChoice(MENU_LEVEL_TRAN_INDEX, gameState.settings_other.levelTran);
81 | menu_cheats.setOptionChoice(MENU_INF_LIVES_INDEX, gameState.settings_cheats.infLives);
82 | menu_cheats.setOptionChoice(MENU_SPEEDY_MODE_INDEX, gameState.settings_cheats.speedyMode);
83 | menu_cheats.setOptionChoice(MENU_NOCLIP_INDEX, gameState.settings_cheats.noclip);
84 | menu_cheats.setOptionChoice(MENU_DEBUG_MODE_INDEX, gameState.settings_cheats.debugMode);
85 | MENU_INF_LIVES->setLocked(gameState.settings_unlocks.locked_infLives);
86 | MENU_EXTRA_LIVES->choiceIsAllowed[6] = !gameState.settings_unlocks.locked_infLives;
87 | MENU_EXTRA_LIVES->choiceIsAllowed[7] = !gameState.settings_unlocks.locked_infLives;
88 | MENU_EXTRA_LIVES->choiceIsAllowed[8] = !gameState.settings_unlocks.locked_infLives;
89 | MENU_SPEEDY_MODE->setLocked(gameState.settings_unlocks.locked_speedyMode);
90 | MENU_NOCLIP->setLocked(gameState.settings_unlocks.locked_noclip);
91 | MENU_DEBUG_MODE->setLocked(gameState.settings_unlocks.locked_debugMode);
92 | menu_other.setOptionChoice(MENU_KNIGHT_MOVEMENT_INDEX, gameState.addon_v_2_1.knightMovement);
93 | isWindowed = gameState.addon_v_2_2_1.windowed;
94 | setFullscreen();
95 | setPreset(MENU_PRESET->index);
96 | }
97 |
98 | void initializeDefaultGameState() {
99 | gameState.settings_general = getSettingsGeneral();
100 | gameState.settings_difficulty = getSettingsDifficulty();
101 | gameState.settings_cosmetic = getSettingsCosmetic();
102 | gameState.settings_other = getSettingsOther();
103 | gameState.settings_cheats = getSettingsCheats();
104 | gameState.settings_unlocks = getSettingsUnlocks();
105 | gameState.addon_v_2_1 = getSettings_v_2_1();
106 | gameState.addon_v_2_2_1 = getSettings_v_2_2_1();
107 | gameState.autosave = { -1, 0, 0, 0, 0, false, gameState.settings_difficulty, gameState.settings_other.shuffleLevels, gameState.settings_cheats };
108 | gameState.highscores = { 0, 0, 0, 0, 0, 0 };
109 | updateFrameRate();
110 | }
111 |
112 | void fixSaveDataIntegrity() {
113 | gameState.settings_difficulty.preset %= MENU_PRESET->numChoices;
114 | gameState.settings_difficulty.extraLives %= MENU_EXTRA_LIVES->numChoices;
115 | gameState.settings_difficulty.livesInterval %= MENU_LIVES_INTERVAL->numChoices;
116 | gameState.settings_difficulty.peasantPenalty %= MENU_PEASANT_PENALTY->numChoices;
117 | gameState.settings_difficulty.knightSpeed %= MENU_KNIGHT_SPEED->numChoices;
118 | gameState.settings_difficulty.arrowSpeed %= MENU_ARROW_SPEED->numChoices;
119 | gameState.settings_difficulty.archerFreq %= MENU_ARCHER_FREQ->numChoices;
120 | gameState.settings_difficulty.treasureHuts %= MENU_TREASURE_HUTS->numChoices;
121 | gameState.settings_cosmetic.frameRate %= MENU_FRAME_RATE->numChoices;
122 | gameState.settings_cosmetic.music %= MENU_MUSIC->numChoices;
123 | gameState.settings_cosmetic.commentFreq %= MENU_COMMENT_FREQ->numChoices;
124 | gameState.settings_cosmetic.bigHeadMode %= MENU_BIG_HEAD_MODE->numChoices;
125 | gameState.settings_cosmetic.scaling %= MENU_SCALING->numChoices;
126 | gameState.settings_other.startingLevel %= MENU_STARTING_LEVEL->numChoices;
127 | gameState.settings_other.shuffleLevels %= MENU_SHUFFLE_LEVELS->numChoices;
128 | gameState.settings_other.respawnBehavior %= MENU_RESPAWN_BEHAVIOR->numChoices;
129 | gameState.settings_other.levelTran %= MENU_LEVEL_TRAN->numChoices;
130 | gameState.settings_cheats.infLives %= MENU_INF_LIVES->numChoices;
131 | gameState.settings_cheats.speedyMode %= MENU_SPEEDY_MODE->numChoices;
132 | gameState.settings_cheats.noclip %= MENU_NOCLIP->numChoices;
133 | gameState.settings_cheats.debugMode %= MENU_DEBUG_MODE->numChoices;
134 | MENU_PRESET->index %= MENU_PRESET->numChoices;
135 | gameState.addon_v_2_1.knightMovement %= MENU_KNIGHT_MOVEMENT->numChoices;
136 | gameState.addon_v_2_2_1.overlay %= MENU_OVERLAY->numChoices;
137 | gameState.addon_v_2_2_1.windowed %= 2;
138 | }
139 |
140 | void saveGameState_all() {
141 | saveBin = SDL_RWFromFile(SAVE_FILE, "wb");
142 | if (saveBin) {
143 | SDL_RWwrite(saveBin, &gameState, sizeof(gameState), 1);
144 | SDL_RWclose(saveBin);
145 | }
146 | }
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/config.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef CONFIG_H
4 | #define CONFIG_H
5 |
6 | constexpr auto DEFAULT_VOLUME_GAME = 100;
7 | constexpr auto DEFAULT_VOLUME_MUSIC = 35;
8 | #if defined(PC)
9 | #define MAX_PAGE_NUM_LOWRES 5
10 | #define MAX_PAGE_NUM_HIRES 4
11 | #else
12 | #define MAX_PAGE_NUM_LOWRES 4
13 | #define MAX_PAGE_NUM_HIRES 3
14 | #endif
15 |
16 | struct State_Settings_General {
17 | Sint8 bgmVolume;
18 | Sint8 sfxVolume;
19 | };
20 |
21 | struct State_Settings_Difficulty {
22 | Sint8 preset;
23 | Sint8 extraLives;
24 | Sint8 livesInterval;
25 | Sint8 peasantPenalty;
26 | Sint8 knightSpeed;
27 | Sint8 arrowSpeed;
28 | Sint8 archerFreq;
29 | Sint8 treasureHuts;
30 | };
31 |
32 | struct State_Settings_Cosmetic {
33 | Sint8 frameRate;
34 | Sint8 music;
35 | Sint8 commentFreq;
36 | Sint8 bigHeadMode;
37 | Sint8 scaling;
38 | };
39 |
40 | struct State_Settings_Other {
41 | Sint8 startingLevel;
42 | Sint8 shuffleLevels;
43 | Sint8 respawnBehavior;
44 | Sint8 levelTran;
45 | };
46 |
47 | struct State_Settings_Cheats {
48 | Sint8 infLives;
49 | Sint8 speedyMode;
50 | Sint8 noclip;
51 | Sint8 debugMode;
52 | };
53 |
54 | struct State_Settings_Unlocks {
55 | bool locked_infLives;
56 | bool locked_speedyMode;
57 | bool locked_noclip;
58 | bool locked_debugMode;
59 | };
60 |
61 | struct State_Autosave {
62 | Sint16 mans; // lives
63 | Uint32 score; // score
64 | Uint8 level; // current level
65 | bool treasureHutFound; // treasure hut has been found in this level
66 | Sint8 treasureHutLevel; // the level index of the first treasure hut you entered; default is 0
67 | Uint32 randomSeed; // random seed
68 | State_Settings_Difficulty difficulty; // Difficulty settings when the game was started
69 | Sint8 shuffleLevels; // whether or not levels are shuffled
70 | State_Settings_Cheats cheats; // Cheat settings when the game was started
71 | };
72 |
73 | struct State_HighScores {
74 | Uint32 custom;
75 | Uint32 flash;
76 | Uint32 html5;
77 | Uint32 hard;
78 | Uint32 cruel;
79 | Uint32 mipsChoice;
80 | };
81 |
82 | struct State_Addon_v_2_1 {
83 | Sint8 knightMovement;
84 | Uint32 chance;
85 | };
86 |
87 | struct State_Addon_v_2_2_1 {
88 | Sint8 overlay;
89 | Sint8 windowed;
90 | };
91 |
92 | struct GameState {
93 | State_Settings_General settings_general;
94 | State_Settings_Difficulty settings_difficulty;
95 | State_Settings_Cosmetic settings_cosmetic;
96 | State_Settings_Other settings_other;
97 | State_Settings_Cheats settings_cheats;
98 | State_Settings_Unlocks settings_unlocks;
99 | State_Autosave autosave;
100 | State_HighScores highscores;
101 | State_Addon_v_2_1 addon_v_2_1;
102 | State_Addon_v_2_2_1 addon_v_2_2_1;
103 | };
104 |
105 | /* Save File */
106 | extern SDL_RWops *saveBin;
107 | extern GameState gameState;
108 |
109 | /* System-Specific Variables */
110 | #if defined(VITA)
111 | const string rootDir = "ux0:data/Trogdor-RB/";
112 | #elif defined(WII)
113 | const string rootDir = "sd:/apps/Trogdor-RB/";
114 | #elif defined(GAMECUBE)
115 | const string rootDir = "/Trogdor-RB/";
116 | #elif defined(THREEDS)
117 | const string rootDir = "sdmc:/3ds/Trogdor-RB/";
118 | #elif defined(LINUX)
119 | const string rootDir = string(getenv("HOME")) + "/.trogdorrb/";
120 | #else
121 | const string rootDir = "";
122 | #endif
123 |
124 | #define SAVE_FILE (rootDir+"save.bin").c_str()
125 |
126 | #define CREATE_DEBUG_FILE(str) \
127 | saveBin = SDL_RWFromFile((rootDir + str).c_str(), "w+b"); \
128 | SDL_RWclose(saveBin);
129 |
130 | #if !defined(SDL1)
131 | extern SDL_DisplayMode DM;
132 | #endif
133 | extern Uint16 displayRefreshRate;
134 |
135 | #if defined(VITA)
136 | constexpr auto DEFAULT_WIDTH = 960;
137 | constexpr auto DEFAULT_HEIGHT = 544;
138 | #elif defined(SWITCH) || defined(WII_U)
139 | constexpr auto DEFAULT_WIDTH = 1920;
140 | constexpr auto DEFAULT_HEIGHT = 1080;
141 | #elif defined(PSP)
142 | constexpr auto DEFAULT_WIDTH = 480;
143 | constexpr auto DEFAULT_HEIGHT = 272;
144 | #elif defined(WII)
145 | #if defined(SDL1)
146 | extern Uint16 DEFAULT_WIDTH;
147 | extern Uint16 DEFAULT_HEIGHT;
148 | #else
149 | constexpr auto DEFAULT_WIDTH = 640;
150 | constexpr auto DEFAULT_HEIGHT = 480;
151 | #endif
152 | #elif defined(THREEDS)
153 | constexpr auto DEFAULT_WIDTH = 400;
154 | constexpr auto DEFAULT_HEIGHT = 240;
155 | #elif defined(ANDROID)
156 | #define DEFAULT_WIDTH max(DM.w, DM.h)
157 | #define DEFAULT_HEIGHT min(DM.w, DM.h)
158 | #elif defined(SDL1)
159 | constexpr auto DEFAULT_WIDTH = 320;
160 | constexpr auto DEFAULT_HEIGHT = 240;
161 | #else
162 | constexpr auto DEFAULT_WIDTH = 640;
163 | constexpr auto DEFAULT_HEIGHT = 480;
164 | #endif
165 |
166 | extern void saveGameState_settings();
167 | extern void loadGameState();
168 | extern void loadGameState_partial();
169 | extern void setOptionsFromSaveData();
170 | extern void initializeDefaultGameState();
171 | extern void fixSaveDataIntegrity();
172 | extern void saveGameState_all();
173 |
174 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/cutscenes.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 | #include "sprite_objects.h"
3 |
4 | #ifndef CUTSCENES_H
5 | #define CUTSCENES_H
6 |
7 | extern bool cutsceneIsPlaying;
8 | extern Uint8 sound_channel_level_beaten;
9 | extern Sint8 watchAllCutscenesCounter;
10 |
11 | extern void InitializeCutsceneObjects();
12 | extern void InitializeCutsceneObjects_trogdor();
13 | extern void cutscene_level_beaten();
14 | extern void cutscene_game_over();
15 | extern void cutscene_level_4();
16 | extern void cutscene_level_8();
17 | extern void cutscene_level_12();
18 | extern void cutscene_level_16();
19 | extern void cutscene_level_20();
20 | extern void cutscene_level_24();
21 | extern void cutscene_level_30();
22 | extern void cutscene_level_34();
23 | extern void cutscene_level_38();
24 | extern void cutscene_level_42();
25 | extern void cutscene_level_46();
26 | extern void cutscene_level_46_arrow_helper(SpriteInstance *, Sint16);
27 | extern void cutscene_level_50();
28 | extern void cutscene_level_100();
29 | extern void prepareCutscene(Uint8, Sint16, bool);
30 | extern void playCutscene(Uint8, Sint16);
31 |
32 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/fonts_h/29_NOKIA_5110_FontSet.h:
--------------------------------------------------------------------------------
1 | extern unsigned char __29_NOKIA_5110_FontSet_ttf[];
2 | extern unsigned int __29_NOKIA_5110_FontSet_ttf_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/fonts_h/54_serif_v01.h:
--------------------------------------------------------------------------------
1 | extern unsigned char __54_serif_v01_ttf[];
2 | extern unsigned int __54_serif_v01_ttf_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/fonts_h/Commodore_Pixelized_v1_2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char Commodore_Pixelized_v1_2_ttf[];
2 | extern unsigned int Commodore_Pixelized_v1_2_ttf_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/fonts_h/serif_v01.h:
--------------------------------------------------------------------------------
1 | extern unsigned char serif_v01_ttf[];
2 | extern unsigned int serif_v01_ttf_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/general.cpp:
--------------------------------------------------------------------------------
1 | #include "general.h"
2 |
3 | //#if defined(SDL1) && defined(PC) && !defined(LINUX)
4 | //FILE _iob[] = { *stdin, *stdout, *stderr };
5 | //
6 | //FILE * __cdecl __iob_func(void) {
7 | // return _iob;
8 | //}
9 | //#endif
10 |
11 | FrameState::FrameState() {
12 | set(1);
13 | }
14 |
15 | void FrameState::set(Uint16 num) {
16 | atStartOfFrame = true;
17 | subFrame = num;
18 | frame = num;
19 | nextSubFrame = subFrame + frameRateMult;
20 | nextFrame = (Uint16)nextSubFrame;
21 | atEndOfFrame = (frame != nextFrame);
22 | }
23 |
24 | void FrameState::increment() {
25 | atStartOfFrame = atEndOfFrame;
26 | subFrame = nextSubFrame;
27 | frame = nextFrame;
28 | nextSubFrame = subFrame + frameRateMult;
29 | nextFrame = (Uint16)nextSubFrame;
30 | atEndOfFrame = (frame != nextFrame);
31 | }
32 |
33 | bool FrameState::startingFrame(Uint16 num) {
34 | return atStartOfFrame && (frame == num);
35 | }
36 |
37 | bool FrameState::endingFrame(Uint16 num) {
38 | return atEndOfFrame && (frame == num);
39 | }
40 |
41 | void FrameState::subtract(float num) {
42 | subFrame -= num;
43 | frame = (Uint16)subFrame;
44 | nextSubFrame -= num;
45 | nextFrame = (Uint16)nextSubFrame;
46 | }
47 |
48 | void FrameState::mod(Uint8 num) {
49 | if (frame >= num) {
50 | subtract(num);
51 | }
52 | }
53 |
54 | void applyColorKey(SDL_Surface *surface) {
55 | #if !defined(SDL1)
56 | SDL_SetColorKey(surface, SDL_TRUE, SDL_MapRGB(surface->format, 0xFF, 0, 0xFF));
57 | #else
58 | SDL_SetColorKey(surface, SDL_SRCCOLORKEY, SDL_MapRGB(surface->format, 0xFF, 0, 0xFF));
59 | #endif
60 | }
61 |
62 | void systemSpecificOpen() {
63 | #if defined(WII_U)
64 | /* Set SD Card Mount Path */
65 | WHBMountSdCard();
66 | WHBGetSdCardMountPath();
67 | string sdPathStr = "/wiiu/apps/Trogdor-RB";
68 | const char *sdPathStart = WHBGetSdCardMountPath();
69 | sdPathStr = sdPathStart + sdPathStr;
70 | const char *sdPath = sdPathStr.c_str();
71 | chdir(sdPath);
72 | #elif defined(VITA)
73 | /* Disable rear touch pad */
74 | SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);
75 | #elif defined(SWITCH)
76 | /* Set SD Card mount path */
77 | chdir("/switch/Trogdor-RB");
78 | #elif defined(WII) || defined(GAMECUBE)
79 | /* Initialize SD Card */
80 | fatInitDefault();
81 | /* Initialize Controller */
82 | PAD_Init();
83 | #elif defined(XBOX)
84 | XVideoSetMode(640, 480, 32, REFRESH_DEFAULT);
85 | #endif
86 | }
87 |
88 | void systemSpecificClose() {
89 | #if defined(WII_U)
90 | WHBUnmountSdCard();
91 | WHBProcInit();
92 | WHBProcShutdown();
93 | #elif defined(VITA)
94 | sceKernelExitProcess(0);
95 | #elif defined(WII) || defined(GAMECUBE)
96 | exit(EXIT_SUCCESS);
97 | #elif defined(PSP)
98 | sceKernelExitGame();
99 | #endif
100 | }
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/general.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef GENERAL_H
4 | #define GENERAL_H
5 |
6 | struct Timer {
7 | double now;
8 | double last;
9 | };
10 |
11 | class FrameState {
12 | public:
13 | Uint16 frame;
14 | float subFrame;
15 | Uint16 nextFrame;
16 | float nextSubFrame;
17 | bool atStartOfFrame; // for things that should only happen once, at the start of a frame (e.g. playing a sound)
18 | bool atEndOfFrame; // for things that shouldn't happen until the end of a frame (e.g. changing scenes)
19 | FrameState();
20 | void set(Uint16);
21 | void increment();
22 | bool startingFrame(Uint16);
23 | bool endingFrame(Uint16);
24 | void subtract(float);
25 | void mod(Uint8);
26 | };
27 |
28 | /* Program State */
29 | extern bool isRunning;
30 | extern bool windowSizeChanged;
31 | extern Sint16 g_sceneState;
32 | extern FrameState g_frameState;
33 | extern Uint32 rand_var;
34 | extern SDL_Event event;
35 |
36 | /* General-use Variables */
37 | extern Sint8 i, j, k;
38 | extern int int_i, int_j, int_k;
39 | extern Uint32 uint_i, uint_j, uint_k;
40 | extern float float_i;
41 | extern double double_i;
42 | extern SDL_Rect outputRect;
43 |
44 | /* Timer */
45 | extern Timer timer_global;
46 | extern Uint32 deltaTime;
47 |
48 | /* Framerate */
49 | extern Uint32 frameTime;
50 | extern Uint32 frameCounter_global;
51 | constexpr auto ORIGINAL_FRAME_RATE = 16;
52 | extern Uint8 frameRate;
53 | extern float frameRateMult;
54 | extern Uint16 popRandVal;
55 |
56 | constexpr auto PI = 3.14159265;
57 |
58 | //#if defined(SDL1) && defined(PC) && !defined(LINUX)
59 | //extern FILE _iob[];
60 | //
61 | //extern "C" FILE * __cdecl __iob_func(void);
62 | //#endif
63 |
64 | #if defined(_WIN32) && !defined(_WIN64)
65 | #define AUDIO_TROG_FORMAT AUDIO_S32SYS
66 | #else
67 | #define AUDIO_TROG_FORMAT MIX_DEFAULT_FORMAT
68 | #endif
69 |
70 | #if defined(THREEDS)
71 | constexpr auto AUDIO_SAMPLE_RATE = 22050;
72 | #else
73 | constexpr auto AUDIO_SAMPLE_RATE = 44100;
74 | #endif
75 |
76 | extern void applyColorKey(SDL_Surface *);
77 | extern void systemSpecificOpen();
78 | extern void systemSpecificClose();
79 |
80 | #if defined(_MSC_VER) && !defined(XBOX)
81 | #define STRCPY(dest, src) strcpy_s(dest, src);
82 | #else
83 | #define STRCPY(dest, src) strcpy(dest, src);
84 | #endif
85 |
86 | #define RANDINT(min, max) \
87 | (rand() % ((max) - (min) + 1) + min)
88 |
89 | #define LEN(arr) \
90 | (sizeof(arr) / sizeof(arr[0]))
91 |
92 | #define ZERO_OUT_ARRAY(arr) \
93 | (memset(arr, 0, sizeof(arr)))
94 |
95 | #if defined(PC)
96 | #define PRINT(str) \
97 | cout << str << endl
98 | #else
99 | #define PRINT(str)
100 | #endif
101 |
102 | #define SIN_WAVE(timeVal, halfPeriod, amplitude) \
103 | (sin((timeVal) * PI / (halfPeriod)) * (amplitude))
104 |
105 | #define COS_WAVE(timeVal, halfPeriod, amplitude) \
106 | (cos((timeVal) * PI / (halfPeriod)) * (amplitude))
107 |
108 | #define MOVE_FAST_THEN_DECELERATE(dist, numSeconds, timeVal) \
109 | (0.5 * pow(((((numSeconds) - (timeVal)) / (numSeconds)) * sqrt(2 * (dist))), 2))
110 |
111 | #define UPDATE_TIMER(timer) \
112 | timer.last = timer.now; \
113 | timer.now = SDL_GetTicks() / 1000.0;
114 |
115 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/goombasend.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 FIX94
3 | *
4 | * This software may be modified and distributed under the terms
5 | * of the MIT license. See the LICENSE file for details.
6 | */
7 |
8 | /*
9 | * This program has been modified from its original version for
10 | * use within Trogdor: Reburninated by Mode8fx. It has also been
11 | * split into an additional header file, goombasend.h
12 | */
13 |
14 | #if defined(WII) || defined(GAMECUBE)
15 |
16 | #include "goombasend.h"
17 | #include "demo_gba.h"
18 |
19 | void transcb(s32 chan, u32 ret) {
20 | transval = 1;
21 | }
22 |
23 | void acb(s32 res, u32 val) {
24 | resval = val;
25 | }
26 |
27 | unsigned int docrc(u32 crc, u32 val) {
28 | int i_gba;
29 | for(i_gba = 0; i_gba < 0x20; i_gba++) {
30 | if ((crc^val)&1) {
31 | crc>>=1;
32 | crc^=0xa1c1;
33 | } else
34 | crc>>=1;
35 | val>>=1;
36 | }
37 | return crc;
38 | }
39 |
40 | unsigned int calckey(unsigned int size) {
41 | unsigned int ret = 0;
42 | size=(size-0x200) >> 3;
43 | int res1 = (size&0x3F80) << 1;
44 | res1 |= (size&0x4000) << 2;
45 | res1 |= (size&0x7F);
46 | res1 |= 0x380000;
47 | int res2 = res1;
48 | res1 = res2 >> 0x10;
49 | int res3 = res2 >> 8;
50 | res3 += res1;
51 | res3 += res2;
52 | res3 <<= 24;
53 | res3 |= res2;
54 | res3 |= 0x80808080;
55 |
56 | if ((res3&0x200) == 0) {
57 | ret |= (((res3)&0xFF)^0x4B)<<24;
58 | ret |= (((res3>>8)&0xFF)^0x61)<<16;
59 | ret |= (((res3>>16)&0xFF)^0x77)<<8;
60 | ret |= (((res3>>24)&0xFF)^0x61);
61 | } else {
62 | ret |= (((res3)&0xFF)^0x73)<<24;
63 | ret |= (((res3>>8)&0xFF)^0x65)<<16;
64 | ret |= (((res3>>16)&0xFF)^0x64)<<8;
65 | ret |= (((res3>>24)&0xFF)^0x6F);
66 | }
67 | return ret;
68 | }
69 |
70 | void doreset() {
71 | cmdbuf[0] = 0xFF; //reset
72 | transval = 0;
73 | SI_Transfer(1,cmdbuf,1,resbuf,3,transcb,SI_TRANS_DELAY);
74 | while(transval == 0) ;
75 | }
76 |
77 | void getstatus() {
78 | cmdbuf[0] = 0; //status
79 | transval = 0;
80 | SI_Transfer(1,cmdbuf,1,resbuf,3,transcb,SI_TRANS_DELAY);
81 | while(transval == 0);
82 | }
83 |
84 | u32 recv() {
85 | memset(resbuf,0,32);
86 | cmdbuf[0]=0x14; //read
87 | transval = 0;
88 | SI_Transfer(1,cmdbuf,1,resbuf,5,transcb,SI_TRANS_DELAY);
89 | while(transval == 0) ;
90 | return *(vu32*)resbuf;
91 | }
92 |
93 | void send(u32 msg) {
94 | cmdbuf[0]=0x15;cmdbuf[1]=(msg>>0)&0xFF;cmdbuf[2]=(msg>>8)&0xFF;
95 | cmdbuf[3]=(msg>>16)&0xFF;cmdbuf[4]=(msg>>24)&0xFF;
96 | transval = 0;
97 | resbuf[0] = 0;
98 | SI_Transfer(1,cmdbuf,5,resbuf,1,transcb,SI_TRANS_DELAY);
99 | while(transval == 0) ;
100 | }
101 |
102 | void prepare_rom() {
103 | cmdbuf = memalign(32, 32);
104 | resbuf = memalign(32, 32);
105 | resval = 0;
106 | //SI_GetTypeAsync(1, acb);
107 | }
108 |
109 | u8 wait_for_gba() {
110 | //waiting for GBA in port 2...
111 | SI_GetTypeAsync(1, acb);
112 | if (resval) {
113 | if (resval == 0x80 || resval & 8) {
114 | resval = 0;
115 | SI_GetTypeAsync(1, acb);
116 | }
117 | else if (SI_GBA)
118 | return 0;
119 | }
120 | return 1;
121 | }
122 |
123 | u8 send_rom() {
124 | //GBA Found! Waiting for BIOS
125 | resbuf[2]=0;
126 | while(!(resbuf[2]&0x10)) {
127 | doreset();
128 | getstatus();
129 | }
130 | //GBA Ready, sending rom
131 | unsigned int sendsize = ((demo_gba_size+7)&~7);
132 | unsigned int ourkey = calckey(sendsize);
133 | //printf("Our Key: %08x\n", ourkey);
134 | //get current sessionkey
135 | u32 sessionkeyraw = recv();
136 | u32 sessionkey = __builtin_bswap32(sessionkeyraw^0x7365646F);
137 | //send over our own key
138 | send(__builtin_bswap32(ourkey));
139 | unsigned int fcrc = 0x15a0;
140 | //send over gba header
141 | int i_gba;
142 | for(i_gba = 0; i_gba < 0xC0; i_gba+=4)
143 | send(__builtin_bswap32(*(vu32*)(demo_gba+i_gba)));
144 | //send rom
145 | u32 enc;
146 | for (i_gba = 0xC0; i_gba < sendsize; i_gba += 4) {
147 | enc = ((demo_gba[i_gba + 3] << 24) | (demo_gba[i_gba + 2] << 16) | (demo_gba[i_gba + 1] << 8) | (demo_gba[i_gba]));
148 | fcrc = docrc(fcrc, enc);
149 | sessionkey = (sessionkey * 0x6177614B) + 1;
150 | enc ^= sessionkey;
151 | enc ^= ((~(i_gba + (0x20 << 20))) + 1);
152 | enc ^= 0x20796220;
153 | send(enc);
154 | }
155 | fcrc |= (sendsize<<16);
156 | //ROM done!
157 | //send over CRC
158 | sessionkey = (sessionkey*0x6177614B)+1;
159 | fcrc^=sessionkey;
160 | fcrc^=((~(i_gba+(0x20<<20)))+1);
161 | fcrc^=0x20796220;
162 | send(fcrc);
163 | //get crc back (unused)
164 | recv();
165 | return 0;
166 | }
167 | #endif
168 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/goombasend.h:
--------------------------------------------------------------------------------
1 | #if defined(WII) || defined(GAMECUBE)
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #ifndef GOOMBASEND_H
12 | #define GOOMBASEND_H
13 |
14 | //from my tests 50us seems to be the lowest
15 | //safe si transfer delay in between calls
16 | #define SI_TRANS_DELAY 50
17 |
18 | extern u8 *resbuf, *cmdbuf;
19 |
20 | extern volatile u32 transval;
21 | extern void transcb(s32, u32);
22 |
23 | extern volatile u32 resval;
24 | extern void acb(s32, u32);
25 |
26 | extern unsigned int docrc(u32, u32);
27 | extern unsigned int calckey(unsigned int);
28 | extern void doreset();
29 | extern void getstatus();
30 | extern u32 recv();
31 | extern void send(u32);
32 | extern void prepare_rom();
33 | extern u8 wait_for_gba();
34 | extern u8 send_rom();
35 | #endif
36 |
37 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/archer.h:
--------------------------------------------------------------------------------
1 | extern unsigned char archer_bmp[];
2 | extern unsigned int archer_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/arrow.cpp:
--------------------------------------------------------------------------------
1 | #include "arrow.h"
2 |
3 | unsigned char arrow_bmp[] = {
4 | 0x42, 0x4d, 0x16, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00,
5 | 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0a, 0x00,
6 | 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01,
7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff,
9 | 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
10 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
11 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
12 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
13 | 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
14 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
15 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
16 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
17 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
18 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
19 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
20 | 0x46, 0xda, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
21 | 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
22 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
23 | 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
24 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff,
25 | 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
26 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
27 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
28 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
29 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
30 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
31 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff,
32 | 0x46, 0xda, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
33 | 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
34 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
35 | 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
36 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
37 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
38 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
39 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0x46, 0xda, 0xff,
40 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
41 | 0x46, 0xda, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
42 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
43 | 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff,
44 | 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
45 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
46 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
47 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x46, 0xda, 0xff, 0xff, 0x00, 0xff,
48 | 0x46, 0xda, 0xff, 0x00, 0x00, 0x00
49 | };
50 | unsigned int arrow_bmp_len = 534;
51 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/arrow.h:
--------------------------------------------------------------------------------
1 | extern unsigned char arrow_bmp[];
2 | extern unsigned int arrow_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/arrow_funnyjoke.h:
--------------------------------------------------------------------------------
1 | extern unsigned char arrow_funnyjoke_bmp[];
2 | extern unsigned int arrow_funnyjoke_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/backgrounds/bg_1.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bg_1_bmp[];
2 | extern unsigned int bg_1_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/backgrounds/bg_2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bg_2_bmp[];
2 | extern unsigned int bg_2_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/backgrounds/bg_3.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bg_3_bmp[];
2 | extern unsigned int bg_3_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/backgrounds/bg_4.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bg_4_bmp[];
2 | extern unsigned int bg_4_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/backgrounds/bg_treasure_hut.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bg_treasure_hut_bmp[];
2 | extern unsigned int bg_treasure_hut_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/bm_empty.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bm_empty_bmp[];
2 | extern unsigned int bm_empty_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/bm_full.h:
--------------------------------------------------------------------------------
1 | extern unsigned char bm_full_bmp[];
2 | extern unsigned int bm_full_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/burninate_message_fire.h:
--------------------------------------------------------------------------------
1 | extern unsigned char burninate_message_fire_bmp[];
2 | extern unsigned int burninate_message_fire_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/burninate_text.h:
--------------------------------------------------------------------------------
1 | extern unsigned char burninate_text_bmp[];
2 | extern unsigned int burninate_text_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/cottage.h:
--------------------------------------------------------------------------------
1 | extern unsigned char cottage_bmp[];
2 | extern unsigned int cottage_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/cottage_fire.h:
--------------------------------------------------------------------------------
1 | extern unsigned char cottage_fire_bmp[];
2 | extern unsigned int cottage_fire_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/death_message.h:
--------------------------------------------------------------------------------
1 | extern unsigned char death_message_bmp[];
2 | extern unsigned int death_message_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/end_of_level_flash.h:
--------------------------------------------------------------------------------
1 | extern unsigned char end_of_level_flash_bmp[];
2 | extern unsigned int end_of_level_flash_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/end_of_level_trogdor.h:
--------------------------------------------------------------------------------
1 | extern unsigned char end_of_level_trogdor_bmp[];
2 | extern unsigned int end_of_level_trogdor_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/game_over_banner.h:
--------------------------------------------------------------------------------
1 | extern unsigned char game_over_banner_bmp[];
2 | extern unsigned int game_over_banner_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/game_over_text.h:
--------------------------------------------------------------------------------
1 | extern unsigned char game_over_text_bmp[];
2 | extern unsigned int game_over_text_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/game_over_trogdor.h:
--------------------------------------------------------------------------------
1 | extern unsigned char game_over_trogdor_bmp[];
2 | extern unsigned int game_over_trogdor_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/heart.h:
--------------------------------------------------------------------------------
1 | extern unsigned char heart_bmp[];
2 | extern unsigned int heart_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/jonathan_howe.h:
--------------------------------------------------------------------------------
1 | extern unsigned char jonathan_howe_bmp[];
2 | extern unsigned int jonathan_howe_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/kerrek.h:
--------------------------------------------------------------------------------
1 | extern unsigned char kerrek_bmp[];
2 | extern unsigned int kerrek_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/kerrek_smoked.h:
--------------------------------------------------------------------------------
1 | extern unsigned char kerrek_smoked_bmp[];
2 | extern unsigned int kerrek_smoked_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/knight.h:
--------------------------------------------------------------------------------
1 | extern unsigned char knight_bmp[];
2 | extern unsigned int knight_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/knight_funnyjoke.h:
--------------------------------------------------------------------------------
1 | extern unsigned char knight_funnyjoke_bmp[];
2 | extern unsigned int knight_funnyjoke_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/level_beaten_smoke.h:
--------------------------------------------------------------------------------
1 | extern unsigned char level_beaten_smoke_bmp[];
2 | extern unsigned int level_beaten_smoke_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/level_beaten_trogdor_scaled.h:
--------------------------------------------------------------------------------
1 | extern unsigned char level_beaten_trogdor_scaled_bmp[];
2 | extern unsigned int level_beaten_trogdor_scaled_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/loot.h:
--------------------------------------------------------------------------------
1 | extern unsigned char loot_bmp[];
2 | extern unsigned int loot_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/menu_cursor.cpp:
--------------------------------------------------------------------------------
1 | #include "menu_cursor.h"
2 |
3 | unsigned char menu_cursor_bmp[] = {
4 | 0x42, 0x4d, 0x16, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00,
5 | 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0f, 0x00,
6 | 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01,
7 | 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00,
8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
10 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2b, 0xd2, 0x2b, 0x2b, 0xd2, 0x00,
12 | 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff,
13 | 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00,
14 | 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
15 | 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
16 | 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff,
17 | 0x40, 0x00, 0xff, 0x2b, 0x2b, 0xd2, 0x2b, 0x2b, 0xd2, 0x00, 0x00, 0x00,
18 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40,
20 | 0x00, 0xff, 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 | 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00,
22 | 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00,
23 | 0xff, 0x2b, 0x2b, 0xd2, 0x2b, 0x2b, 0xd2, 0x00, 0x00, 0x00, 0xff, 0x00,
24 | 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff,
25 | 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff,
26 | 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40,
28 | 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x2b,
29 | 0x2b, 0xd2, 0x2b, 0x2b, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30 | 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00,
31 | 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff,
33 | 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x2b, 0x2b, 0xd2,
34 | 0x2b, 0x2b, 0xd2, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x40,
36 | 0x00, 0xff, 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
37 | 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00,
38 | 0x00, 0x40, 0x00, 0xff, 0x40, 0x00, 0xff, 0x2b, 0x2b, 0xd2, 0x2b, 0x2b,
39 | 0xd2, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
40 | 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xff,
41 | 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x2b, 0xd2, 0x2b, 0x2b, 0xd2, 0x00,
44 | 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff,
45 | 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00,
46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
47 | 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
48 | 0xff, 0xff, 0x00, 0xff, 0x00, 0x00
49 | };
50 | unsigned int menu_cursor_bmp_len = 534;
51 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/menu_cursor.h:
--------------------------------------------------------------------------------
1 | extern unsigned char menu_cursor_bmp[];
2 | extern unsigned int menu_cursor_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/options_menu.h:
--------------------------------------------------------------------------------
1 | extern unsigned char options_menu_bmp[];
2 | extern unsigned int options_menu_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/options_menu_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char options_menu_240p_bmp[];
2 | extern unsigned int options_menu_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_bottom.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_bottom_bmp[];
2 | extern unsigned int basement_bottom_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_bottom_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_bottom_240p_bmp[];
2 | extern unsigned int basement_bottom_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_left.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_left_bmp[];
2 | extern unsigned int basement_left_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_left_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_left_240p_bmp[];
2 | extern unsigned int basement_left_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_right.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_right_bmp[];
2 | extern unsigned int basement_right_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_right_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_right_240p_bmp[];
2 | extern unsigned int basement_right_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_top.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_top_bmp[];
2 | extern unsigned int basement_top_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/basement_top_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char basement_top_240p_bmp[];
2 | extern unsigned int basement_top_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_bottom.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_bottom_bmp[];
2 | extern unsigned int compy_bottom_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_bottom_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_bottom_240p_bmp[];
2 | extern unsigned int compy_bottom_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_left.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_left_bmp[];
2 | extern unsigned int compy_left_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_left_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_left_240p_bmp[];
2 | extern unsigned int compy_left_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_right.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_right_bmp[];
2 | extern unsigned int compy_right_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_right_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_right_240p_bmp[];
2 | extern unsigned int compy_right_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_top.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_top_bmp[];
2 | extern unsigned int compy_top_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/compy_top_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char compy_top_240p_bmp[];
2 | extern unsigned int compy_top_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_bottom.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_bottom_bmp[];
2 | extern unsigned int strong_badia_bottom_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_bottom_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_bottom_240p_bmp[];
2 | extern unsigned int strong_badia_bottom_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_left.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_left_bmp[];
2 | extern unsigned int strong_badia_left_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_left_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_left_240p_bmp[];
2 | extern unsigned int strong_badia_left_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_right.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_right_bmp[];
2 | extern unsigned int strong_badia_right_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_right_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_right_240p_bmp[];
2 | extern unsigned int strong_badia_right_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_top.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_top_bmp[];
2 | extern unsigned int strong_badia_top_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/overlays/strong_badia_top_240p.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_badia_top_240p_bmp[];
2 | extern unsigned int strong_badia_top_240p_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/peasant.h:
--------------------------------------------------------------------------------
1 | extern unsigned char peasant_bmp[];
2 | extern unsigned int peasant_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/peasantometer.cpp:
--------------------------------------------------------------------------------
1 | #include "peasantometer.h"
2 |
3 | unsigned char peasantometer_bmp[] = {
4 | 0x42, 0x4d, 0xc6, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00,
5 | 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 0x00,
6 | 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03,
7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
9 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
10 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
11 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
12 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
13 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
14 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
15 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
16 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
17 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
18 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
19 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
20 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
21 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
22 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
23 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
24 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
25 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
26 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
27 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
28 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
29 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
30 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
31 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
32 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
33 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
34 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
35 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
36 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
37 | 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
38 | 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1,
39 | 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1,
40 | 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
41 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
42 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
43 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
44 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
45 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
46 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
47 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
48 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
49 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
50 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
51 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
52 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
53 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
54 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
55 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
56 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
57 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
58 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
59 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
60 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
61 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
62 | 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
63 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
64 | 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
65 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
66 | 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
67 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
68 | 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
69 | 0x66, 0x66, 0x66, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
70 | 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
71 | 0x09, 0x3c, 0x67, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1,
72 | 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
73 | 0x66, 0x66, 0x66, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
74 | 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
75 | 0x09, 0x3c, 0x67, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1,
76 | 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
77 | 0x66, 0x66, 0x66, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
78 | 0x66, 0x66, 0x66, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
79 | 0x09, 0x3c, 0x67, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1, 0x68, 0xaf, 0xe1,
80 | 0x09, 0x3c, 0x67, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
81 | 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
82 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
83 | 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67, 0x09, 0x3c, 0x67,
84 | 0xff, 0x00, 0xff, 0xff, 0x00, 0xff
85 | };
86 | unsigned int peasantometer_bmp_len = 966;
87 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/peasantometer.h:
--------------------------------------------------------------------------------
1 | extern unsigned char peasantometer_bmp[];
2 | extern unsigned int peasantometer_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/strong_bad.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_bad_bmp[];
2 | extern unsigned int strong_bad_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/strong_bad_ending.h:
--------------------------------------------------------------------------------
1 | extern unsigned char strong_bad_ending_bmp[];
2 | extern unsigned int strong_bad_ending_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/title_screen.h:
--------------------------------------------------------------------------------
1 | extern unsigned char title_screen_bmp[];
2 | extern unsigned int title_screen_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_bmp[];
2 | extern unsigned int trogdor_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_bighead.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_bighead_bmp[];
2 | extern unsigned int trogdor_bighead_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_dead.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_dead_bmp[];
2 | extern unsigned int trogdor_dead_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_ending.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_ending_bmp[];
2 | extern unsigned int trogdor_ending_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_fire.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_fire_bmp[];
2 | extern unsigned int trogdor_fire_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_flexing.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_flexing_bmp[];
2 | extern unsigned int trogdor_flexing_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/trogdor_logo.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogdor_logo_bmp[];
2 | extern unsigned int trogdor_logo_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/graphics_h/videlectrix_logo_big.h:
--------------------------------------------------------------------------------
1 | extern unsigned char videlectrix_logo_big_bmp[];
2 | extern unsigned int videlectrix_logo_big_bmp_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/include.h:
--------------------------------------------------------------------------------
1 | #ifndef INCLUDE_H
2 | #define INCLUDE_H
3 |
4 | // to fix conflicting int32_t and uint32_t definitions, comment their typedefs out in `include/SDL/SDL_config_wii.h`
5 |
6 | #if defined(PSP)
7 | #include
8 | #include
9 | #include
10 | //#include
11 | #include "oslibAudio/oslib.h"
12 | #elif defined(WII) && defined(SDL1)
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #else
19 | #include
20 | #include
21 | #include
22 | #if !defined(XBOX)
23 | #include
24 | #endif
25 | #if defined(SDL1)
26 | #if defined(GAMECUBE) || defined(THREEDS)
27 | #include
28 | #else
29 | #include "SDL_rotozoom.h"
30 | #endif
31 | #endif
32 | #endif
33 |
34 | #include
35 | #include
36 | #if defined(SDL1)
37 | #include
38 | #endif
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #if defined(ANDROID) || defined(XBOX)
46 | #include
47 | #endif
48 | #include
49 | #include
50 | #include
51 | #if defined(WII_U)
52 | #include
53 | #include
54 | #include
55 | #elif defined(VITA)
56 | #include
57 | #elif defined(SWITCH)
58 | #include
59 | #elif defined(WII)
60 | #include
61 | #include
62 | #include
63 | #include
64 | #elif defined(GAMECUBE)
65 | #include
66 | #include
67 | #include
68 | #include
69 | #elif defined(PSP)
70 | #include
71 | #include
72 | #include
73 | #elif defined(THREEDS)
74 | #include <3ds.h>
75 | #elif defined(XBOX)
76 | #include
77 | #include
78 | #include
79 | #include
80 | #include
81 | #include
82 | #elif defined(LINUX)
83 | #include
84 | #endif
85 |
86 | using namespace std;
87 |
88 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/include_fonts.h:
--------------------------------------------------------------------------------
1 | #ifndef INCLUDE_FONTS_H
2 | #define INCLUDE_FONTS_H
3 |
4 | #include "fonts_h/29_NOKIA_5110_FontSet.h"
5 | //#include "fonts_h/54_serif_v01.h"
6 | #include "fonts_h/Commodore_Pixelized_v1_2.h"
7 | #include "fonts_h/serif_v01.h"
8 |
9 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/include_graphics.h:
--------------------------------------------------------------------------------
1 | #ifndef INCLUDE_GRAPHICS_H
2 | #define INCLUDE_GRAPHICS_H
3 |
4 | #include "graphics_h/backgrounds/bg_1.h"
5 | #include "graphics_h/backgrounds/bg_2.h"
6 | #include "graphics_h/backgrounds/bg_3.h"
7 | #include "graphics_h/backgrounds/bg_4.h"
8 | #include "graphics_h/backgrounds/bg_treasure_hut.h"
9 | #include "graphics_h/archer.h"
10 | #include "graphics_h/arrow.h"
11 | #include "graphics_h/arrow_funnyjoke.h"
12 | #include "graphics_h/bm_empty.h"
13 | #include "graphics_h/bm_full.h"
14 | #include "graphics_h/burninate_message_fire.h"
15 | #include "graphics_h/burninate_text.h"
16 | #include "graphics_h/cottage.h"
17 | #include "graphics_h/cottage_fire.h"
18 | #include "graphics_h/death_message.h"
19 | #include "graphics_h/end_of_level_flash.h"
20 | #include "graphics_h/end_of_level_trogdor.h"
21 | #include "graphics_h/game_over_banner.h"
22 | #include "graphics_h/game_over_text.h"
23 | #include "graphics_h/game_over_trogdor.h"
24 | #include "graphics_h/heart.h"
25 | #include "graphics_h/jonathan_howe.h"
26 | #include "graphics_h/kerrek.h"
27 | #include "graphics_h/kerrek_smoked.h"
28 | #include "graphics_h/knight.h"
29 | #include "graphics_h/knight_funnyjoke.h"
30 | #include "graphics_h/level_beaten_smoke.h"
31 | #include "graphics_h/level_beaten_trogdor_scaled.h"
32 | #include "graphics_h/loot.h"
33 | #include "graphics_h/menu_cursor.h"
34 | #if defined(THREEDS) || defined(PSP)
35 | #include "graphics_h/overlays/basement_bottom_240p.h"
36 | #include "graphics_h/overlays/basement_left_240p.h"
37 | #include "graphics_h/overlays/basement_right_240p.h"
38 | #include "graphics_h/overlays/basement_top_240p.h"
39 | #include "graphics_h/overlays/compy_bottom_240p.h"
40 | #include "graphics_h/overlays/compy_left_240p.h"
41 | #include "graphics_h/overlays/compy_right_240p.h"
42 | #include "graphics_h/overlays/compy_top_240p.h"
43 | #include "graphics_h/overlays/strong_badia_bottom_240p.h"
44 | #include "graphics_h/overlays/strong_badia_left_240p.h"
45 | #include "graphics_h/overlays/strong_badia_right_240p.h"
46 | #include "graphics_h/overlays/strong_badia_top_240p.h"
47 | #include "graphics_h/options_menu_240p.h"
48 | #else
49 | #include "graphics_h/overlays/basement_bottom.h"
50 | #include "graphics_h/overlays/basement_left.h"
51 | #include "graphics_h/overlays/basement_right.h"
52 | #include "graphics_h/overlays/basement_top.h"
53 | #include "graphics_h/overlays/compy_bottom.h"
54 | #include "graphics_h/overlays/compy_left.h"
55 | #include "graphics_h/overlays/compy_right.h"
56 | #include "graphics_h/overlays/compy_top.h"
57 | #include "graphics_h/overlays/strong_badia_bottom.h"
58 | #include "graphics_h/overlays/strong_badia_left.h"
59 | #include "graphics_h/overlays/strong_badia_right.h"
60 | #include "graphics_h/overlays/strong_badia_top.h"
61 | #include "graphics_h/options_menu.h"
62 | #endif
63 | #include "graphics_h/peasant.h"
64 | #include "graphics_h/peasantometer.h"
65 | #include "graphics_h/strong_bad.h"
66 | #include "graphics_h/strong_bad_ending.h"
67 | #include "graphics_h/title_screen.h"
68 | #include "graphics_h/trogdor.h"
69 | #include "graphics_h/trogdor_bighead.h"
70 | #include "graphics_h/trogdor_dead.h"
71 | #include "graphics_h/trogdor_ending.h"
72 | #include "graphics_h/trogdor_fire.h"
73 | #include "graphics_h/trogdor_flexing.h"
74 | #include "graphics_h/trogdor_logo.h"
75 | #include "graphics_h/videlectrix_logo_big.h"
76 |
77 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/include_sfx.h:
--------------------------------------------------------------------------------
1 | #ifndef INCLUDE_SFX_H
2 | #define INCLUDE_SFX_H
3 |
4 | #include "sfx_h/burninate.h"
5 | #include "sfx_h/burn_hut.h"
6 | #include "sfx_h/cutscene.h"
7 | #include "sfx_h/death.h"
8 | #include "sfx_h/gameover.h"
9 | #include "sfx_h/kick.h"
10 | #include "sfx_h/sbdooj_short.h"
11 | #include "sfx_h/soundboard_itsover.h"
12 | #include "sfx_h/speedincreased.h"
13 | #include "sfx_h/squish.h"
14 | #include "sfx_h/trogador.h"
15 | #include "sfx_h/trog_arrow.h"
16 | #include "sfx_h/trog_goldget.h"
17 | #include "sfx_h/trog_peasantscream.h"
18 | #include "sfx_h/trog_sb1.h"
19 | #include "sfx_h/trog_sb2.h"
20 | #include "sfx_h/trog_sb3.h"
21 | #include "sfx_h/trog_sb4.h"
22 | #include "sfx_h/trog_sb5.h"
23 | #include "sfx_h/trog_sb6.h"
24 | #include "sfx_h/trog_sb7.h"
25 | #include "sfx_h/trog_sbarch.h"
26 | #include "sfx_h/trog_sbarchend.h"
27 | #include "sfx_h/trog_sbbest.h"
28 | #include "sfx_h/trog_sbdooj.h"
29 | #include "sfx_h/trog_sbgameover.h"
30 | #include "sfx_h/trog_sbkerrek.h"
31 | #include "sfx_h/trog_sblevelbeat.h"
32 | #include "sfx_h/trog_sbscore.h"
33 | #include "sfx_h/trog_sbsecret.h"
34 | #include "sfx_h/trog_sbsquish1.h"
35 | #include "sfx_h/trog_sbsquish2.h"
36 | #include "sfx_h/trog_sbwin.h"
37 | #include "sfx_h/trog_sbwin2.h"
38 | #include "sfx_h/trog_sbworst.h"
39 | #include "sfx_h/trog_sfx2.h"
40 |
41 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/input.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef INPUT_H
4 | #define INPUT_H
5 |
6 | /* SDL Input */
7 | #if !defined(SDL1) && !defined(PSP)
8 | extern SDL_GameController *controller;
9 | #else
10 | extern SDL_Joystick *joystick;
11 | extern Uint8 joystickHat;
12 | #endif
13 |
14 | /* General Input */
15 | extern Uint32 keyInputs;
16 | extern Uint32 heldKeys;
17 | extern Uint32 heldKeys_last;
18 | extern Uint8 heldDirs;
19 | extern Uint8 heldDirs_last;
20 | extern Uint8 heldDirs_kb;
21 | extern Uint8 heldDirs_dpad;
22 | extern Uint8 heldDirs_stick;
23 | extern Sint32 timer_buttonHold;
24 | extern Sint32 timer_buttonHold_repeater;
25 | extern Sint16 controllerAxis_leftStickX;
26 | extern Sint16 controllerAxis_leftStickY;
27 | #if defined(WII)
28 | extern Uint32 wii_keysDown;
29 | extern Uint32 wii_keysUp;
30 | extern expansion_t wii_exp;
31 | #elif defined(GAMECUBE)
32 | extern Uint32 gc_keysDown;
33 | extern Uint32 gc_keysUp;
34 | #endif
35 | #if !(defined(GAMECUBE) || defined(PSP) || defined(XBOX))
36 | extern Sint32 mouseInput_x;
37 | extern Sint32 mouseInput_x_last;
38 | extern Sint32 mouseInput_y;
39 | extern Sint32 mouseInput_y_last;
40 | #endif
41 |
42 | // A/B/X/Y are Xbox-style
43 | constexpr auto INPUT_UP = (1 << 0); // up/w
44 | constexpr auto INPUT_DOWN = (1 << 1); // down/s
45 | constexpr auto INPUT_LEFT = (1 << 2); // left/a
46 | constexpr auto INPUT_RIGHT = (1 << 3); // right/d
47 | constexpr auto INPUT_A = (1 << 4); // z
48 | constexpr auto INPUT_B = (1 << 5); // x
49 | constexpr auto INPUT_X = (1 << 6); // c
50 | constexpr auto INPUT_Y = (1 << 7); // v
51 | constexpr auto INPUT_L = (1 << 8); // q
52 | constexpr auto INPUT_R = (1 << 9); // e
53 | constexpr auto INPUT_START = (1 << 10); // enter
54 | constexpr auto INPUT_SELECT = (1 << 11); // backspace
55 | constexpr auto INPUT_FULLSCREEN = (1 << 12); // f
56 | constexpr auto INPUT_ALL_DIRS = INPUT_UP | INPUT_DOWN | INPUT_LEFT | INPUT_RIGHT;
57 |
58 | #if defined(VITA) || defined(PSP)
59 | #define INPUT_CONFIRM std::string("X")
60 | #elif defined(WII)
61 | #define INPUT_CONFIRM std::string("2")
62 | #elif defined(PC)
63 | #define INPUT_CONFIRM std::string("Z / A")
64 | #else
65 | #define INPUT_CONFIRM std::string("A")
66 | #endif
67 |
68 | #if defined(SWITCH)
69 | #define INPUT_PAUSE std::string("+")
70 | #define INPUT_MISC std::string("-")
71 | #elif defined(GAMECUBE)
72 | #define INPUT_PAUSE std::string("START")
73 | #define INPUT_MISC std::string("Z")
74 | #elif defined(XBOX)
75 | #define INPUT_PAUSE std::string("START")
76 | #define INPUT_MISC std::string("BACK")
77 | #elif defined(WII)
78 | #define INPUT_PAUSE std::string("START")
79 | #define INPUT_MISC std::string("SELECT/Z")
80 | #elif defined(PC)
81 | #define INPUT_PAUSE std::string("ENTER/START")
82 | #define INPUT_MISC std::string("BACK/SELECT")
83 | #else
84 | #define INPUT_PAUSE std::string("START")
85 | #define INPUT_MISC std::string("SELECT")
86 | #endif
87 |
88 | bool keyPressed(Uint16 key);
89 | bool keyHeld(Uint16 button);
90 | void handlePlayerInput();
91 |
92 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/level_data.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef LEVEL_DATA_H
4 | #define LEVEL_DATA_H
5 |
6 | constexpr auto DIR_UP = 1;
7 | constexpr auto DIR_DOWN = 2;
8 | constexpr auto DIR_LEFT = 3;
9 | constexpr auto DIR_RIGHT = 4;
10 |
11 | /*
12 | * Byte 1: Background (1, 2, 3, 4) (default to 1)
13 | * Byte 2: Treasure Hut Index (1, 2, 3, 4, 5, 6) (0 = no treasure hut)
14 | * Byte 3: Cottage #1 Direction (1, 2, 3, 4) (0 = does not exist)
15 | * Bytes 4-5: Cottage #1 X (dstrect.x = OBJ_TO_SCREEN_AT_FRACTION_X(gameWidth, cottage, (VAL+2466)/5000.0))
16 | * Bytes 6-7: Cottage #1 Y (dstrect.y = OBJ_TO_SCREEN_AT_FRACTION_Y(gameHeight, cottage, (VAL+2183)/3600.0))
17 | * ...
18 | * Byte 28: Cottage #6 Direction
19 | * Bytes 29-30: Cottage #6 X
20 | * Bytes 31-32: Cottage #6 Y
21 | */
22 | // negative decimal to Sint16: https://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
23 | const Sint16 levels[33][20] = {
24 | /* 1 */ { 1, 0,
25 | DIR_LEFT, 1585, -666,
26 | DIR_RIGHT, -1813, 291,
27 | 0, 0, 0,
28 | 0, 0, 0,
29 | 0, 0, 0,
30 | 0, 0, 0 },
31 | /* 2 */ { 1, 0,
32 | DIR_DOWN, 1775, -1096,
33 | DIR_DOWN, -1796, -1022,
34 | DIR_UP, -133, 1277,
35 | 0, 0, 0,
36 | 0, 0, 0,
37 | 0, 0, 0 },
38 | /* 3 */ { 1, 0,
39 | DIR_DOWN, 1015, -866,
40 | DIR_DOWN, 1664, -382,
41 | DIR_DOWN, -1044, -955,
42 | DIR_DOWN, -1854, -585,
43 | 0, 0, 0,
44 | 0, 0, 0 },
45 | /* 4 */ { 2, 0,
46 | DIR_RIGHT, -2125, -1046,
47 | DIR_UP, 1904, 538,
48 | DIR_DOWN, -2124, -435,
49 | DIR_LEFT, 1806, 1115,
50 | 0, 0, 0,
51 | 0, 0, 0 },
52 | /* 5 */ { 2, 0,
53 | DIR_RIGHT, -1665, -666,
54 | DIR_UP, 924, -82,
55 | DIR_DOWN, -484, -1095,
56 | DIR_LEFT, 1526, 975,
57 | DIR_UP, -1220, 830,
58 | 0, 0, 0 },
59 | /* 6 */ { 3, 0,
60 | DIR_RIGHT, -2125, -446,
61 | DIR_UP, 384, 1098,
62 | DIR_DOWN, -204, -995,
63 | DIR_LEFT, 1886, -545,
64 | DIR_UP, -740, 1090,
65 | 0, 0, 0 },
66 | /* 7 */ { 3, 3,
67 | DIR_RIGHT, -1236, -942,
68 | DIR_RIGHT, -1205, -346,
69 | DIR_RIGHT, -2034, -45,
70 | DIR_RIGHT, -1200, 270,
71 | DIR_RIGHT, -1204, 885,
72 | 0, 0, 0 },
73 | /* 8 */ { 3, 0,
74 | DIR_RIGHT, -2125, -446,
75 | DIR_DOWN, 904, -862,
76 | DIR_DOWN, -204, -995,
77 | DIR_LEFT, 1886, -545,
78 | DIR_DOWN, -1180, -830,
79 | 0, 0, 0 },
80 | /* 9 */ { 3, 0,
81 | DIR_RIGHT, -2125, -446,
82 | DIR_LEFT, 1886, -545,
83 | DIR_DOWN, 1984, 258,
84 | DIR_DOWN, -1044, -1015,
85 | DIR_DOWN, -2080, 350,
86 | DIR_DOWN, 896, -1035 },
87 | /* 10 */ { 4, 0,
88 | DIR_RIGHT, -2385, -486,
89 | DIR_DOWN, 1784, 258,
90 | DIR_DOWN, -1244, -1215,
91 | DIR_LEFT, 2086, -545,
92 | DIR_DOWN, -1900, 350,
93 | DIR_DOWN, 1096, -1235 },
94 | /* 11 */ { 4, 6,
95 | DIR_RIGHT, -2365, -486,
96 | DIR_LEFT, 1204, 918,
97 | DIR_DOWN, -1084, -1055,
98 | DIR_LEFT, 1526, 135,
99 | DIR_DOWN, -1520, -450,
100 | DIR_UP, 2076, 865 },
101 | /* 12 */ { 4, 0,
102 | DIR_DOWN, -1084, -1055,
103 | DIR_RIGHT, -2025, -346,
104 | DIR_LEFT, 26, -385,
105 | DIR_DOWN, 1760, -1070,
106 | DIR_UP, 1756, 1205,
107 | 0, 0, 0 },
108 | /* 13 */ { 1, 0,
109 | DIR_UP, -2025, 1258,
110 | DIR_UP, 1984, 1258,
111 | DIR_DOWN, -24, -1275,
112 | DIR_UP, 6, 1258,
113 | DIR_DOWN, -2040, -1090,
114 | DIR_DOWN, 1976, -1075 },
115 | /* 14 */ { 1, 0,
116 | DIR_RIGHT, -2125, 453,
117 | DIR_DOWN, 224, -502,
118 | DIR_DOWN, -1244, -1215,
119 | DIR_LEFT, 1946, 1094,
120 | DIR_DOWN, -520, -510,
121 | DIR_DOWN, 1096, -1235 },
122 | /* 15 */ { 1, 0,
123 | DIR_RIGHT, -2125, 833,
124 | DIR_LEFT, 1204, 918,
125 | DIR_DOWN, -2124, -975,
126 | DIR_LEFT, 1526, 135,
127 | DIR_LEFT, 1940, -570,
128 | DIR_UP, 2076, 865 },
129 | /* 16 */ { 2, 3,
130 | DIR_RIGHT, -665, 705,
131 | DIR_UP, 1204, 1178,
132 | DIR_DOWN, -2020, -1010,
133 | DIR_UP, 1916, 1185,
134 | DIR_RIGHT, -633, -989,
135 | DIR_RIGHT, -665, -126 },
136 | /* 17 */ { 2, 0,
137 | DIR_RIGHT, -2205, -926,
138 | DIR_DOWN, 2076, -195,
139 | DIR_LEFT, 1486, 734,
140 | DIR_DOWN, 1360, -1070,
141 | DIR_UP, 796, 1225,
142 | 0, 0, 0 },
143 | /* 18 */ { 3, 0,
144 | DIR_UP, -845, -321,
145 | DIR_RIGHT, -596, 699,
146 | DIR_DOWN, -24, -1275,
147 | DIR_UP, 1106, 319,
148 | DIR_DOWN, -2040, -1090,
149 | DIR_DOWN, 1976, -1075 },
150 | /* 19 */ { 3, 0,
151 | DIR_RIGHT, -2125, -1106,
152 | DIR_DOWN, 1024, 238,
153 | DIR_LEFT, 1926, -1145,
154 | DIR_DOWN, -1020, 270,
155 | 0, 0, 0,
156 | 0, 0, 0 },
157 | /* 20 */ { 4, 0,
158 | DIR_RIGHT, -1345, 853,
159 | DIR_LEFT, 1204, 918,
160 | DIR_UP, -2104, 824,
161 | DIR_LEFT, 1526, 135,
162 | DIR_RIGHT, -2140, 70,
163 | DIR_UP, 2076, 865 },
164 | /* 21 */ { 4, 0,
165 | DIR_RIGHT, -905, -47,
166 | DIR_UP, 1204, 1178,
167 | DIR_DOWN, 1256, -155,
168 | DIR_LEFT, 166, -765,
169 | DIR_DOWN, -2020, -1010,
170 | DIR_UP, 1916, 1185 },
171 | /* 22 */ { 4, 0,
172 | DIR_RIGHT, -1205, -107,
173 | DIR_UP, 1904, 698,
174 | DIR_DOWN, 1896, -815,
175 | DIR_LEFT, -1234, 575,
176 | DIR_DOWN, -1180, -770,
177 | 0, 0, 0 },
178 | /* 23 */ { 1, 0,
179 | DIR_RIGHT, -2245, 1154,
180 | DIR_DOWN, -516, -1042,
181 | DIR_DOWN, 256, -1055,
182 | DIR_LEFT, 1846, 1135,
183 | DIR_DOWN, -1280, -1050,
184 | DIR_DOWN, 996, -1015 },
185 | /* 24 */ { 1, 0,
186 | DIR_RIGHT, -2125, 1074,
187 | DIR_LEFT, 1344, -882,
188 | DIR_DOWN, -1924, -815,
189 | DIR_UP, 1856, 1125,
190 | 0, 0, 0,
191 | 0, 0, 0 },
192 | /* 25 */ { 1, 0,
193 | DIR_RIGHT, -2065, -506,
194 | DIR_DOWN, -1084, -1055,
195 | DIR_LEFT, -314, -505,
196 | DIR_DOWN, 1760, -1070,
197 | DIR_UP, -1084, 685,
198 | 0, 0, 0 },
199 | /* 26 */ { 2, 0,
200 | DIR_UP, -2025, -642,
201 | DIR_UP, 1984, -642,
202 | DIR_DOWN, -1984, -75,
203 | DIR_UP, 6, -642,
204 | DIR_DOWN, 1960, 10,
205 | 0, 0, 0 },
206 | /* 27 */ { 2, 0,
207 | DIR_RIGHT, 1076, 1186,
208 | DIR_DOWN, 224, -502,
209 | DIR_DOWN, -1304, -555,
210 | DIR_LEFT, -1439, 1186,
211 | DIR_DOWN, -520, -510,
212 | DIR_DOWN, 1116, -475 },
213 | /* 28 */ { 3, 0,
214 | DIR_RIGHT, -1236, -942,
215 | DIR_RIGHT, -2225, -346,
216 | DIR_RIGHT, 1386, -45,
217 | DIR_RIGHT, -2240, 390,
218 | DIR_RIGHT, -1244, 1005,
219 | 0, 0, 0 },
220 | /* 29 */ { 3, 0,
221 | DIR_RIGHT, 855, 274,
222 | DIR_DOWN, -1976, 238,
223 | DIR_DOWN, -204, -995,
224 | DIR_LEFT, 1806, 835,
225 | DIR_DOWN, -1100, -350,
226 | 0, 0, 0 },
227 | /* 30 */ { 3, 0,
228 | DIR_LEFT, 1826, 175,
229 | 0, 0, 0,
230 | 0, 0, 0,
231 | 0, 0, 0,
232 | 0, 0, 0,
233 | 0, 0, 0 },
234 | /* 31 */ { 3, 0,
235 | DIR_RIGHT, -2225, -946,
236 | DIR_DOWN, 854, 338, // originally 784
237 | DIR_DOWN, -1104, 345,
238 | DIR_LEFT, 1966, -905,
239 | DIR_DOWN, -1900, 350,
240 | DIR_DOWN, 1606, 325 }, // originally 1536
241 | /* 32 */ { 4, 0,
242 | DIR_RIGHT, -2085, 934,
243 | DIR_LEFT, 1144, -242,
244 | DIR_DOWN, -804, 365,
245 | DIR_LEFT, 1466, -1025,
246 | DIR_DOWN, -1240, 970,
247 | DIR_UP, 2016, -295 },
248 | /* 33 */ { 4, 0,
249 | DIR_LEFT, 305, -886,
250 | DIR_RIGHT, -533, -889,
251 | 0, 0, 0,
252 | 0, 0, 0,
253 | 0, 0, 0,
254 | 0, 0, 0 }
255 | };
256 |
257 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/media_objects_init.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 | #include "text_objects.h"
3 | #include "sprite_objects.h"
4 |
5 | #ifndef MEDIA_OBJECTS_INIT_H
6 | #define MEDIA_OBJECTS_INIT_H
7 |
8 | extern void InitializeFontsAndText();
9 | extern void InitializeText_HomeScreen();
10 | extern void InitializeText_Cutscenes();
11 | extern void InitializeText_PauseScreen();
12 | extern void InitializeText_OptionsMenu(FontObject *);
13 | extern void InitializeMusic();
14 | extern void InitializeSFX();
15 | extern void InitializeSpritesPart1();
16 | extern void InitializeSpritesPart2();
17 | extern void exceptMissingFile(const char *);
18 | extern void destroySprite(SpriteObject);
19 | extern void destroyAllSprites();
20 | extern void destroyTextChars(TextCharObject, Uint8);
21 | extern void destroyAllTextChars();
22 | extern void closeAllFonts();
23 | extern void quickErrorTextRender_1(const char *, double);
24 | extern void quickErrorTextRender_2(const char *, double);
25 | extern void HandleErrorText(const char *);
26 |
27 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/on_open_and_close.cpp:
--------------------------------------------------------------------------------
1 | #include "on_open_and_close.h"
2 | #include "config.h"
3 | #include "window.h"
4 | #include "sound_logic.h"
5 | #include "input.h"
6 | #include "general.h"
7 | #include "sprite_objects.h"
8 | #include "media_objects_init.h"
9 |
10 | void InitializeDisplay() {
11 | #if !defined(SDL1)
12 | SDL_GetCurrentDisplayMode(0, &DM);
13 | displayRefreshRate = DM.refresh_rate;
14 | #elif defined(THREEDS)
15 | displayRefreshRate = 30;
16 | #else
17 | displayRefreshRate = 60;
18 | #endif
19 | #if defined(ANDROID)
20 | SDL_SetHint(SDL_HINT_ORIENTATIONS, "Landscape");
21 | #endif
22 | appSrcRect = { 0, 0, appWidth, appHeight };
23 | ticksPerFrameDefault = 1000.0F / frameRate;
24 | ticksPerFrame = ticksPerFrameDefault;
25 | ticksPerFrameInt = (Uint32)ticksPerFrame;
26 | setWidthHeightMults();
27 |
28 | /* Set Window/Renderer */
29 |
30 |
31 | #if defined(SDL1)
32 | SDL_WM_SetCaption("Trogdor: Reburninated", NULL);
33 | #if defined(PC)
34 | SDL_putenv("SDL_VIDEO_WINDOW_POS=center");
35 | windowScreen = SDL_SetVideoMode(DEFAULT_WIDTH, DEFAULT_HEIGHT, 0, SDL_HWSURFACE | SDL_DOUBLEBUF);
36 | #else
37 | #if defined(WII)
38 | if (frameRate <= 25) {
39 | DEFAULT_WIDTH = 640;
40 | DEFAULT_HEIGHT = 480;
41 | }
42 | else {
43 | DEFAULT_WIDTH = 320;
44 | DEFAULT_HEIGHT = 240;
45 | }
46 | #endif
47 | windowScreen = SDL_SetVideoMode(DEFAULT_WIDTH, DEFAULT_HEIGHT, 24, SDL_DOUBLEBUF);
48 | #endif
49 | #else
50 | #if defined(PSP)
51 | window = SDL_CreateWindow("Trogdor: Reburninated", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, DEFAULT_WIDTH, DEFAULT_HEIGHT, SDL_WINDOW_SHOWN);
52 | #elif defined(PC)
53 | window = SDL_CreateWindow("Trogdor: Reburninated", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, DEFAULT_WIDTH, DEFAULT_HEIGHT, SDL_WINDOW_RESIZABLE);
54 | #else
55 | window = SDL_CreateWindow("Trogdor: Reburninated", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);
56 | #endif
57 | renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
58 | SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
59 | #endif
60 | setScaling();
61 | }
62 |
63 | void InitializeSound() {
64 | #if defined(PSP)
65 | oslInitAudio();
66 | #elif defined(XBOX)
67 | #else
68 | //if (Mix_OpenAudio(5513, MIX_DEFAULT_FORMAT, 2, 2048) < 0) {
69 | if (Mix_OpenAudio(AUDIO_SAMPLE_RATE, AUDIO_TROG_FORMAT, 2, 2048) < 0) {
70 | #if !defined(SDL1) && !defined(ANDROID)
71 | SDL_Log(Mix_GetError());
72 | #endif
73 | }
74 | setVolume_music(gameState.settings_general.bgmVolume);
75 | Mix_AllocateChannels(NUM_SOUND_CHANNELS);
76 | Mix_Volume(SFX_CHANNEL_GAME, (int)(gameState.settings_general.sfxVolume * 128.0 / 100));
77 | Mix_Volume(SFX_CHANNEL_STRONG_BAD, (int)(gameState.settings_general.sfxVolume * 128.0 / 100));
78 | #endif
79 | }
80 |
81 | void InitializeController() {
82 | #if defined(SDL1) // also applies to PSP SDL1
83 | SDL_JoystickEventState(SDL_ENABLE);
84 | joystick = SDL_JoystickOpen(0);
85 | SDL_JoystickEventState(SDL_ENABLE);
86 | #elif defined(PSP)
87 | SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
88 | joystick = SDL_JoystickOpen(0);
89 | #else
90 | for (i = 0; i < SDL_NumJoysticks(); i++) {
91 | if (SDL_IsGameController(i)) {
92 | controller = SDL_GameControllerOpen(i);
93 | break;
94 | }
95 | }
96 | #endif
97 | }
98 |
99 | void renderBackground() {
100 | outputRect = sprite_level_background->dstrect;
101 | outputRect.x = (Sint16)(outputRect.x * screenScale) + gameToWindowDstRect.x;
102 | outputRect.y = (Sint16)(outputRect.y * screenScale) + gameToWindowDstRect.y;
103 | outputRect.w = (int)(outputRect.w * screenScale);
104 | outputRect.h = (int)(outputRect.h * screenScale);
105 | #if !defined(SDL1)
106 | SDL_RenderCopy(renderer, sprite_level_background->sub[0][0].texture, NULL, &outputRect);
107 | #else
108 | SDL_BlitSurface(sprite_level_background->sub[0][0].surface, NULL, windowScreen, &outputRect);
109 | #endif
110 | }
111 |
112 | void renderTransparentForeground() {
113 | #if !defined(THREEDS)
114 | outputRect = gameToWindowDstRect;
115 | #if !defined(SDL1)
116 | SDL_SetRenderDrawColor(renderer, 0, 0, 0, 200);
117 | SDL_RenderFillRect(renderer, &outputRect);
118 | #else
119 | SDL_BlitSurface(transparentScreen, NULL, windowScreen, &outputRect);
120 | #endif
121 | #endif
122 | }
123 |
124 | void closeController() {
125 | #if defined(PSP)
126 | SDL_JoystickClose(joystick);
127 | #elif defined(SDL1)
128 | if (SDL_JoystickOpened(0)) {
129 | SDL_JoystickClose(joystick);
130 | }
131 | #else
132 | if (controller != NULL) {
133 | SDL_GameControllerClose(controller);
134 | }
135 | #endif
136 | }
137 |
138 | void destroyDisplay() {
139 | #if !defined(SDL1)
140 | SDL_DestroyRenderer(renderer);
141 | SDL_DestroyWindow(window);
142 | #else
143 | SDL_FreeSurface(windowScreen);
144 | #endif
145 | }
146 |
147 | void DestroyAll() {
148 | /* Surfaces */
149 | destroyAllSprites();
150 | /* Text Chars */
151 | destroyAllTextChars();
152 | /* Sound */
153 | for (i = 0; i < NUM_SOUND_EFFECTS_SFX; i++) {
154 | if (sfxArr[i]->chunk != NULL) {
155 | #if defined(PSP)
156 | oslDeleteSound(sfxArr[i]->chunk);
157 | #elif defined(XBOX)
158 | #else
159 | Mix_FreeChunk(sfxArr[i]->chunk);
160 | #endif
161 | }
162 | }
163 | for (i = 0; i < NUM_SOUND_EFFECTS_STRONG_BAD; i++) {
164 | if (sfxArr_strongBad[i]->chunk != NULL) {
165 | #if defined(PSP)
166 | oslDeleteSound(sfxArr_strongBad[i]->chunk);
167 | #elif defined(XBOX)
168 | #else
169 | Mix_FreeChunk(sfxArr_strongBad[i]->chunk);
170 | #endif
171 | }
172 | }
173 | #if defined(PSP)
174 | if (bgm != NULL) {
175 | oslDeleteSound(bgm);
176 | }
177 | oslDeinitAudio();
178 | #elif defined(XBOX)
179 | #else
180 | Mix_HaltMusic();
181 | //Mix_FreeMusic(bgm);
182 | Mix_CloseAudio();
183 | #if !(defined(WII) || defined(GAMECUBE))
184 | Mix_Quit();
185 | #endif
186 | #endif
187 | /* Controller */
188 | closeController();
189 | /* Renderer/Screen and Window */
190 | destroyDisplay();
191 | SDL_Quit();
192 | systemSpecificClose();
193 | }
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/on_open_and_close.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef ON_OPEN_AND_CLOSE_H
4 | #define ON_OPEN_AND_CLOSE_H
5 |
6 | void InitializeDisplay();
7 | void InitializeSound();
8 | void InitializeController();
9 | void renderBackground();
10 | void renderTransparentForeground();
11 | void closeController();
12 | void destroyDisplay();
13 | void DestroyAll();
14 |
15 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/burn_hut.h:
--------------------------------------------------------------------------------
1 | extern unsigned char burn_hut_wav[];
2 | extern unsigned int burn_hut_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/burninate.h:
--------------------------------------------------------------------------------
1 | extern unsigned char burninate_wav[];
2 | extern unsigned int burninate_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/cutscene.h:
--------------------------------------------------------------------------------
1 | extern unsigned char cutscene_wav[];
2 | extern unsigned int cutscene_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/death.h:
--------------------------------------------------------------------------------
1 | extern unsigned char death_wav[];
2 | extern unsigned int death_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/gameover.h:
--------------------------------------------------------------------------------
1 | extern unsigned char gameover_wav[];
2 | extern unsigned int gameover_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/kick.h:
--------------------------------------------------------------------------------
1 | extern unsigned char kick_wav[];
2 | extern unsigned int kick_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/sbdooj_short.h:
--------------------------------------------------------------------------------
1 | extern unsigned char sbdooj_short_wav[];
2 | extern unsigned int sbdooj_short_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/soundboard_itsover.h:
--------------------------------------------------------------------------------
1 | extern unsigned char soundboard_itsover_wav[];
2 | extern unsigned int soundboard_itsover_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/speedincreased.h:
--------------------------------------------------------------------------------
1 | extern unsigned char speedincreased_wav[];
2 | extern unsigned int speedincreased_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/squish.h:
--------------------------------------------------------------------------------
1 | extern unsigned char squish_wav[];
2 | extern unsigned int squish_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_arrow.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_arrow_wav[];
2 | extern unsigned int trog_arrow_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_goldget.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_goldget_wav[];
2 | extern unsigned int trog_goldget_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_peasantscream.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_peasantscream_wav[];
2 | extern unsigned int trog_peasantscream_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb1.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb1_wav[];
2 | extern unsigned int trog_sb1_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb2_wav[];
2 | extern unsigned int trog_sb2_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb3.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb3_wav[];
2 | extern unsigned int trog_sb3_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb4.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb4_wav[];
2 | extern unsigned int trog_sb4_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb5.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb5_wav[];
2 | extern unsigned int trog_sb5_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb6.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb6_wav[];
2 | extern unsigned int trog_sb6_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sb7.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sb7_wav[];
2 | extern unsigned int trog_sb7_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbarch.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbarch_wav[];
2 | extern unsigned int trog_sbarch_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbarchend.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbarchend_wav[];
2 | extern unsigned int trog_sbarchend_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbbest.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbbest_wav[];
2 | extern unsigned int trog_sbbest_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbdooj.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbdooj_wav[];
2 | extern unsigned int trog_sbdooj_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbgameover.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbgameover_wav[];
2 | extern unsigned int trog_sbgameover_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbkerrek.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbkerrek_wav[];
2 | extern unsigned int trog_sbkerrek_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sblevelbeat.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sblevelbeat_wav[];
2 | extern unsigned int trog_sblevelbeat_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbscore.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbscore_wav[];
2 | extern unsigned int trog_sbscore_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbsecret.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbsecret_wav[];
2 | extern unsigned int trog_sbsecret_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbsquish1.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbsquish1_wav[];
2 | extern unsigned int trog_sbsquish1_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbsquish2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbsquish2_wav[];
2 | extern unsigned int trog_sbsquish2_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbwin.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbwin_wav[];
2 | extern unsigned int trog_sbwin_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbwin2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbwin2_wav[];
2 | extern unsigned int trog_sbwin2_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sbworst.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sbworst_wav[];
2 | extern unsigned int trog_sbworst_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trog_sfx2.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trog_sfx2_wav[];
2 | extern unsigned int trog_sfx2_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sfx_h/trogador.h:
--------------------------------------------------------------------------------
1 | extern unsigned char trogador_wav[];
2 | extern unsigned int trogador_wav_len;
3 |
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sound_logic.cpp:
--------------------------------------------------------------------------------
1 | #include "sound_logic.h"
2 | #include "config.h"
3 | #include "general.h"
4 |
5 | bool sfxShouldBePlaying = false;
6 | Uint8 sfxIndex = 0;
7 | SoundEffect *sfxChannelArr[NUM_SOUND_CHANNELS_SFX] = { NULL, NULL, NULL, NULL, NULL, NULL };
8 | //SoundEffect *sfxChannel_gameMusic = NULL;
9 | SoundEffect *sfxChannel_strongBad = NULL;
10 |
11 | #if defined(PSP)
12 | #define LOAD_MUSIC(path) oslLoadSoundFile((rootDir + path).c_str(), OSL_FMT_STREAM)
13 | #define STOP_MUSIC() oslStopSound(bgm)
14 | #define FREE_MUSIC() oslDeleteSound(bgm); bgm = NULL;
15 | #define PAUSE_MUSIC() oslPauseSound(bgm, 1)
16 | #define RESUME_MUSIC() oslPauseSound(bgm, 0)
17 | #define FADE_MUSIC(ms) STOP_MUSIC()
18 | #define LOAD_SFX(sfx) oslLoadSoundFile((rootDir + sfx->path).c_str(), OSL_FMT_NONE)
19 | #define PLAY_SFX(sfx, channel) oslPlaySound(sfx->chunk, channel)
20 | #define FREE_SFX(sfx) oslDeleteSound(sfx->chunk)
21 | #define SET_VOLUME_MUSIC(vol) bgm->volumeLeft = bgm->volumeRight = ((vol * OSL_VOLUME_MAX) / 100)
22 | #define MUSIC_IS_PLAYING() (bgm != NULL)
23 | #elif defined(XBOX)
24 | #define LOAD_MUSIC(path) NULL
25 | #define STOP_MUSIC() NULL
26 | #define FREE_MUSIC() NULL
27 | #define PAUSE_MUSIC() NULL
28 | #define RESUME_MUSIC() NULL
29 | #define FADE_MUSIC(ms) NULL
30 | #define LOAD_SFX(sfx) NULL
31 | #define PLAY_SFX(sfx, channel) NULL
32 | #define FREE_SFX(sfx) NULL
33 | #define SET_VOLUME_MUSIC(vol) NULL
34 | #define MUSIC_IS_PLAYING() NULL
35 | #else
36 | #define LOAD_MUSIC(path) Mix_LoadMUS((rootDir + path).c_str())
37 | #define STOP_MUSIC() Mix_HaltMusic()
38 | #define FREE_MUSIC() Mix_FreeMusic(bgm); bgm = NULL;
39 | #define PAUSE_MUSIC() Mix_PauseMusic()
40 | #define RESUME_MUSIC() Mix_ResumeMusic()
41 | #define FADE_MUSIC(ms) Mix_FadeOutMusic(ms)
42 | //#define LOAD_SFX(sfx) Mix_QuickLoad_RAW(sfx->data, sfx->len)
43 | #define LOAD_SFX(sfx) Mix_LoadWAV((rootDir + sfx->path).c_str())
44 | #define PLAY_SFX(sfx, channel) Mix_PlayChannel(channel, sfx->chunk, 0)
45 | #define FREE_SFX(sfx) Mix_FreeChunk(sfx->chunk)
46 | #define SET_VOLUME_MUSIC(vol) Mix_VolumeMusic(vol * 128 / 100)
47 | #define MUSIC_IS_PLAYING() Mix_PlayingMusic()
48 | #endif
49 |
50 | void playMusic(const char *musicRelPath, bool loop, Uint8 vol) {
51 | if (MUSIC_IS_PLAYING()) {
52 | stopMusic();
53 | }
54 | bgm = LOAD_MUSIC(musicRelPath);
55 | #if defined(PSP)
56 | if (loop) {
57 | oslSetSoundLoop(bgm, true);
58 | }
59 | oslPlaySound(bgm, SFX_CHANNEL_GAME_MUSIC);
60 | setVolume_music(vol);
61 | #elif defined(XBOX)
62 | #else
63 | setVolume_music(vol);
64 | if (loop) {
65 | Mix_PlayMusic(bgm, -1);
66 | } else {
67 | Mix_PlayMusic(bgm, 1);
68 | }
69 | #endif
70 | }
71 |
72 | void stopMusic() {
73 | if (MUSIC_IS_PLAYING()) {
74 | STOP_MUSIC();
75 | #if !(defined(PSP) || defined(THREEDS))
76 | FREE_MUSIC();
77 | #endif
78 | }
79 | }
80 |
81 | void pauseMusic() {
82 | if (MUSIC_IS_PLAYING()) {
83 | PAUSE_MUSIC();
84 | }
85 | }
86 |
87 | void resumeMusic() {
88 | if (MUSIC_IS_PLAYING()) {
89 | RESUME_MUSIC();
90 | }
91 | }
92 |
93 | void fadeMusic(Uint16 ms) {
94 | if (MUSIC_IS_PLAYING()) {
95 | FADE_MUSIC(ms);
96 | }
97 | }
98 |
99 | Uint8 loadAndPlaySound(SoundEffect *sfx) {
100 | if (!sfx->isPlaying) {
101 | if (!sfx->isStatic) {
102 | sfx->chunk = LOAD_SFX(sfx);
103 | }
104 | sfx->isPlaying = true;
105 | }
106 | if (sfx->type == 0) {
107 | #if defined(PSP)
108 | sfxIndex = (sfxIndex + 1) % SFX_CHANNEL_GAME_MUSIC;
109 | PLAY_SFX(sfx, sfxIndex);
110 | #elif defined(XBOX)
111 | sfxIndex = 0;
112 | #else
113 | sfxIndex = PLAY_SFX(sfx, SFX_CHANNEL_GAME);
114 | #endif
115 | sfxChannelArr[sfxIndex] = sfx;
116 | return sfxIndex;
117 | } else {
118 | PLAY_SFX(sfx, SFX_CHANNEL_STRONG_BAD);
119 | sfxChannel_strongBad = sfx;
120 | return SFX_CHANNEL_STRONG_BAD;
121 | }
122 | }
123 |
124 | void makeSoundStatic(SoundEffect *sfx) {
125 | if (!sfx->isStatic) {
126 | sfx->isStatic = true;
127 | sfx->chunk = LOAD_SFX(sfx);
128 | }
129 | }
130 |
131 | void freeFinishedSoundChunks() {
132 | for (sfxIndex = 0; sfxIndex < NUM_SOUND_CHANNELS_SFX; sfxIndex++) {
133 | if (sfxChannelArr[sfxIndex] != NULL) {
134 | #if defined(PSP)
135 | if (oslGetSoundChannel(sfxChannelArr[sfxIndex]->chunk) < 0) {
136 | #elif defined(XBOX)
137 | if (false) {
138 | #else
139 | if (!Mix_Playing(sfxIndex)) {
140 | #endif
141 | sfxChannelArr[sfxIndex] = NULL;
142 | }
143 | }
144 | }
145 | if (sfxChannel_strongBad != NULL) {
146 | #if defined(PSP)
147 | if (oslGetSoundChannel(sfxChannel_strongBad->chunk) < 0) {
148 | #elif defined(XBOX)
149 | if (false) {
150 | #else
151 | if (!Mix_Playing(SFX_CHANNEL_STRONG_BAD)) {
152 | #endif
153 | sfxChannel_strongBad = NULL;
154 | }
155 | }
156 | for (sfxIndex = 0; sfxIndex < NUM_SOUND_EFFECTS_SFX; sfxIndex++) {
157 | if (sfxArr[sfxIndex]->isPlaying) {
158 | sfxShouldBePlaying = false;
159 | for (j = 0; j < NUM_SOUND_CHANNELS_SFX; j++) {
160 | if (sfxArr[sfxIndex] == sfxChannelArr[j]) {
161 | sfxShouldBePlaying = true;
162 | break;
163 | }
164 | }
165 | if (!sfxShouldBePlaying) {
166 | if (!sfxArr[sfxIndex]->isStatic) {
167 | FREE_SFX(sfxArr[sfxIndex]);
168 | sfxArr[sfxIndex]->chunk = NULL;
169 | }
170 | sfxArr[sfxIndex]->isPlaying = false;
171 | }
172 | }
173 | }
174 | for (sfxIndex = 0; sfxIndex < NUM_SOUND_EFFECTS_STRONG_BAD; sfxIndex++) {
175 | if (sfxArr_strongBad[sfxIndex]->isPlaying) {
176 | sfxShouldBePlaying = false;
177 | if (sfxArr_strongBad[sfxIndex] != sfxChannel_strongBad) {
178 | if (!sfxArr_strongBad[sfxIndex]->isStatic) {
179 | FREE_SFX(sfxArr_strongBad[sfxIndex]);
180 | sfxArr_strongBad[sfxIndex]->chunk = NULL;
181 | }
182 | sfxArr_strongBad[sfxIndex]->isPlaying = false;
183 | }
184 | }
185 | }
186 | }
187 |
188 | void setVolume_music(Uint8 vol) {
189 | #if defined(PSP)
190 | if (MUSIC_IS_PLAYING()) {
191 | SET_VOLUME_MUSIC(vol);
192 | }
193 | #else
194 | SET_VOLUME_MUSIC(vol);
195 | #endif
196 | }
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/sound_logic.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 |
3 | #ifndef SOUND_LOGIC_H
4 | #define SOUND_LOGIC_H
5 |
6 | constexpr auto NUM_SOUND_EFFECTS_SFX = 13; // hardcoded; change this as more sound effects are added
7 | //constexpr auto NUM_SOUND_EFFECTS_GAMEMUSIC = 0;
8 | constexpr auto NUM_SOUND_EFFECTS_STRONG_BAD = 23;
9 | constexpr auto NUM_SOUND_CHANNELS = 8;
10 | constexpr auto NUM_SOUND_CHANNELS_SFX = NUM_SOUND_CHANNELS - 2;
11 | constexpr auto SFX_CHANNEL_GAME = -1; // any free channel
12 | constexpr auto SFX_CHANNEL_GAME_MUSIC = NUM_SOUND_CHANNELS - 2;
13 | constexpr auto SFX_CHANNEL_STRONG_BAD = NUM_SOUND_CHANNELS - 1; // highest channel
14 |
15 | #if defined(PSP)
16 | constexpr auto MUSIC_TITLE_SCREEN = "music/title_screen.bgm";
17 | constexpr auto MUSIC_MENU = "music/menu.bgm";
18 | constexpr auto MUSIC_ENDING_1 = "music/ending_1.bgm";
19 | constexpr auto MUSIC_ENDING_2 = "music/ending_2.bgm";
20 | constexpr auto MUSIC_STINKOMAN_DAY = "music/stinkoman_level_1.bgm";
21 | constexpr auto MUSIC_STINKOMAN_EVENING = "music/stinkoman_level_2.bgm";
22 | constexpr auto MUSIC_STINKOMAN_NIGHT = "music/stinkoman_level_5.bgm";
23 | constexpr auto MUSIC_STINKOMAN_DAWN = "music/stinkoman_level_6.bgm";
24 | constexpr auto MUSIC_STINKOMAN_MIDPOINT = "music/stinkoman_level_9.bgm";
25 | constexpr auto MUSIC_STINKOMAN_LAST_10 = "music/stinkoman_level_10.bgm";
26 | constexpr auto MUSIC_STINKOMAN_BOSS = "music/stinkoman_boss_fight.bgm";
27 | constexpr auto MUSIC_STINKOMAN_HOMESTRETCH = "music/stinkoman_z_sabre.bgm";
28 | constexpr auto MUSIC_STINKOMAN_FINAL_BOSS = "music/stinkoman_mecha_trogador.bgm";
29 | #elif defined(THREEDS) // an old 3DS can already barely keep up without needing to decompress OGG
30 | constexpr auto MUSIC_TITLE_SCREEN = "music/title_screen.wav";
31 | constexpr auto MUSIC_MENU = "music/menu.wav";
32 | constexpr auto MUSIC_ENDING_1 = "music/ending_1.wav";
33 | constexpr auto MUSIC_ENDING_2 = "music/ending_2.wav";
34 | constexpr auto MUSIC_STINKOMAN_DAY = "music/stinkoman_level_1.wav";
35 | constexpr auto MUSIC_STINKOMAN_EVENING = "music/stinkoman_level_2.wav";
36 | constexpr auto MUSIC_STINKOMAN_NIGHT = "music/stinkoman_level_5.wav";
37 | constexpr auto MUSIC_STINKOMAN_DAWN = "music/stinkoman_level_6.wav";
38 | constexpr auto MUSIC_STINKOMAN_MIDPOINT = "music/stinkoman_level_9.wav";
39 | constexpr auto MUSIC_STINKOMAN_LAST_10 = "music/stinkoman_level_10.wav";
40 | constexpr auto MUSIC_STINKOMAN_BOSS = "music/stinkoman_boss_fight.wav";
41 | constexpr auto MUSIC_STINKOMAN_HOMESTRETCH = "music/stinkoman_z_sabre.wav";
42 | constexpr auto MUSIC_STINKOMAN_FINAL_BOSS = "music/stinkoman_mecha_trogador.wav";
43 | #else
44 | constexpr auto MUSIC_TITLE_SCREEN = "music/title_screen.ogg";
45 | constexpr auto MUSIC_MENU = "music/menu.ogg";
46 | constexpr auto MUSIC_ENDING_1 = "music/ending_1.ogg";
47 | constexpr auto MUSIC_ENDING_2 = "music/ending_2.ogg";
48 | constexpr auto MUSIC_STINKOMAN_DAY = "music/stinkoman_level_1.ogg";
49 | constexpr auto MUSIC_STINKOMAN_EVENING = "music/stinkoman_level_2.ogg";
50 | constexpr auto MUSIC_STINKOMAN_NIGHT = "music/stinkoman_level_5.ogg";
51 | constexpr auto MUSIC_STINKOMAN_DAWN = "music/stinkoman_level_6.ogg";
52 | constexpr auto MUSIC_STINKOMAN_MIDPOINT = "music/stinkoman_level_9.ogg";
53 | constexpr auto MUSIC_STINKOMAN_LAST_10 = "music/stinkoman_level_10.ogg";
54 | constexpr auto MUSIC_STINKOMAN_BOSS = "music/stinkoman_boss_fight.ogg";
55 | constexpr auto MUSIC_STINKOMAN_HOMESTRETCH = "music/stinkoman_z_sabre.ogg";
56 | constexpr auto MUSIC_STINKOMAN_FINAL_BOSS = "music/stinkoman_mecha_trogador.ogg";
57 | #endif
58 |
59 | struct SoundEffect {
60 | bool isPlaying = false;
61 | Uint8 type = 0;
62 | bool isStatic = false;
63 | const char *path;
64 | //unsigned char *data;
65 | //unsigned int len;
66 | #if defined(PSP)
67 | OSL_SOUND *chunk;
68 | #elif defined(XBOX)
69 | int *chunk;
70 | #else
71 | Mix_Chunk *chunk;
72 | #endif
73 | };
74 |
75 | #if defined(PSP)
76 | extern OSL_SOUND *bgm;
77 | #elif defined(XBOX)
78 | extern int *bgm;
79 | #else
80 | extern Mix_Music *bgm;
81 | #endif
82 | extern bool sfxShouldBePlaying;
83 | extern Uint8 sfxIndex;
84 | extern SoundEffect *sfxArr[NUM_SOUND_EFFECTS_SFX];
85 | extern SoundEffect *sfxChannelArr[NUM_SOUND_CHANNELS_SFX];
86 | //extern SoundEffect *sfxArr_gameMusic[NUM_SOUND_EFFECTS_GAMEMUSIC];
87 | //extern SoundEffect *sfxChannel_gameMusic;
88 | extern SoundEffect *sfxArr_strongBad[NUM_SOUND_EFFECTS_STRONG_BAD];
89 | extern SoundEffect *sfxChannel_strongBad;
90 |
91 | extern void playMusic(const char *, bool, Uint8);
92 | extern void stopMusic();
93 | extern void pauseMusic();
94 | extern void resumeMusic();
95 | extern void fadeMusic(Uint16);
96 | extern Uint8 loadAndPlaySound(SoundEffect *);
97 | extern void makeSoundStatic(SoundEffect *);
98 | extern void freeFinishedSoundChunks();
99 | extern void setVolume_music(Uint8);
100 |
101 | #define SFX_BURN_HUT sfxArr[0]
102 | #define SFX_GOLDGET sfxArr[1]
103 | #define SFX_PEASANTSCREAM sfxArr[2]
104 | #define SFX_SFX2 sfxArr[3]
105 | #define SFX_TROGADOR sfxArr[4]
106 | #define SFX_ARROW sfxArr[5]
107 | #define SFX_SQUISH sfxArr[6]
108 | #define SFX_DEATH sfxArr[7]
109 | #define SFX_KICK sfxArr[8]
110 | #define SFX_BURNINATE sfxArr[9]
111 | #define SFX_CUTSCENE sfxArr[10]
112 | #define SFX_GAMEOVER sfxArr[11]
113 | #define SFX_SPEEDINCREASED sfxArr[12]
114 | #define SFX_SB1 sfxArr_strongBad[0]
115 | #define SFX_SB2 sfxArr_strongBad[1]
116 | #define SFX_SB3 sfxArr_strongBad[2]
117 | #define SFX_SB4 sfxArr_strongBad[3]
118 | #define SFX_SB5 sfxArr_strongBad[4]
119 | #define SFX_SB6 sfxArr_strongBad[5]
120 | #define SFX_SB7 sfxArr_strongBad[6]
121 | #define SFX_SBARCH sfxArr_strongBad[7]
122 | #define SFX_SBARCHEND sfxArr_strongBad[8]
123 | #define SFX_SBBEST sfxArr_strongBad[9]
124 | #define SFX_SBDOOJ sfxArr_strongBad[10]
125 | #define SFX_SBGAMEOVER sfxArr_strongBad[11]
126 | #define SFX_SBKERREK sfxArr_strongBad[12]
127 | #define SFX_SBLEVELBEAT sfxArr_strongBad[13]
128 | #define SFX_SBSCORE sfxArr_strongBad[14]
129 | #define SFX_SBSECRET sfxArr_strongBad[15]
130 | #define SFX_SBSQUISH1 sfxArr_strongBad[16]
131 | #define SFX_SBSQUISH2 sfxArr_strongBad[17]
132 | #define SFX_SBWIN sfxArr_strongBad[18]
133 | #define SFX_SBWIN2 sfxArr_strongBad[19]
134 | #define SFX_SBWORST sfxArr_strongBad[20]
135 | #define SFX_SBDOOJ_SHORT sfxArr_strongBad[21]
136 | #define SFX_ITSOVER sfxArr_strongBad[22]
137 | extern SoundEffect sfx_burn_hut;
138 | extern SoundEffect sfx_goldget;
139 | extern SoundEffect sfx_peasantscream;
140 | extern SoundEffect sfx_sb1;
141 | extern SoundEffect sfx_sb2;
142 | extern SoundEffect sfx_sb3;
143 | extern SoundEffect sfx_sb4;
144 | extern SoundEffect sfx_sb5;
145 | extern SoundEffect sfx_sb6;
146 | extern SoundEffect sfx_sb7;
147 | extern SoundEffect sfx_sbarch;
148 | extern SoundEffect sfx_sbarchend;
149 | extern SoundEffect sfx_sbbest;
150 | extern SoundEffect sfx_sbdooj;
151 | extern SoundEffect sfx_sbgameover;
152 | extern SoundEffect sfx_sbkerrek;
153 | extern SoundEffect sfx_sblevelbeat;
154 | extern SoundEffect sfx_sbscore;
155 | extern SoundEffect sfx_sbsecret;
156 | extern SoundEffect sfx_sbsquish1;
157 | extern SoundEffect sfx_sbsquish2;
158 | extern SoundEffect sfx_sbwin;
159 | extern SoundEffect sfx_sbwin2;
160 | extern SoundEffect sfx_sbworst;
161 | extern SoundEffect sfx_sfx2;
162 | extern SoundEffect sfx_trogador;
163 | extern SoundEffect sfx_arrow;
164 | extern SoundEffect sfx_squish;
165 | extern SoundEffect sfx_death;
166 | extern SoundEffect sfx_kick;
167 | extern SoundEffect sfx_burninate;
168 | extern SoundEffect sfx_cutscene;
169 | extern SoundEffect sfx_gameover;
170 | extern SoundEffect sfx_speedincreased;
171 | extern SoundEffect sfx_sbdooj_short;
172 | extern SoundEffect sfx_itsover;
173 |
174 | #endif
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/text_objects.cpp:
--------------------------------------------------------------------------------
1 | #include "text_objects.h"
2 | #include "general.h"
3 | #include "window.h"
4 | #include "config.h"
5 |
6 | char tempCharArray[64];
7 | Uint8 charCounter;
8 | Sint16 charWidthCounter;
9 |
10 | char tempChar[2] = { '\0', '\0' };
11 | #if !defined(SDL1)
12 | SDL_Surface *temp_text;
13 | #endif
14 |
15 | void setText(std::string text, TextObject *textObj, FontObject *fontObj) {
16 | textObj->str = text;
17 | STRCPY(tempCharArray, textObj->str.c_str());
18 | textObj->dstrect.w = 0;
19 | textObj->dstrect.h = 0;
20 | for (uint_i = 0; uint_i < textObj->str.length(); uint_i++) {
21 | i = tempCharArray[uint_i] - 32;
22 | #if !defined(SDL1)
23 | if (fontObj->textChars[i].texture == NULL) {
24 | #else
25 | if (fontObj->textChars[i].surface == NULL) {
26 | #endif
27 | tempChar[0] = i + 32;
28 | setTextChar(tempChar, fontObj->font, fontObj->color, &fontObj->textChars[i]);
29 | }
30 | textObj->dstrect.w += fontObj->textChars[i].dstrect.w;
31 | textObj->dstrect.h = max(textObj->dstrect.h, (Sint16)fontObj->textChars[i].dstrect.h);
32 | }
33 | }
34 |
35 | void setTextPos(TextObject *textObj, Sint16 pos_x, Sint16 pos_y) {
36 | textObj->dstrect.x = pos_x;
37 | textObj->dstrect.y = pos_y;
38 | }
39 |
40 | void updateText(TextObject *textObj, string text) {
41 | textObj->str = text;
42 | }
43 |
44 | void setTextChar(const char *text, TTF_Font *font, SDL_Color text_color, TextCharObject *textCharObj) {
45 | #if !defined(SDL1)
46 | #if !defined(PSP)
47 | temp_text = TTF_RenderText_Solid(font, text, text_color);
48 | #else
49 | if (int(text[0]) != 32) {
50 | temp_text = TTF_RenderUTF8_Blended(font, text, text_color);
51 | } else {
52 | temp_text = TTF_RenderUTF8_Blended(font, "", text_color);
53 | }
54 | #endif
55 | textCharObj->texture = SDL_CreateTextureFromSurface(renderer, temp_text);
56 | SDL_FreeSurface(temp_text);
57 | #else
58 | textCharObj->surface = TTF_RenderText_Solid(font, text, text_color);
59 | #endif
60 | TTF_SizeText(font, text, &charTempX, &charTempY);
61 | textCharObj->dstrect.w = charTempX;
62 | textCharObj->dstrect.h = charTempY;
63 | }
64 |
65 | void renderTextChar(TextCharObject textCharObj) {
66 | outputRect = textCharObj.dstrect;
67 | outputRect.x += gameToWindowDstRect.x;
68 | outputRect.y += gameToWindowDstRect.y;
69 | #if !defined(SDL1)
70 | SDL_RenderCopy(renderer, textCharObj.texture, NULL, &outputRect);
71 | #else
72 | SDL_BlitSurface(textCharObj.surface, NULL, windowScreen, &outputRect);
73 | #endif
74 | }
75 |
76 | void renderText(TextObject textObj, FontObject fontObj) {
77 | STRCPY(tempCharArray, textObj.str.c_str());
78 | charWidthCounter = 0;
79 | for (charCounter = 0; charCounter < textObj.str.length(); charCounter++) {
80 | setTextCharPosX(&CHAR_AT_INDEX(charCounter, fontObj.textChars), (textObj.dstrect.x + charWidthCounter));
81 | setTextCharPosY(&CHAR_AT_INDEX(charCounter, fontObj.textChars), textObj.dstrect.y);
82 | renderTextChar(CHAR_AT_INDEX(charCounter, fontObj.textChars));
83 | charWidthCounter += CHAR_AT_INDEX(charCounter, fontObj.textChars).dstrect.w;
84 | }
85 | }
86 |
87 | void renderTextChar_app(TextCharObject textCharObj) {
88 | outputRect = textCharObj.dstrect;
89 | outputRect.x += appToWindowDstRect.x;
90 | outputRect.y += appToWindowDstRect.y;
91 | #if !defined(SDL1)
92 | SDL_RenderCopy(renderer, textCharObj.texture, NULL, &outputRect);
93 | #else
94 | SDL_BlitSurface(textCharObj.surface, NULL, windowScreen, &outputRect);
95 | #endif
96 | }
97 |
98 | void renderText_app(TextObject textObj, FontObject fontObj) {
99 | STRCPY(tempCharArray, textObj.str.c_str());
100 | charWidthCounter = 0;
101 | for (charCounter = 0; charCounter < textObj.str.length(); charCounter++) {
102 | setTextCharPosX(&CHAR_AT_INDEX(charCounter, fontObj.textChars), (textObj.dstrect.x + charWidthCounter));
103 | setTextCharPosY(&CHAR_AT_INDEX(charCounter, fontObj.textChars), textObj.dstrect.y);
104 | renderTextChar_app(CHAR_AT_INDEX(charCounter, fontObj.textChars));
105 | charWidthCounter += CHAR_AT_INDEX(charCounter, fontObj.textChars).dstrect.w;
106 | }
107 | }
108 |
109 | void renderTextChar_menu(TextCharObject textCharObj) {
110 | outputRect = textCharObj.dstrect;
111 | outputRect.x += menuToWindowDstRect.x;
112 | outputRect.y += menuToWindowDstRect.y;
113 | #if !defined(SDL1)
114 | SDL_RenderCopy(renderer, textCharObj.texture, NULL, &outputRect);
115 | #else
116 | SDL_BlitSurface(textCharObj.surface, NULL, windowScreen, &outputRect);
117 | #endif
118 | }
119 |
120 | void renderText_menu(TextObject textObj, FontObject fontObj) {
121 | STRCPY(tempCharArray, textObj.str.c_str());
122 | charWidthCounter = 0;
123 | for (charCounter = 0; charCounter < textObj.str.length(); charCounter++) {
124 | setTextCharPosX(&CHAR_AT_INDEX(charCounter, fontObj.textChars), (textObj.dstrect.x + charWidthCounter));
125 | setTextCharPosY(&CHAR_AT_INDEX(charCounter, fontObj.textChars), textObj.dstrect.y);
126 | renderTextChar_menu(CHAR_AT_INDEX(charCounter, fontObj.textChars));
127 | charWidthCounter += CHAR_AT_INDEX(charCounter, fontObj.textChars).dstrect.w;
128 | }
129 | }
130 |
131 | void setTextCharPosX(TextCharObject *textCharObj, int pos_x) {
132 | textCharObj->dstrect.x = pos_x;
133 | }
134 |
135 | void setTextCharPosY(TextCharObject *textCharObj, int pos_y) {
136 | textCharObj->dstrect.y = pos_y;
137 | }
138 |
139 | void destroyTextObjectTexture(TextCharObject textCharObj) {
140 | #if !defined(SDL1)
141 | SDL_DestroyTexture(textCharObj.texture);
142 | #else
143 | SDL_FreeSurface(textCharObj.surface);
144 | #endif
145 | }
146 |
147 | int getDesiredFontSize(FontObject *fontObj) {
148 | if (fontObj->scaleToWindow) {
149 | return max((int)fontObj->originalSize, (int)(fontObj->multSize * screenScale_menu));
150 | } else {
151 | return max((int)fontObj->originalSize, (int)(fontObj->multSize * gameHiResMult));
152 | }
153 | }
154 |
155 | void setFont(FontObject *fontObj, unsigned char font_data[], unsigned int font_len, int originalSize, double multSize, int style, SDL_Color color, bool scaleToWindow) {
156 | fontObj->originalSize = originalSize;
157 | fontObj->multSize = multSize;
158 | fontObj->scaleToWindow = scaleToWindow;
159 | fontObj->size = getDesiredFontSize(fontObj);
160 | fontObj->style = style;
161 | fontObj->color = color;
162 | fontObj->font = TTF_OpenFontRW(SDL_RWFromConstMem(font_data, font_len), 1, fontObj->size);
163 | TTF_SetFontStyle(fontObj->font, fontObj->style);
164 | }
165 |
166 | void initializeFont_numbers(FontObject *fontObj) {
167 | STRCPY(tempCharArray, "0123456789");
168 | for (uint_i = 0; uint_i < 10; uint_i++) {
169 | i = tempCharArray[uint_i] - 32;
170 | #if !defined(SDL1)
171 | if (fontObj->textChars[i].texture == NULL) {
172 | #else
173 | if (fontObj->textChars[i].surface == NULL) {
174 | #endif
175 | tempChar[0] = i + 32;
176 | setTextChar(tempChar, fontObj->font, fontObj->color, &fontObj->textChars[i]);
177 | }
178 | }
179 | }
--------------------------------------------------------------------------------
/Trogdor-Reburninated/src/window.h:
--------------------------------------------------------------------------------
1 | #include "include.h"
2 | #include "general.h"
3 |
4 | #ifndef WINDOW_H
5 | #define WINDOW_H
6 |
7 | constexpr auto gameWidth = 250;
8 | constexpr auto gameHeight = 180;
9 | constexpr auto TWIPS_PER_PIXEL = 20;
10 | constexpr auto appWidth = 320;
11 | constexpr auto appHeight = 240;
12 |
13 | extern Uint16 gameHiResWidth;
14 | extern Uint16 gameHiResHeight;
15 | extern double gameWidthMult; // game scaling relative to app
16 | extern double gameHeightMult; // game scaling relative to app
17 | extern double gameHiResMult; // hi-res screen scaling
18 | extern Uint16 windowWidth;
19 | extern Uint16 windowHeight;
20 | extern double appWidthMult; // app scaling relative to window
21 | extern double appHeightMult; // app scaling relative to window
22 | extern float ticksPerFrameDefault;
23 | extern float ticksPerFrame;
24 | extern Uint32 ticksPerFrameInt;
25 |
26 | #if !defined(SDL1)
27 | extern SDL_Window *window;
28 | extern SDL_Renderer *renderer;
29 | #else
30 | extern SDL_Surface *windowScreen;
31 | extern SDL_Surface *transparentScreen;
32 | #endif
33 | extern SDL_Rect gameSrcRect;
34 | const SDL_Rect gameSrcRect_unscaled = { 0, 0, gameWidth, gameHeight };
35 | //extern SDL_Rect gameToAppDstRect; // game screen mapping to app
36 | extern SDL_Rect gameHiResSrcRect;
37 | extern SDL_Rect appSrcRect;
38 | extern SDL_Rect appToWindowDstRect; // app mapping to window
39 | extern SDL_Rect gameToWindowDstRect; // game screen mapping to window
40 | extern SDL_Rect menuToWindowDstRect; // menu mapping to window
41 |
42 | extern bool isWindowed;
43 | extern float screenScale; // the multiplier by which graphics should be scaled via SDL_gfx; caps out at 2
44 | extern int trueScreenScaleInt; // the multiplier by which the screen should be scaled via renderer
45 | extern float trueScreenScaleFull; // the multiplier by which the screen should be scaled via renderer
46 | extern float screenScale_menu;
47 | extern bool allowHiRes;
48 | extern Sint8 scalingType;
49 | extern Sint8 overlayType;
50 |
51 | extern float getScreenScale_app();
52 | extern void scaleGameByApp();
53 | extern float getScreenScale_game();
54 | extern void scaleAppByGame();
55 | extern void scaleGameAndApp();
56 | extern void repositionOverlay();
57 | extern void setWidthHeightMults();
58 | extern void setScaling();
59 | extern void snapWindow_x(double, Uint16);
60 | extern void snapWindow_y(double, Uint16);
61 | extern void SDL_toggleFullscreen();
62 | extern void setFullscreen();
63 | extern void InitializeMenus(); // this is in menu.cpp
64 | extern void drawOverlay();
65 |
66 | #endif
--------------------------------------------------------------------------------
/screenshots/gameplay_v1.0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/gameplay_v1.0.png
--------------------------------------------------------------------------------
/screenshots/gameplay_v1.0_3ds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/gameplay_v1.0_3ds.png
--------------------------------------------------------------------------------
/screenshots/gameplay_v1.0_psp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/gameplay_v1.0_psp.png
--------------------------------------------------------------------------------
/screenshots/gameplay_v1.0_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/gameplay_v1.0_switch.png
--------------------------------------------------------------------------------
/screenshots/gameplay_v1.0_vita.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/gameplay_v1.0_vita.png
--------------------------------------------------------------------------------
/screenshots/options_v1.0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Mode8fx/Trogdor-Reburninated/319cca8f2f1d6763a42629b59bd2498b52a46f44/screenshots/options_v1.0.png
--------------------------------------------------------------------------------