mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-29 12:50:35 +00:00
Carbon HACKS (breaks other stuff)
This commit is contained in:
parent
a9337f529f
commit
54591b457a
@ -37,7 +37,7 @@ if(APPLE)
|
||||
target_link_libraries(Raytracer2 "-framework Carbon")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11")
|
||||
|
||||
if(FALSE)
|
||||
# save 200KB of code by removing unused stuff
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||
|
||||
@ -55,4 +55,14 @@ else()
|
||||
add_application(FixedBenchmark CONSOLE
|
||||
FILES fixedbenchmark.cc fixed.h fixed.cc)
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections -nostdlib")
|
||||
add_definitions(-DRETRO_CARBON)
|
||||
add_application(RaytracerCarbon
|
||||
raytracer2.cc
|
||||
fixed.h
|
||||
fixed.cc
|
||||
carb.r
|
||||
)
|
||||
target_link_libraries(RaytracerCarbon "-lstdc++" "-lc" retrocrt "-lc" "-lgcc" retrocrt "-lc" CarbonLib)
|
||||
endif()
|
||||
|
||||
|
3
Samples/Raytracer/carb.r
Normal file
3
Samples/Raytracer/carb.r
Normal file
@ -0,0 +1,3 @@
|
||||
data 'carb' (0) {
|
||||
$"00"
|
||||
};
|
@ -22,17 +22,20 @@
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#else
|
||||
|
||||
#ifdef RETRO_CARBON
|
||||
//#define __FP__
|
||||
#include <math.h>
|
||||
#include <Carbon.h>
|
||||
#else
|
||||
#include <Quickdraw.h>
|
||||
#include <MacMemory.h>
|
||||
#include <Sound.h>
|
||||
#include <Events.h>
|
||||
#include <Fonts.h>
|
||||
#include <NumberFormatting.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
QDGlobals qd;
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include "fixed.h"
|
||||
@ -286,7 +289,11 @@ int main()
|
||||
}
|
||||
Rect r2;
|
||||
SetRect(&r2,0,y,r.right,y+1);
|
||||
#if TARGET_API_MAC_CARBON
|
||||
CopyBits(&line, GetPortBitMapForCopyBits(GetWindowPort(win)), &line.bounds, &r2, srcCopy, NULL);
|
||||
#else
|
||||
CopyBits(&line, &win->portBits, &line.bounds, &r2, srcCopy, NULL);
|
||||
#endif
|
||||
if(Button())
|
||||
return 0;
|
||||
#if TARGET_API_MAC_CARBON
|
||||
|
@ -24,9 +24,10 @@ resource 'SIZE' (-1) {
|
||||
dontGetFrontClicks,
|
||||
ignoreChildDiedEvents,
|
||||
is32BitCompatible,
|
||||
reserved,
|
||||
reserved,
|
||||
reserved,
|
||||
|
||||
isHighLevelEventAware,
|
||||
onlyLocalHLEvents,
|
||||
notStationeryAware,
|
||||
reserved,
|
||||
reserved,
|
||||
reserved,
|
||||
|
Loading…
Reference in New Issue
Block a user